about summary refs log tree commit diff
path: root/manual/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'manual/Makefile')
-rw-r--r--manual/Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/manual/Makefile b/manual/Makefile
index 67e13904bb..a05ab8328c 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -61,7 +61,7 @@ examples = $(filter-out $(foreach d, $(add-ons), ../$d/%.c.texi), \
 
 # Generated files directly included from libc.texinfo.
 libc-texi-generated = chapters.texi top-menu.texi dir-add.texi \
-		      libm-err.texi version.texi
+		      libm-err.texi version.texi pkgvers.texi
 
 # Add path to build dir for generated files
 texis-path := $(filter-out $(libc-texi-generated) summary.texi $(examples), \
@@ -113,6 +113,20 @@ $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
 	$(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
 	touch $@
 
+# Package version and bug reporting URL.
+$(objpfx)pkgvers.texi: $(objpfx)stamp-pkgvers ;
+$(objpfx)stamp-pkgvers: $(common-objpfx)config.make
+	echo "@ifclear PKGVERS" > $(objpfx)pkgvers-tmp
+	echo "@set PKGVERS" >> $(objpfx)pkgvers-tmp
+	echo "@set PKGVERSION $(PKGVERSION_TEXI)" >> $(objpfx)pkgvers-tmp
+	if [ "$(PKGVERSION_TEXI)" = "(GNU libc) " ]; then \
+	  echo "@set PKGVERSION_DEFAULT" >> $(objpfx)pkgvers-tmp; \
+	fi
+	echo "@set REPORT_BUGS_TO $(REPORT_BUGS_TEXI)" >> $(objpfx)pkgvers-tmp
+	echo "@end ifclear" >> $(objpfx)pkgvers-tmp
+	$(move-if-change) $(objpfx)pkgvers-tmp $(objpfx)pkgvers.texi
+	touch $@
+
 # Generate a file with the version number.
 $(objpfx)version.texi: $(objpfx)stamp-version ;
 $(objpfx)stamp-version: $(common-objpfx)config.make