summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-06-17 19:27:05 +0000
committerRoland McGrath <roland@gnu.org>1999-06-17 19:27:05 +0000
commit6a79974139b3b8238b286a89276be90369db2b47 (patch)
treec6f4b7acc6822be93272b6b7edfa14ba93814568 /doc
parentd4d93723f01dbe8768e7fac92ce8e655aa499f0a (diff)
1999-06-17 Roland McGrath <roland@baalperazim.frob.com>
* Makefile (%.info rule): Put output in build dir, not srcdir. Pass -I options to makeinfo for both dirs. (move-if-change): New variable. (version.texi, stamp-version): New targets, update version.texi (in build dir) from `$(hurd-version)' as set in Makeconf.
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/doc/Makefile b/doc/Makefile
index dc752905..27c48a30 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -27,7 +27,7 @@ DVIPS = dvips
include ../Makeconf
# For each .info file we need a .d file.
--include $(subst .info,.d,$(filter %.info,$(targets))) /dev/null
+-include $(patsubst %.info,%.d,$(filter %.info,$(targets))) /dev/null
# Build dependencies from included files.
%.d: %.texi
@@ -37,8 +37,8 @@ include ../Makeconf
mv -f $@.new $@
%.info: %.texi
- @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
- cd $(srcdir) && $(MAKEINFO) $(notdir $<)
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(@D) -I $(<D) $<
.PRECIOUS: %.dvi
%.dvi: %.texi
@@ -48,11 +48,12 @@ include ../Makeconf
%.ps: %.dvi
$(DVIPS) $< -o $@
-# A header which contains the latest package version.
-$(srcdir)/version.texi: $(top_srcdir)/version.h
- set -e; (echo "@c version.texi - automatically generated from ../version.h"; \
- grep '^#define HURD_VERSION' $< | \
- sed 's/^[^"]*"\([^"]*\).*$$/@set VERSION \1/') > $@.new
- mv -f $@.new $@
+move-if-change = $(SHELL) $(top_srcdir)/move-if-change
+
+version.texi: stamp-version; @:
+stamp-version: $(top_srcdir)/Makeconf
+ echo '@set VERSION $(hurd-version)' > version.texi.new
+ $(move-if-change) version.texi.new version.texi
+ touch $@
all: $(targets)