Don't generate the Makefile, but rather include an autogenerated settings file
authorJelmer Vernooij <jelmer@samba.org>
Sat, 29 Jan 2005 20:05:52 +0000 (20:05 +0000)
committerGerald W. Carter <jerry@samba.org>
Wed, 23 Apr 2008 13:59:28 +0000 (08:59 -0500)
(I spend a lot of time editting the Makefile, and running config.status every time
 I change something gets annoying)

docs/Makefile [moved from docs/Makefile.in with 89% similarity]
docs/Makefile.settings.in [new file with mode: 0644]
docs/configure.in

similarity index 89%
rename from docs/Makefile.in
rename to docs/Makefile
index 4d84d1ca1008152114adcb62407360bbc078b6df..93c2f6199ccf2fc0fcaceaa9d88bc35b9f232033 100644 (file)
@@ -4,49 +4,7 @@
 #              James Moore <jmoore@php.net>
 #              Gerald Carter <jerry@samba.org>
 #              Jelmer Vernooij <jelmer@samba.org>
-
-# Programs
-XSLTPROC = @XSLTPROC@
-XMLLINT = @XMLLINT@
-DVIPS = @DVIPS@
-PNGTOPNM = @PNGTOPNM@
-EPSTOPNM = @EPSTOPNM@
-PNMTOPNG = @PNMTOPNG@
-DIA = @DIA@
-PNMTOPS = @PNMTOPS@
-HTML2TEXT = @HTML2TEXT@
-PLUCKERBUILD = @PLUCKERBUILD@
-COPY_IMAGES = ./scripts/copy-images.sh
-THUMBPDF = @THUMBPDF@
-PDFLATEX = TEXINPUTS=xslt/latex:.: @PDFLATEX@ --file-line-error-style
-LATEX = TEXINPUTS=xslt/latex:.: @LATEX@ --file-line-error-style
-RM = @RM@
-ifndef DEBUG_LATEX
-PDFLATEX += --interaction nonstopmode
-LATEX += --interaction nonstopmode
-endif
-
-# Paths
-OUTPUTDIR = output
-ARCHIVEDIR = archive
-SRCDIR = @SAMBASOURCEDIR@
-MANDIR = $(OUTPUTDIR)/manpages
-EPSTOPDF = @EPSTOPDF@
-MANPAGEDIR = manpages
-MAKEINDEX = @MAKEINDEX@
-EXAMPLESDIR = examples
-SMBDOTCONFDOC = smbdotconf
-DOCBOOKDIR = tmp
-PSDIR = $(OUTPUTDIR)
-PDFDIR = $(OUTPUTDIR)
-DVIDIR = $(OUTPUTDIR)
-FODIR = $(OUTPUTDIR)
-HTMLHELPDIR = $(OUTPUTDIR)/htmlhelp
-VALIDATEDIR = $(OUTPUTDIR)/validate
-PEARSONDIR = $(OUTPUTDIR)/pearson
-TXTDIR = $(OUTPUTDIR)/textdocs
-HTMLDIR=$(OUTPUTDIR)/htmldocs
-PLUCKERDIR=$(OUTPUTDIR)/plucker
+-include Makefile.settings
 
 # Docs to build
 MAIN_DOCS = $(patsubst %/index.xml,$(DOCBOOKDIR)/%.xml,$(wildcard */index.xml))
