summaryrefslogtreecommitdiffstats
path: root/manuals_and_examples/Makefile.am
diff options
context:
space:
mode:
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