Remove leftover generated .h files after config.status changed.
[pspp] / modules / iconv-h
index 1c35ecd3e0175a49d6a1652398f3483c07812318..82330f6d0079b9914330f82e12ec7b77ba8b8212 100644 (file)
@@ -15,14 +15,12 @@ configure.ac:
 gl_ICONV_H
 
 Makefile.am:
-nodist_pkginclude_HEADERS += $(ICONV_H)
-EXTRA_HEADERS += iconv.h
-
 BUILT_SOURCES += $(ICONV_H)
 
 # We need the following in order to create <iconv.h> when the system
 # doesn't have one that works with the given compiler.
-iconv.h: iconv.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+if GL_GENERATE_ICONV_H
+iconv.h: iconv.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
          sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
@@ -40,6 +38,10 @@ iconv.h: iconv.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
              < $(srcdir)/iconv.in.h; \
        } > $@-t && \
        mv $@-t $@
+else
+iconv.h: $(top_builddir)/config.status
+       rm -f $@
+endif
 MOSTLYCLEANFILES += iconv.h iconv.h-t
 
 Include: