summaryrefslogtreecommitdiff
path: root/cpp/src/make-gen-src-mk.sh
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-04-03 21:56:22 +0000
committerAlan Conway <aconway@apache.org>2007-04-03 21:56:22 +0000
commit267e3b409fa20b19c4c851349cd205bfcb41ced5 (patch)
tree172f44fd3212d5f5b77c6f408c8c24fc745006f1 /cpp/src/make-gen-src-mk.sh
parent0184b49a6c2f0e3174b8b5ac5e33342123737a14 (diff)
downloadqpid-python-267e3b409fa20b19c4c851349cd205bfcb41ced5.tar.gz
* Remove redundant Makefile.am, not needed with single src/ makefile.
* Fixed automake warnings. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@525297 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/make-gen-src-mk.sh')
-rwxr-xr-xcpp/src/make-gen-src-mk.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/src/make-gen-src-mk.sh b/cpp/src/make-gen-src-mk.sh
new file mode 100755
index 0000000000..0a6dd3e326
--- /dev/null
+++ b/cpp/src/make-gen-src-mk.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Generates the gen-src.mk makefile fragment, to stdout.
+# Usage: <gentools_dir> <gentools_srcdir>
+
+gentools_dir=$1
+gentools_srcdir=$2
+
+wildcard() { echo `ls $* 2>/dev/null` ; }
+
+cat <<EOF
+generated_sources = `wildcard gen/*.cpp`
+
+generated_headers = `wildcard gen/*.h`
+
+if CAN_GENERATE_CODE
+
+java_sources = `wildcard $gentools_srcdir/*.java`
+
+cxx_templates = `wildcard $gentools_dir/templ.cpp/*.tmpl`
+
+# Empty rules in case one of these files is removed,
+# renamed or no longer generated.
+\$(spec):
+\$(java_sources):
+\$(cxx_templates):
+endif
+
+EOF
+
+