Browse Source

Makefile: avoid spurious recompilations of documentation

* doc/Makefile: org-version.inc is again dependent on org.texi.  This
  avoids recompilation when nothing has been changed; target "clean"
  still removes orgversion.texi to produce a consistent set of
  documentation and code after a "make clean" on toplevel

* targets.mk: add "doc" as prerequisite to "all" and "compile" to have
  it call "clean" in the doc subdir.
Achim Gratz 9 years ago
parent
commit
bcced6a51d
2 changed files with 6 additions and 8 deletions
  1. 4 5
      doc/Makefile
  2. 2 3
      targets.mk

+ 4 - 5
doc/Makefile

@@ -3,8 +3,7 @@ ifeq ($(MAKELEVEL), 0)
   $(error This make needs to be started as a sub-make from the toplevel directory.)
 endif
 .PHONY:		all info html pdf card manual guide install \
-		clean cleanall clean-install \
-		org-version.inc
+		clean cleanall clean-install
 
 all:		$(ORG_MAKE_DOC)
 
@@ -25,7 +24,7 @@ guide::		orgguide.texi
 	$(TEXI2HTML) -o $@ $<
 	../UTILITIES/guidesplit.pl $@/*
 
-org-version.inc:
+org-version.inc:	org.texi
 	@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
 	@echo "@c automatically generated, do not edit"  > org-version.inc
 	@echo "@set VERSION $(ORGVERSION) ($(GITVERSION))" >> org-version.inc
@@ -38,9 +37,9 @@ install:	org
 	$(INSTALL_INFO) --infodir=$(DESTDIR)$(infodir) org
 
 clean:
-	$(RM) org *.pdf *.html *_letter.tex \
+	$(RM) org *.pdf *.html *_letter.tex org-version.inc \
 	      *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \
-	      *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps org-version.inc
+	      *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps
 cleanall:	clean
 	$(RMR) guide manual
 

+ 2 - 3
targets.mk

@@ -48,11 +48,10 @@ local.mk:
 		-e '$$ i ## See default.mk for further configuration options.' \
 		default.mk > $@
 
-all compile::	lisp
+all compile::	doc lisp
 	$(MAKE) -C $< clean
-all compile compile-dirty::	lisp
+compile compile-dirty::	lisp
 	$(MAKE) -C $< $@
-
 all clean-install::
 	$(foreach dir, $(SUBDIRS), $(MAKE) -C $(dir) $@;)