diff options
author | Bruno Haible <bruno@clisp.org> | 2006-12-14 12:30:15 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:14:28 +0200 |
commit | f1097bba9edc19e8b5c00395616823d715a758bd (patch) | |
tree | e27e05d2017a7a97fdaa290a612546c040b98bbc /gnulib-local | |
parent | 3af304e6d6f31fc09d4d5e41b7d7ab0f578a6278 (diff) | |
download | external_gettext-f1097bba9edc19e8b5c00395616823d715a758bd.zip external_gettext-f1097bba9edc19e8b5c00395616823d715a758bd.tar.gz external_gettext-f1097bba9edc19e8b5c00395616823d715a758bd.tar.bz2 |
Fix moopp rules for parallel make.
Diffstat (limited to 'gnulib-local')
-rw-r--r-- | gnulib-local/ChangeLog | 17 | ||||
-rwxr-xr-x | gnulib-local/build-aux/moopp | 15 | ||||
-rw-r--r-- | gnulib-local/modules/fd-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/file-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/html-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/html-styled-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/iconv-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/memory-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/styled-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/term-ostream | 16 | ||||
-rw-r--r-- | gnulib-local/modules/term-styled-ostream | 16 |
12 files changed, 178 insertions, 14 deletions
diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog index 2077113..ac3b037 100644 --- a/gnulib-local/ChangeLog +++ b/gnulib-local/ChangeLog @@ -1,5 +1,22 @@ 2006-12-12 Bruno Haible <bruno@clisp.org> + Fix moopp rules for parallel make. + * build-aux/moopp: Generate source.h first and source.c last. + * modules/ostream (Makefile.am): Rewrite the moopp rule so that all + generated files depend on the generated .h file. + * modules/fd-ostream (Makefile.am): Likewise. + * modules/file-ostream (Makefile.am): Likewise. + * modules/html-ostream (Makefile.am): Likewise. + * modules/iconv-ostream (Makefile.am): Likewise. + * modules/memory-ostream (Makefile.am): Likewise. + * modules/term-ostream (Makefile.am): Likewise. + * modules/styled-ostream (Makefile.am): Likewise. + * modules/html-styled-ostream (Makefile.am): Likewise. + * modules/term-styled-ostream (Makefile.am): Likewise. + Reported by Ralf Wildenhues. + +2006-12-12 Bruno Haible <bruno@clisp.org> + * build-aux/moopp (func_emit_priv_h, func_emit_vt_h, func_emit_source_h, func_emit_source_c): New functions. diff --git a/gnulib-local/build-aux/moopp b/gnulib-local/build-aux/moopp index 9673aae..463e830 100755 --- a/gnulib-local/build-aux/moopp +++ b/gnulib-local/build-aux/moopp @@ -610,16 +610,23 @@ func_emit_source_c () } > "$newfile" } +# Generate the source.h file first. The Makefile.am snippets rely on the +# fact that the other generated files have the same or a newer timestamp. +# +# Also, generate the source.c file last. The Makefile.am snippets don't know +# about the other generated files; they assume that when the source.c file +# is finished, this command is complete. + +new_source_header_file=`echo "$source_header_file_base" | sed -e 's,\.oo\.h$,.h,'` +func_start_creation "$new_source_header_file" +func_emit_source_h "$new_source_header_file" || func_fatal_error "failed" + func_start_creation "${main_classname}.priv.h" func_emit_priv_h "${main_classname}.priv.h" || func_fatal_error "failed" func_start_creation "${main_classname}.vt.h" func_emit_vt_h "${main_classname}.vt.h" || func_fatal_error "failed" -new_source_header_file=`echo "$source_header_file_base" | sed -e 's,\.oo\.h$,.h,'` -func_start_creation "$new_source_header_file" -func_emit_source_h "$new_source_header_file" || func_fatal_error "failed" - new_source_impl_file=`echo "$source_impl_file_base" | sed -e 's,\.oo\.c$,.c,'` func_start_creation "$new_source_impl_file" func_emit_source_c "$new_source_impl_file" || func_fatal_error "failed" diff --git a/gnulib-local/modules/fd-ostream b/gnulib-local/modules/fd-ostream index 1ac8af4..937da5e 100644 --- a/gnulib-local/modules/fd-ostream +++ b/gnulib-local/modules/fd-ostream @@ -17,8 +17,22 @@ configure.ac: Makefile.am: lib_SOURCES += fd-ostream.c -fd-ostream.h fd-ostream.c : $(top_srcdir)/build-aux/moopp fd-ostream.oo.h fd-ostream.oo.c ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +fd-ostream.h : $(top_srcdir)/build-aux/moopp fd-ostream.oo.h fd-ostream.oo.c ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/fd-ostream.oo.c $(srcdir)/fd-ostream.oo.h $(srcdir)/ostream.oo.h +fd-ostream.c : fd-ostream.h + @test -f $@ || { \ + trap 'rm -rf fd-ostream.lock' 1 2 13 15; \ + if mkdir fd-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/fd-ostream.oo.c $(srcdir)/fd-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/fd-ostream.oo.c $(srcdir)/fd-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf fd-ostream.lock; exit $$result; \ + else \ + while test -d fd-ostream.lock; do sleep 1; done; \ + test -f fd-ostream.h; \ + fi; \ + } BUILT_SOURCES += fd-ostream.h fd-ostream.c fd_ostream.priv.h fd_ostream.vt.h CLEANFILES += fd-ostream.h fd-ostream.c fd_ostream.priv.h fd_ostream.vt.h diff --git a/gnulib-local/modules/file-ostream b/gnulib-local/modules/file-ostream index e943b61..9f4906e 100644 --- a/gnulib-local/modules/file-ostream +++ b/gnulib-local/modules/file-ostream @@ -13,8 +13,22 @@ configure.ac: Makefile.am: lib_SOURCES += file-ostream.c -file-ostream.h file-ostream.c : $(top_srcdir)/build-aux/moopp file-ostream.oo.h file-ostream.oo.c ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +file-ostream.h : $(top_srcdir)/build-aux/moopp file-ostream.oo.h file-ostream.oo.c ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/file-ostream.oo.c $(srcdir)/file-ostream.oo.h $(srcdir)/ostream.oo.h +file-ostream.c : file-ostream.h + @test -f $@ || { \ + trap 'rm -rf file-ostream.lock' 1 2 13 15; \ + if mkdir file-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/file-ostream.oo.c $(srcdir)/file-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/file-ostream.oo.c $(srcdir)/file-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf file-ostream.lock; exit $$result; \ + else \ + while test -d file-ostream.lock; do sleep 1; done; \ + test -f file-ostream.h; \ + fi; \ + } BUILT_SOURCES += file-ostream.h file-ostream.c file_ostream.priv.h file_ostream.vt.h CLEANFILES += file-ostream.h file-ostream.c file_ostream.priv.h file_ostream.vt.h diff --git a/gnulib-local/modules/html-ostream b/gnulib-local/modules/html-ostream index 29a3acd..67003d6 100644 --- a/gnulib-local/modules/html-ostream +++ b/gnulib-local/modules/html-ostream @@ -16,8 +16,22 @@ configure.ac: Makefile.am: lib_SOURCES += html-ostream.c -html-ostream.h html-ostream.c : $(top_srcdir)/build-aux/moopp html-ostream.oo.h html-ostream.oo.c ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +html-ostream.h : $(top_srcdir)/build-aux/moopp html-ostream.oo.h html-ostream.oo.c ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/html-ostream.oo.c $(srcdir)/html-ostream.oo.h $(srcdir)/ostream.oo.h +html-ostream.c : html-ostream.h + @test -f $@ || { \ + trap 'rm -rf html-ostream.lock' 1 2 13 15; \ + if mkdir html-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/html-ostream.oo.c $(srcdir)/html-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/html-ostream.oo.c $(srcdir)/html-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf html-ostream.lock; exit $$result; \ + else \ + while test -d html-ostream.lock; do sleep 1; done; \ + test -f html-ostream.h; \ + fi; \ + } BUILT_SOURCES += html-ostream.h html-ostream.c html_ostream.priv.h html_ostream.vt.h CLEANFILES += html-ostream.h html-ostream.c html_ostream.priv.h html_ostream.vt.h diff --git a/gnulib-local/modules/html-styled-ostream b/gnulib-local/modules/html-styled-ostream index 9ac89ba..e8fb5b9 100644 --- a/gnulib-local/modules/html-styled-ostream +++ b/gnulib-local/modules/html-styled-ostream @@ -20,8 +20,22 @@ configure.ac: Makefile.am: lib_SOURCES += html-styled-ostream.c -html-styled-ostream.h html-styled-ostream.c : $(top_srcdir)/build-aux/moopp html-styled-ostream.oo.h html-styled-ostream.oo.c styled-ostream.oo.h ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +html-styled-ostream.h : $(top_srcdir)/build-aux/moopp html-styled-ostream.oo.h html-styled-ostream.oo.c styled-ostream.oo.h ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/html-styled-ostream.oo.c $(srcdir)/html-styled-ostream.oo.h $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h +html-styled-ostream.c : html-styled-ostream.h + @test -f $@ || { \ + trap 'rm -rf html-styled-ostream.lock' 1 2 13 15; \ + if mkdir html-styled-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/html-styled-ostream.oo.c $(srcdir)/html-styled-ostream.oo.h $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/html-styled-ostream.oo.c $(srcdir)/html-styled-ostream.oo.h $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf html-styled-ostream.lock; exit $$result; \ + else \ + while test -d html-styled-ostream.lock; do sleep 1; done; \ + test -f html-styled-ostream.h; \ + fi; \ + } BUILT_SOURCES += html-styled-ostream.h html-styled-ostream.c html_styled_ostream.priv.h html_styled_ostream.vt.h CLEANFILES += html-styled-ostream.h html-styled-ostream.c html_styled_ostream.priv.h html_styled_ostream.vt.h diff --git a/gnulib-local/modules/iconv-ostream b/gnulib-local/modules/iconv-ostream index b297d9d..3d7c8f1 100644 --- a/gnulib-local/modules/iconv-ostream +++ b/gnulib-local/modules/iconv-ostream @@ -18,8 +18,22 @@ configure.ac: Makefile.am: lib_SOURCES += iconv-ostream.c -iconv-ostream.h iconv-ostream.c : $(top_srcdir)/build-aux/moopp iconv-ostream.oo.h iconv-ostream.oo.c ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +iconv-ostream.h : $(top_srcdir)/build-aux/moopp iconv-ostream.oo.h iconv-ostream.oo.c ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/iconv-ostream.oo.c $(srcdir)/iconv-ostream.oo.h $(srcdir)/ostream.oo.h +iconv-ostream.c : iconv-ostream.h + @test -f $@ || { \ + trap 'rm -rf iconv-ostream.lock' 1 2 13 15; \ + if mkdir iconv-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/iconv-ostream.oo.c $(srcdir)/iconv-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/iconv-ostream.oo.c $(srcdir)/iconv-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf iconv-ostream.lock; exit $$result; \ + else \ + while test -d iconv-ostream.lock; do sleep 1; done; \ + test -f iconv-ostream.h; \ + fi; \ + } BUILT_SOURCES += iconv-ostream.h iconv-ostream.c iconv_ostream.priv.h iconv_ostream.vt.h CLEANFILES += iconv-ostream.h iconv-ostream.c iconv_ostream.priv.h iconv_ostream.vt.h diff --git a/gnulib-local/modules/memory-ostream b/gnulib-local/modules/memory-ostream index f3cd514..c92e9c5 100644 --- a/gnulib-local/modules/memory-ostream +++ b/gnulib-local/modules/memory-ostream @@ -17,8 +17,22 @@ configure.ac: Makefile.am: lib_SOURCES += memory-ostream.c -memory-ostream.h memory-ostream.c : $(top_srcdir)/build-aux/moopp memory-ostream.oo.h memory-ostream.oo.c ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +memory-ostream.h : $(top_srcdir)/build-aux/moopp memory-ostream.oo.h memory-ostream.oo.c ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/memory-ostream.oo.c $(srcdir)/memory-ostream.oo.h $(srcdir)/ostream.oo.h +memory-ostream.c : memory-ostream.h + @test -f $@ || { \ + trap 'rm -rf memory-ostream.lock' 1 2 13 15; \ + if mkdir memory-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/memory-ostream.oo.c $(srcdir)/memory-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/memory-ostream.oo.c $(srcdir)/memory-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf memory-ostream.lock; exit $$result; \ + else \ + while test -d memory-ostream.lock; do sleep 1; done; \ + test -f memory-ostream.h; \ + fi; \ + } BUILT_SOURCES += memory-ostream.h memory-ostream.c memory_ostream.priv.h memory_ostream.vt.h CLEANFILES += memory-ostream.h memory-ostream.c memory_ostream.priv.h memory_ostream.vt.h diff --git a/gnulib-local/modules/ostream b/gnulib-local/modules/ostream index 98b0379..389de13 100644 --- a/gnulib-local/modules/ostream +++ b/gnulib-local/modules/ostream @@ -12,8 +12,22 @@ configure.ac: Makefile.am: lib_SOURCES += ostream.c -ostream.h ostream.c : $(top_srcdir)/build-aux/moopp ostream.oo.h ostream.oo.c +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +ostream.h : $(top_srcdir)/build-aux/moopp ostream.oo.h ostream.oo.c $(top_srcdir)/build-aux/moopp $(srcdir)/ostream.oo.c $(srcdir)/ostream.oo.h +ostream.c : ostream.h + @test -f $@ || { \ + trap 'rm -rf ostream.lock' 1 2 13 15; \ + if mkdir ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/ostream.oo.c $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/ostream.oo.c $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf ostream.lock; exit $$result; \ + else \ + while test -d ostream.lock; do sleep 1; done; \ + test -f ostream.h; \ + fi; \ + } BUILT_SOURCES += ostream.h ostream.c ostream.priv.h ostream.vt.h CLEANFILES += ostream.h ostream.c ostream.priv.h ostream.vt.h diff --git a/gnulib-local/modules/styled-ostream b/gnulib-local/modules/styled-ostream index 6570ae9..884192d 100644 --- a/gnulib-local/modules/styled-ostream +++ b/gnulib-local/modules/styled-ostream @@ -12,8 +12,22 @@ configure.ac: Makefile.am: lib_SOURCES += styled-ostream.c -styled-ostream.h styled-ostream.c : $(top_srcdir)/build-aux/moopp styled-ostream.oo.h styled-ostream.oo.c ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +styled-ostream.h : $(top_srcdir)/build-aux/moopp styled-ostream.oo.h styled-ostream.oo.c ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/styled-ostream.oo.c $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h +styled-ostream.c : styled-ostream.h + @test -f $@ || { \ + trap 'rm -rf styled-ostream.lock' 1 2 13 15; \ + if mkdir styled-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/styled-ostream.oo.c $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/styled-ostream.oo.c $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf styled-ostream.lock; exit $$result; \ + else \ + while test -d styled-ostream.lock; do sleep 1; done; \ + test -f styled-ostream.h; \ + fi; \ + } BUILT_SOURCES += styled-ostream.h styled-ostream.c styled_ostream.priv.h styled_ostream.vt.h CLEANFILES += styled-ostream.h styled-ostream.c styled_ostream.priv.h styled_ostream.vt.h diff --git a/gnulib-local/modules/term-ostream b/gnulib-local/modules/term-ostream index 4ece7dd..e7fb881 100644 --- a/gnulib-local/modules/term-ostream +++ b/gnulib-local/modules/term-ostream @@ -23,8 +23,22 @@ gl_TERM_OSTREAM Makefile.am: lib_SOURCES += term-ostream.c -term-ostream.h term-ostream.c : $(top_srcdir)/build-aux/moopp term-ostream.oo.h term-ostream.oo.c ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +term-ostream.h : $(top_srcdir)/build-aux/moopp term-ostream.oo.h term-ostream.oo.c ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/term-ostream.oo.c $(srcdir)/term-ostream.oo.h $(srcdir)/ostream.oo.h +term-ostream.c : term-ostream.h + @test -f $@ || { \ + trap 'rm -rf term-ostream.lock' 1 2 13 15; \ + if mkdir term-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/term-ostream.oo.c $(srcdir)/term-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/term-ostream.oo.c $(srcdir)/term-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf term-ostream.lock; exit $$result; \ + else \ + while test -d term-ostream.lock; do sleep 1; done; \ + test -f term-ostream.h; \ + fi; \ + } BUILT_SOURCES += term-ostream.h term-ostream.c term_ostream.priv.h term_ostream.vt.h CLEANFILES += term-ostream.h term-ostream.c term_ostream.priv.h term_ostream.vt.h diff --git a/gnulib-local/modules/term-styled-ostream b/gnulib-local/modules/term-styled-ostream index 230a88b..1073535 100644 --- a/gnulib-local/modules/term-styled-ostream +++ b/gnulib-local/modules/term-styled-ostream @@ -17,8 +17,22 @@ configure.ac: Makefile.am: lib_SOURCES += term-styled-ostream.c -term-styled-ostream.h term-styled-ostream.c : $(top_srcdir)/build-aux/moopp term-styled-ostream.oo.h term-styled-ostream.oo.c styled-ostream.oo.h ostream.oo.h +# This is a Makefile rule that generates multiple files at once; see the +# automake documentation, node "Multiple Outputs", for details. +term-styled-ostream.h : $(top_srcdir)/build-aux/moopp term-styled-ostream.oo.h term-styled-ostream.oo.c styled-ostream.oo.h ostream.oo.h $(top_srcdir)/build-aux/moopp $(srcdir)/term-styled-ostream.oo.c $(srcdir)/term-styled-ostream.oo.h $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h +term-styled-ostream.c : term-styled-ostream.h + @test -f $@ || { \ + trap 'rm -rf term-styled-ostream.lock' 1 2 13 15; \ + if mkdir term-styled-ostream.lock 2>/dev/null; then \ + echo "$(top_srcdir)/build-aux/moopp $(srcdir)/term-styled-ostream.oo.c $(srcdir)/term-styled-ostream.oo.h $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h"; \ + $(top_srcdir)/build-aux/moopp $(srcdir)/term-styled-ostream.oo.c $(srcdir)/term-styled-ostream.oo.h $(srcdir)/styled-ostream.oo.h $(srcdir)/ostream.oo.h; \ + result=$$?; rm -rf term-styled-ostream.lock; exit $$result; \ + else \ + while test -d term-styled-ostream.lock; do sleep 1; done; \ + test -f term-styled-ostream.h; \ + fi; \ + } BUILT_SOURCES += term-styled-ostream.h term-styled-ostream.c term_styled_ostream.priv.h term_styled_ostream.vt.h CLEANFILES += term-styled-ostream.h term-styled-ostream.c term_styled_ostream.priv.h term_styled_ostream.vt.h |