summaryrefslogtreecommitdiffstats
path: root/manuals_and_examples/Makefile.am
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2011-03-05 14:18:25 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2011-03-07 20:57:37 +0100
commitfef5564a64870ce438d0b1185df521fd54126171 (patch)
tree1bb7f08dbbb9d954cdf416ac9b7015c460ffaa37 /manuals_and_examples/Makefile.am
parentd261ea3db63beaf5581c46afcb6c7e297a8010fb (diff)
downloadrasdaman-upstream-fef5564a64870ce438d0b1185df521fd54126171.tar.gz
rasdaman-upstream-fef5564a64870ce438d0b1185df521fd54126171.tar.xz
rasdaman-upstream-fef5564a64870ce438d0b1185df521fd54126171.zip
build: Change dubious wildcard stuff to use +=
Also make sure that the list of files is updated on "make dist".
Diffstat (limited to 'manuals_and_examples/Makefile.am')
-rw-r--r--manuals_and_examples/Makefile.am19
1 files changed, 16 insertions, 3 deletions
diff --git a/manuals_and_examples/Makefile.am b/manuals_and_examples/Makefile.am
index 9d50775..ee89bc1 100644
--- a/manuals_and_examples/Makefile.am
+++ b/manuals_and_examples/Makefile.am
@@ -21,9 +21,22 @@
# or contact Peter Baumann via <baumann@rasdaman.com>.
####################################################################
-nobase_dist_pkgdata_DATA=examples/images/* examples/c++/* \
- examples/java/* examples/queries/* \
- examples/rasdl/basictypes.dl
+nobase_dist_pkgdata_DATA =
+include $(srcdir)/example-files.mk
+
+dist-hook:
+ (echo "# DO NOT MODIFY THIS FILE"; \
+ echo "# This file was autogenerated by the dist-hook target"; \
+ cd $(srcdir) && \
+ find examples -type f -not -name '.*' \
+ ) | $(SED) 's,^\([^#]\),nobase_dist_pkgdata_DATA += \1,' \
+ > example-files.mk.new
+ if test -f "$(srcdir)/example-files.mk" \
+ && cmp "example-files.mk.new" "$(srcdir)/example-files.mk"; then \
+ rm -f "example-files.mk.new"; \
+ else \
+ mv -f "example-files.mk.new" "$(srcdir)/example-files.mk"; \
+ fi
dest_Makefile=$(DESTDIR)$(pkgdatadir)/examples/c++/Makefile