summaryrefslogtreecommitdiff
path: root/cpp/gen/make-gen-src-mk.sh
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-01-25 16:45:48 +0000
committerAlan Conway <aconway@apache.org>2007-01-25 16:45:48 +0000
commit62d0b170d8a7c29ec3a00b3af9cc5b43dccf2db4 (patch)
treedf1a48d5c98bbf3bbeb75a998e09df4febb08c57 /cpp/gen/make-gen-src-mk.sh
parentf5038f13d14d99e2b96482e3536ce3312703a56b (diff)
downloadqpid-python-62d0b170d8a7c29ec3a00b3af9cc5b43dccf2db4.tar.gz
* qpidc.spec.in: updated to release 3 for RPM.
* gen/make-gen-src-mk.sh: fixed problem with makefile generation in a new checkout. * Other Makefile.am: added missing files to maintainer-clean. * Added missing svn-ignores. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@499845 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/gen/make-gen-src-mk.sh')
-rwxr-xr-xcpp/gen/make-gen-src-mk.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/cpp/gen/make-gen-src-mk.sh b/cpp/gen/make-gen-src-mk.sh
new file mode 100755
index 0000000000..08eb8ea134
--- /dev/null
+++ b/cpp/gen/make-gen-src-mk.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Generate 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 *.cpp`
+
+generated_headers = `wildcard *.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
+
+