]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make the config.h rule more robust.
authorBruno Haible <bruno@clisp.org>
Thu, 26 Oct 2006 11:47:52 +0000 (11:47 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:14 +0000 (12:14 +0200)
gettext-tools/libgettextpo/ChangeLog
gettext-tools/libgettextpo/Makefile.am

index c0282a92306f24a45dee089858635a0c56e1078a..f011e00fac264520bce55257df34c6a4f3d4b46f 100644 (file)
@@ -2,6 +2,11 @@
 
        * gettext-0.16 released.
 
+2006-10-25  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.am (config.h): If one of the three steps fails, remove
+       config.h and fail.
+
 2006-10-24  Bruno Haible  <bruno@clisp.org>
 
        * Makefile.am (AM_CPPFLAGS): Add also $(top_srcdir). Needed so that
index d8444bd9a92099ef9d14a60021b1e1f7c3c714cd..3b459e00d4386b0c5b6bdac82ddedcfead776df0 100644 (file)
@@ -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