Remove leftover generated .h files after config.status changed.
[gnulib.git] / modules / stddef
index 62e874a..94b57da 100644 (file)
@@ -13,14 +13,12 @@ configure.ac:
 gl_STDDEF_H
 
 Makefile.am:
-nodist_pkginclude_HEADERS += $(STDDEF_H)
-EXTRA_HEADERS += stddef.h
-
 BUILT_SOURCES += $(STDDEF_H)
 
 # We need the following in order to create <stddef.h> when the system
 # doesn't have one that works with the given compiler.
-stddef.h: stddef.in.h
+if GL_GENERATE_STDDEF_H
+stddef.h: stddef.in.h $(top_builddir)/config.status
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@@ -32,6 +30,10 @@ stddef.h: stddef.in.h
              < $(srcdir)/stddef.in.h; \
        } > $@-t && \
        mv $@-t $@
+else
+stddef.h: $(top_builddir)/config.status
+       rm -f $@
+endif
 MOSTLYCLEANFILES += stddef.h stddef.h-t
 
 Include: