From: Bruno Haible Date: Thu, 26 Oct 2006 11:47:52 +0000 (+0000) Subject: Make the config.h rule more robust. X-Git-Tag: 0.16.x-branchpoint~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3adfc61fef2ca462f157b2937d41caeec94b88d;p=thirdparty%2Fgettext.git Make the config.h rule more robust. --- diff --git a/gettext-tools/libgettextpo/ChangeLog b/gettext-tools/libgettextpo/ChangeLog index c0282a923..f011e00fa 100644 --- a/gettext-tools/libgettextpo/ChangeLog +++ b/gettext-tools/libgettextpo/ChangeLog @@ -2,6 +2,11 @@ * gettext-0.16 released. +2006-10-25 Bruno Haible + + * Makefile.am (config.h): If one of the three steps fails, remove + config.h and fail. + 2006-10-24 Bruno Haible * Makefile.am (AM_CPPFLAGS): Add also $(top_srcdir). Needed so that diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am index d8444bd9a..3b459e00d 100644 --- a/gettext-tools/libgettextpo/Makefile.am +++ b/gettext-tools/libgettextpo/Makefile.am @@ -124,8 +124,8 @@ config.h: echo '#define DLL_VARIABLE'; \ echo; \ echo '#endif /* GTPO_CONFIG_H */'; \ - } > config.h; \ - $(MAKE) $(BUILT_SOURCES) || { rm -f config.h; exit 1; }; \ + } > config.h && \ + { $(MAKE) $(BUILT_SOURCES) || { rm -f config.h; exit 1; }; } && \ if test -n "$(HAVE_GLOBAL_SYMBOL_PIPE)"; then \ { \ for f in $(libgettextpo_la_AUXSOURCES) $(libgnu_la_SOURCES) $(libgnu_la_LIBADD); do \ @@ -142,8 +142,14 @@ config.h: } 5>&1 \ | sed -e 's,.* ,,' | LC_ALL=C sort | LC_ALL=C uniq \ | sed -e 's,^obstack_free$$,__obstack_free,' \ - | sed -e 's,^\(.*\)$$,#define \1 libgettextpo_\1,' > config.h-t; \ - cat config.h-t >> config.h; \ + | sed -e 's,^\(.*\)$$,#define \1 libgettextpo_\1,' > config.h-t && \ + if test -f config.h; then \ + cat config.h-t >> config.h; \ + rm -f config.h-t; \ + else \ + rm -f config.h-t; \ + exit 1; \ + fi \ fi MOSTLYCLEANFILES += config.h config.h-t