summaryrefslogtreecommitdiffstats
path: root/m4/acinclude.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/acinclude.m4')
-rw-r--r--m4/acinclude.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/m4/acinclude.m4 b/m4/acinclude.m4
new file mode 100644
index 0000000..130276e
--- /dev/null
+++ b/m4/acinclude.m4
@@ -0,0 +1,16 @@
+dnl m4_syscmd is executed when aclocal is run
+m4_syscmd([cat - > makefile.top.am <<'EOF_'
+AUTOMAKE_OPTIONS=foreign
+SUBDIRS=@the_subdirs@
+# When making a distribution we only want to
+# recurse into (any) one single BSP subdir.
+DIST_SUBDIRS=@the_distsub@
+
+# The dist-hook then removes this extra
+# directory level again.
+dist-hook:
+ if test "$(PACKAGE_VERSION)" = "untagged" ; then echo "Need tagged version to cut distribution"; exit 1; fi
+ cp -frl $(distdir)/$(DIST_SUBDIRS)/* $(distdir)
+ rm -fr $(distdir)/$(DIST_SUBDIRS)
+EOF_
+])