diff --git a/.gitignore b/.gitignore index 5a035eb4c..c3669d44c 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,8 @@ src/test-recorder src/test-recorder.ogg src/test-theme src/st.h +src/stamp-st.h +src/stamp-st.h.tmp stamp-h1 tests/run-test.sh xmldocs.make diff --git a/src/Makefile-st.am b/src/Makefile-st.am index 4d5d5476e..579223526 100644 --- a/src/Makefile-st.am +++ b/src/Makefile-st.am @@ -100,11 +100,16 @@ st_source_h = \ st/st-widget.h \ $(NULL) -st.h: Makefile +st.h: stamp-st.h + @true +stamp-st.h: Makefile $(AM_V_GEN) (echo "#define ST_H_INSIDE 1"; \ for name in $(st_source_h); do \ echo "#include <"$$name">"; \ - done; echo "#undef ST_H_INSIDE") > st.h.tmp && mv st.h.tmp st.h + done; echo "#undef ST_H_INSIDE") > $@.tmp && \ + (cmp -s $@.tmp st.h || cp $@.tmp st.h) && \ + rm -f $@.tmp && \ + echo timestamp > $(@F) BUILT_SOURCES += st.h