(chapters): Don't depend on Makefile; this rule has stopped changing.
authorroland <roland>
Thu, 12 Nov 1992 20:50:03 +0000 (20:50 +0000)
committerroland <roland>
Thu, 12 Nov 1992 20:50:03 +0000 (20:50 +0000)
(find-includes): Use mv, not move-if-change.
(summary.texinfo): Depend on stamp-summary and have empty commands.
(stamp-summary): New rule, cmds of old summary.texinfo rule, plus touch $@.
(minimal-dist): Filter summary.texinfo out of $(chapters-incl).
(distribute): Add stamp-summary.

manual/Makefile

index e6f123e..3ef57a3 100644 (file)
@@ -25,7 +25,7 @@ all: library.dvi library.info
 
 # Set chapters and chapters-incl.
 include chapters
 
 # Set chapters and chapters-incl.
 include chapters
-chapters: library.texinfo Makefile
+chapters: library.texinfo
        $(find-includes)
 ifdef chapters
 include chapters-incl
        $(find-includes)
 ifdef chapters
 include chapters-incl
@@ -36,17 +36,19 @@ endif
 define find-includes
 (echo '$@ :=' \\       ;\
  awk '$$1 == "@include" { print $$2 " \\" }' $^) > $@.new
 define find-includes
 (echo '$@ :=' \\       ;\
  awk '$$1 == "@include" { print $$2 " \\" }' $^) > $@.new
-move-if-change $@.new $@
+mv $@.new $@
 endef
 
 library.dvi library.info: $(chapters) summary.texinfo $(chapters-incl)
 library.dvi: texinfo.tex
 
 # Generate the summary from the Texinfo source files for each chapter.
 endef
 
 library.dvi library.info: $(chapters) summary.texinfo $(chapters-incl)
 library.dvi: texinfo.tex
 
 # Generate the summary from the Texinfo source files for each chapter.
-summary.texinfo: summary.awk $(chapters)
+summary.texinfo: stamp-summary ;
+stamp-summary: summary.awk $(chapters)
        awk -f $^ \
        awk -f $^ \
-       | sort +1 -2 | tr '\014' '\012' > $@.new
-       move-if-change $@.new $@
+       | sort +1 -2 | tr '\014' '\012' > summary-tmp
+       move-if-change summary-tmp summary.texinfo
+       touch $@
 
 # Generate Texinfo files from the C source for the example programs.
 %.c.texi: examples/%.c
 
 # Generate Texinfo files from the C source for the example programs.
 %.c.texi: examples/%.c
@@ -59,8 +61,10 @@ summary.texinfo: summary.awk $(chapters)
 
 
 minimal-dist = library.texinfo summary.awk Makefile move-if-change     \
 
 
 minimal-dist = library.texinfo summary.awk Makefile move-if-change     \
-              $(chapters) $(chapters-incl:%.c.texi=examples/%.c)
-distribute = $(minimal-dist) texinfo.tex summary.texinfo
+              $(chapters)                                              \
+              $(patsubst %.c.texi,examples/%.c,                        \
+                         $(filter-out summary.texinfo,$(chapters-incl)))
+distribute = $(minimal-dist) texinfo.tex summary.texinfo stamp-summary
 
 manual.tar: $(minimal-dist)
        tar uvf $@ $^
 
 manual.tar: $(minimal-dist)
        tar uvf $@ $^