@@ -56,6 +14,16 @@ MANPAGES = $(wildcard $(MANPAGEDIR)/*.?.xml)
 LATEX_FIGURES = xslt/figures/caution.pdf xslt/figures/important.pdf xslt/figures/note.pdf xslt/figures/tip.pdf xslt/figures/warning.pdf
 MANPAGES_PLUCKER = $(patsubst $(MANPAGEDIR)/%.xml,$(PLUCKERDIR)/%.pdb,$(MANPAGES))
 
+ifndef OUTPUTDIR
+Makefile.settings: Makefile.settings.in configure
+       @echo Makefile.settings not present, trying to run configure...
+       @./configure
+
+configure: configure.in
+       @echo configure not present, trying to generate
+       @autoreconf
+endif
+
 help: 
        @echo "Supported make targets:"
        @echo " release - Build the docs needed for a Samba release"
@@ -69,6 +37,8 @@ help:
        @echo " samples - Extract examples"
        @echo " files - Extract other files"
 
+
+
 Samba-Guide/index.xml: $(subst Samba-Guide/index.xml,,$(wildcard Samba-Guide/*.xml))
 Samba-HOWTO-Collection/index.xml: $(subst Samba-HOWTO-Collection/index.xml,,$(wildcard Samba-HOWTO-Collection/*.xml)) Samba-HOWTO-Collection-attributions.xml
 Samba-Developers-Guide/index.xml: $(subst Samba-Developers-Guide/index.xml,,$(wildcard Samba-Developers-Guide/*.xml)) Samba-Developers-Guide-attributions.xml
@@ -137,7 +107,7 @@ $(HTMLDIR)/%.html: $(DOCBOOKDIR)/%.xml $(HTMLDIR)/samba.css xslt/html.xsl
        $(XSLTPROC) --xinclude xslt/generate-attributions.xsl $*/index.xml > $@
 
 clobber: clean
-       rm Makefile settings.xsl config.status config.log configure
+       rm Makefile.settings settings.xsl config.status config.log configure
 
 clean: 
        rm -rf $(OUTPUTDIR)/* $(DOCBOOKDIR)
diff --git a/docs/Makefile.settings.in b/docs/Makefile.settings.in
new file mode 100644 (file)
index 0000000..1c38d27
--- /dev/null
@@ -0,0 +1,44 @@
+# Programs
+XSLTPROC = @XSLTPROC@
+XMLLINT = @XMLLINT@
+DVIPS = @DVIPS@
+PNGTOPNM = @PNGTOPNM@
+EPSTOPNM = @EPSTOPNM@
+PNMTOPNG = @PNMTOPNG@
+DIA = @DIA@
+PNMTOPS = @PNMTOPS@
+HTML2TEXT = @HTML2TEXT@
+PLUCKERBUILD = @PLUCKERBUILD@
+COPY_IMAGES = ./scripts/copy-images.sh
+THUMBPDF = @THUMBPDF@
+PDFLATEX = TEXINPUTS=xslt/latex:.: @PDFLATEX@ --file-line-error-style
+LATEX = TEXINPUTS=xslt/latex:.: @LATEX@ --file-line-error-style
+RM = @RM@
+ifndef DEBUG_LATEX
+PDFLATEX += --interaction nonstopmode
+LATEX += --interaction nonstopmode
+endif
+
+# Paths
+OUTPUTDIR = output
+ARCHIVEDIR = archive
+SRCDIR = @SAMBASOURCEDIR@
+MANDIR = $(OUTPUTDIR)/manpages
+EPSTOPDF = @EPSTOPDF@
+MANPAGEDIR = manpages
+MAKEINDEX = @MAKEINDEX@
+EXAMPLESDIR = examples
+SMBDOTCONFDOC = smbdotconf
+DOCBOOKDIR = tmp
+PSDIR = $(OUTPUTDIR)
+PDFDIR = $(OUTPUTDIR)
+DVIDIR = $(OUTPUTDIR)
+FODIR = $(OUTPUTDIR)
+HTMLHELPDIR = $(OUTPUTDIR)/htmlhelp
+VALIDATEDIR = $(OUTPUTDIR)/validate
+PEARSONDIR = $(OUTPUTDIR)/pearson
+TXTDIR = $(OUTPUTDIR)/textdocs
+HTMLDIR=$(OUTPUTDIR)/htmldocs
+PLUCKERDIR=$(OUTPUTDIR)/plucker
+
+TARGETS = @TARGETS@
index 19efae4ecbc6d31a0e8196d53380fc1f67177998..033bbed00ffcf3f8914fd2999ff4396a2a162bfd 100644 (file)
@@ -95,4 +95,4 @@ fi
 
 AC_SUBST(TARGETS)
 
-AC_OUTPUT( Makefile settings.xsl )
+AC_OUTPUT( Makefile.settings settings.xsl )