man-db-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Man-db-devel] [PATCH] Fix parallel building by using pattern rules in m


From: Nikola Forró
Subject: [Man-db-devel] [PATCH] Fix parallel building by using pattern rules in makefiles
Date: Fri, 18 Sep 2015 17:01:24 +0200

When building man-db with more simultaneous jobs it could happen
that the "replace.sed" file was not completely generated at the time
when substitution was taking place, so the resulting man pages contained
unsubstituted placeholders.
This patch fixes it by replacing suffix rules (which cannot have
prerequisites) with pattern rules that have "replace.sed" file
as a prerequisite, so they are run only after "replace.sed"
is completely generated.

Signed-off-by: Nikola Forró <address@hidden>
---
 man/Makefile.in       | 9 +++------
 man/Rules.man         | 9 +++------
 man/da/Makefile.in    | 9 +++------
 man/de/Makefile.in    | 9 +++------
 man/es/Makefile.in    | 9 +++------
 man/fr/Makefile.in    | 9 +++------
 man/id/Makefile.in    | 9 +++------
 man/it/Makefile.in    | 9 +++------
 man/ja/Makefile.in    | 9 +++------
 man/nl/Makefile.in    | 9 +++------
 man/pl/Makefile.in    | 9 +++------
 man/ru/Makefile.in    | 9 +++------
 man/zh_CN/Makefile.in | 9 +++------
 13 files changed, 39 insertions(+), 78 deletions(-)

diff --git a/man/Makefile.in b/man/Makefile.in
index 5948349..94d690b 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -2307,18 +2307,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/Rules.man b/man/Rules.man
index 4ce8ac0..3b239ca 100644
--- a/man/Rules.man
+++ b/man/Rules.man
@@ -34,18 +34,15 @@ endif
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/da/Makefile.in b/man/da/Makefile.in
index 585cd8f..bcba068 100644
--- a/man/da/Makefile.in
+++ b/man/da/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/de/Makefile.in b/man/de/Makefile.in
index 6ae0a62..19e9e37 100644
--- a/man/de/Makefile.in
+++ b/man/de/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/es/Makefile.in b/man/es/Makefile.in
index 7681f14..2b109e5 100644
--- a/man/es/Makefile.in
+++ b/man/es/Makefile.in
@@ -2099,18 +2099,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/fr/Makefile.in b/man/fr/Makefile.in
index 04befbb..ac2018f 100644
--- a/man/fr/Makefile.in
+++ b/man/fr/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/id/Makefile.in b/man/id/Makefile.in
index b08b240..a07ff57 100644
--- a/man/id/Makefile.in
+++ b/man/id/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/it/Makefile.in b/man/it/Makefile.in
index 34b6242..9f2ac62 100644
--- a/man/it/Makefile.in
+++ b/man/it/Makefile.in
@@ -2107,18 +2107,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/ja/Makefile.in b/man/ja/Makefile.in
index acc11fa..ffbac84 100644
--- a/man/ja/Makefile.in
+++ b/man/ja/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/nl/Makefile.in b/man/nl/Makefile.in
index 9cb4c2d..9aa191c 100644
--- a/man/nl/Makefile.in
+++ b/man/nl/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/pl/Makefile.in b/man/pl/Makefile.in
index 0c8bd4d..36ea1fd 100644
--- a/man/pl/Makefile.in
+++ b/man/pl/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/ru/Makefile.in b/man/ru/Makefile.in
index 5a32661..9a6afd8 100644
--- a/man/ru/Makefile.in
+++ b/man/ru/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
diff --git a/man/zh_CN/Makefile.in b/man/zh_CN/Makefile.in
index e9afb77..8dddee3 100644
--- a/man/zh_CN/Makefile.in
+++ b/man/zh_CN/Makefile.in
@@ -2125,18 +2125,15 @@ uninstall-man: uninstall-man1 uninstall-man5 
uninstall-man8
 replace.sed: $(top_builddir)/man/replace.sin
        $(AM_V_GEN)sed -e 's,%REPLACE_CONFIG_FILE%,$(config_file),g' 
$(top_builddir)/man/replace.sin > $@
 
-.man1.1: replace.sed
+%.1: %.man1 replace.sed
        $(AM_V_at)$(MKDIR_P) man1
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.1//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
-.man5.5: replace.sed
+%.5: %.man5 replace.sed
        $(AM_V_at)$(MKDIR_P) man5
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)sed -f replace.sed $< > $@
-.man8.8: replace.sed
+%.8: %.man8 replace.sed
        $(AM_V_at)$(MKDIR_P) man8
-       @$(MAKE) $(AM_MAKEFLAGS) replace.sed
        $(AM_V_GEN)program=`echo '$@' | sed -e 's/\.8//' -e 's,.*/,,' -e 
'$(program_transform_name)'`; \
        sed -f replace.sed -e "s,%program%,$$program,g" $< > $@
 
-- 
2.4.3





reply via email to

[Prev in Thread] Current Thread [Next in Thread]