diff --git a/Makefile.am b/Makefile.am index b9c6b65..f138690 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,6 @@ endif if BUILD_TEST SUBDIRS += test endif -DIST_SUBDIRS = src data doc CLEANFILES = $(PACKAGE).spec @@ -27,14 +26,19 @@ EXTRA_DIST = AUTHORS COPYING COPYING-PLAIN \ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(PACKAGE).pc +dist-hook: $(top_builddir)/$(PACKAGE).spec + if [ -s $(distdir)/test/Makefile.am ]; then \ + rm -f $(distdir)/test/*.*; \ + touch $(distdir)/test/Makefile.am; \ + cd $(top_srcdir) && $(AUTOMAKE) --foreign $(abs_builddir)/$(distdir)/test/Makefile; \ + fi + if SRC_IS_GIT RPM_RELEASE=`echo -n "1.%(date '+%y%m%d').git"; git rev-parse --short=8 HEAD` else RPM_RELEASE=`echo -n "1.%(date '+%y%m%d')"` endif -dist-hook: $(top_builddir)/$(PACKAGE).spec - $(top_builddir)/$(PACKAGE).spec: FORCE sed "s/\@PACKAGE\@/@PACKAGE@/;s/\@VERSION\@/@VERSION@/;s/\@RPM_RELEASE\@/$(RPM_RELEASE)/" \ $(top_srcdir)/$(PACKAGE).spec.in > $@ diff --git a/configure.ac b/configure.ac index 4001d3b..e825438 100644 --- a/configure.ac +++ b/configure.ac @@ -280,6 +280,7 @@ src/bin/Makefile src/modules/Makefile src/modules/filters/Makefile src/modules/loaders/Makefile +test/Makefile data/Makefile data/fonts/Makefile data/images/Makefile @@ -288,7 +289,6 @@ doc/Doxyfile doc/imlib2_intro.dox README ]) -AM_COND_IF([SRC_IS_GIT], [ AC_CONFIG_FILES([test/Makefile]) ]) AC_OUTPUT #####################################################################