[WINEDOCS] Some more Makefile tweaks

Francois Gouget fgouget at codeweavers.com
Fri May 13 12:41:45 CDT 2005


Changelog:

  * Make.rules.in
    Makefile.in
    en/Makefile.in

    Francois Gouget <fgouget at codeweavers.com>
    Add the standard TOPSRCDIR & co variables so we can correctly refer 
to the configure script from anywhere.
    Make the top-level 'all' target recurse normally.
    Add a dependency of Makefile on Makefile.in.
    Move the doc, html, pdf, ps and txt targets to Make.rules.in.
    Define an ALLFORMAT variable to unify the dependency handling for 
.pdf, .ps, .html and .txt files. Take advantage of the WINExxx_SRCS 
variables to move this to Make.rules.in.



-- 
Francois Gouget
fgouget at codeweavers.com

-------------- next part --------------
Index: Make.rules.in
===================================================================
RCS file: /cvsroot/wine/docs/Make.rules.in,v
retrieving revision 1.2
diff -u -p -r1.2 Make.rules.in
--- Make.rules.in	13 May 2005 11:59:28 -0000	1.2
+++ Make.rules.in	13 May 2005 17:30:44 -0000
@@ -3,6 +3,7 @@
 # Each individual makefile should define the following variables:
 # LANG         : the language for the documentation
 # ALLBOOKS     : the books to build
+# WINExxx_SRCS : the SGML source files for each supported book
 
 SHELL     = /bin/sh
 LN        = @LN@
@@ -14,6 +15,14 @@ DB2PDF    = @DB2PDF@
 DB2PS     = @DB2PS@
 DB2TXT    = @DB2TXT@
 
+all: Makefile $(SUBDIRS)
+
+doc: html pdf ps txt
+html: $(ALLBOOKS:%=%.html) $(SUBDIRS:%=%/__html__)
+pdf: $(ALLBOOKS:%=%.pdf) $(SUBDIRS:%=%/__pdf__)
+ps: $(ALLBOOKS:%=%.ps) $(SUBDIRS:%=%/__ps__)
+txt: $(ALLBOOKS:%=%.txt) $(SUBDIRS:%=%/__txt__)
+
 .PHONY: doc html pdf ps txt dist
 
 # Rules for generating the documentation from the SGML sources
@@ -87,4 +96,17 @@ dummy:
 
 .PHONY: dummy $(SUBDIRS)
 
-# End of global rules
+# Manual Dependencies
+
+ALLFORMATS = html pdf ps txt
+
+$(ALLFORMATS:%=wineusr-guide.%): $(WINEUSR_SRCS)
+$(ALLFORMATS:%=winedev-guide.%): $(WINEDEV_SRCS)
+$(ALLFORMATS:%=winelib-guide.%): $(WINELIB_SRCS)
+$(ALLFORMATS:%=wine-faq.%):      $(WINEFAQ_SRCS)
+
+Makefile: Makefile.in $(TOPSRCDIR)/configure
+	@echo $? is newer than '$@', please rerun $(TOPSRCDIR)/configure!
+	@exit 1
+
+### End of global rules
Index: Makefile.in
===================================================================
RCS file: /cvsroot/wine/docs/Makefile.in,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.in
--- Makefile.in	13 May 2005 12:08:59 -0000	1.2
+++ Makefile.in	13 May 2005 17:30:44 -0000
@@ -1,17 +1,15 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = .
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+
 SUBDIRS = \
 	en
 
-all: Make.rules doc
+all: Make.rules
 
 @MAKE_RULES@
 
-doc: html pdf ps txt
-
-html:: $(SUBDIRS:%=%/__html__)
-pdf:: $(SUBDIRS:%=%/__pdf__)
-ps:: $(SUBDIRS:%=%/__ps__)
-txt:: $(SUBDIRS:%=%/__txt__)
-
 distclean: clean
 	$(RM) config.* configure.lineno TAGS tags Make.rules
 	$(RM) -r autom4te.cache
@@ -19,6 +17,6 @@ distclean: clean
 
 # Manual dependencies
 
-Make.rules: Make.rules.in configure
-	@echo $? is newer than '$@', please rerun ./configure!
+Make.rules: Make.rules.in $(TOPSRCDIR)/configure
+	@echo $? is newer than '$@', please rerun $(TOPSRCDIR)/configure!
 	@exit 1
Index: en/Makefile.in
===================================================================
RCS file: /cvsroot/wine/docs/en/Makefile.in,v
retrieving revision 1.2
diff -u -p -r1.2 Makefile.in
--- en/Makefile.in	13 May 2005 11:59:30 -0000	1.2
+++ en/Makefile.in	13 May 2005 17:30:44 -0000
@@ -1,3 +1,8 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+
 LANG      = en
 
 WINEUSR_SRCS = \
@@ -34,6 +39,8 @@ WINELIB_SRCS = \
 	winelib-porting.sgml \
 	winelib-toolkit.sgml
 
+WINEFAQ_SRCS = \
+
 ALLBOOKS = \
 	winedev-guide \
 	wineusr-guide \
@@ -43,13 +50,3 @@ ALLBOOKS = \
 all: doc
 
 @MAKE_RULES@
-
-doc: html pdf ps txt
-html: $(ALLBOOKS:%=%.html)
-pdf: $(ALLBOOKS:%=%.pdf)
-ps: $(ALLBOOKS:%=%.ps)
-txt: $(ALLBOOKS:%=%.txt)
-
-winedev-guide.pdf winedev-guide.ps winedev-guide.html winedev-guide.txt: $(WINEDEV_SRCS)
-wineusr-guide.pdf wineusr-guide.ps wineusr-guide.html wineusr-guide.txt: $(WINEUSR_SRCS)
-winelib-guide.pdf winelib-guide.ps winelib-guide.html winelib-guide.txt: $(WINELIB_SRCS)


More information about the wine-patches mailing list