Преглед изворни кода

Do not install dselect and s-s-d man pages if disabled on configure

When configuring with --without-dselect or --without-start-stop-daemon,
do not install the man pages related to those programs.
Guillem Jover пре 17 година
родитељ
комит
780d969788
2 измењених фајлова са 33 додато и 17 уклоњено
  1. 2 0
      debian/changelog
  2. 31 17
      man/Makefile.am

+ 2 - 0
debian/changelog

@@ -80,6 +80,8 @@ dpkg (1.15.1) UNRELEASED; urgency=low
   * Add '.hgtags' to the default dpkg-source -i regex and -I pattern.
   * Add '.hgtags' to the default dpkg-source -i regex and -I pattern.
     Closes: #525854
     Closes: #525854
   * Use backticks instead of non-portable make $(shell) function in automake.
   * Use backticks instead of non-portable make $(shell) function in automake.
+  * Do not install dselect and start-stop-daemon man pages when the programs
+    have been disabled from configure.
 
 
   [ Frank Lichtenheld ]
   [ Frank Lichtenheld ]
   * Dpkg::Version: Remove unnecessary function next_elem which just
   * Dpkg::Version: Remove unnecessary function next_elem which just

+ 31 - 17
man/Makefile.am

@@ -32,13 +32,16 @@ install-data-local: install-data-local-@USE_NLS@
 install-data-local-no:
 install-data-local-no:
 install-data-local-yes:
 install-data-local-yes:
 	for lang in $(LINGUAS); do \
 	for lang in $(LINGUAS); do \
-		if [ -d $(srcdir)/$$lang ]; then \
-			files=$$(echo $(srcdir)/$$lang/*.[1-9]); \
-			$(MAKE) install-man \
-				mandir="$(mandir)/$$lang" \
-				man_MANS="" \
-				dist_man_MANS="$$files"; \
-		fi \
+		files=""; \
+		for trans in $(dist_man_MANS); do \
+			if [ -f $(srcdir)/$$lang/$$trans ]; then \
+				files="$$files $(srcdir)/$$lang/$$trans"; \
+			fi; \
+		done; \
+		$(MAKE) install-man \
+			mandir="$(mandir)/$$lang" \
+			man_MANS="" \
+			dist_man_MANS="$$files"; \
 	done
 	done
 
 
 uninstall-local: uninstall-local-@USE_NLS@
 uninstall-local: uninstall-local-@USE_NLS@
@@ -46,13 +49,16 @@ uninstall-local: uninstall-local-@USE_NLS@
 uninstall-local-no:
 uninstall-local-no:
 uninstall-local-yes:
 uninstall-local-yes:
 	for lang in $(LINGUAS); do \
 	for lang in $(LINGUAS); do \
-		if [ -d $(srcdir)/$$lang ]; then \
-			files=$$(echo $(srcdir)/$$lang/*.[1-9]); \
-			$(MAKE) uninstall-man \
-				mandir="$(mandir)/$$lang" \
-				man_MANS="" \
-				dist_man_MANS="$$files"; \
-		fi \
+		files=""; \
+		for trans in $(dist_man_MANS); do \
+			if [ -f $(srcdir)/$$lang/$$trans ]; then \
+				files="$$files $(srcdir)/$$lang/$$trans"; \
+			fi; \
+		done; \
+		$(MAKE) uninstall-man \
+			mandir="$(mandir)/$$lang" \
+			man_MANS="" \
+			dist_man_MANS="$$files"; \
 	done
 	done
 
 
 dist-hook: man.stamp
 dist-hook: man.stamp
@@ -96,12 +102,20 @@ dist_man_MANS = \
 	dpkg-trigger.1 \
 	dpkg-trigger.1 \
 	dpkg.1 \
 	dpkg.1 \
 	dpkg.cfg.5 \
 	dpkg.cfg.5 \
-	dselect.1 \
-	dselect.cfg.5 \
 	install-info.8 \
 	install-info.8 \
-	start-stop-daemon.8 \
 	update-alternatives.8
 	update-alternatives.8
 
 
+if WITH_DSELECT
+dist_man_MANS += \
+	dselect.1 \
+	dselect.cfg.5
+endif
+
+if WITH_START_STOP_DAEMON
+dist_man_MANS += \
+	start-stop-daemon.8
+endif
+
 EXTRA_DIST = \
 EXTRA_DIST = \
 	po/ChangeLog.old \
 	po/ChangeLog.old \
 	po/po4a.cfg \
 	po/po4a.cfg \