POSIX only allows $< in inference rules, so avoid it for these target
rules.
Also, add a header to the generated spec files to remind developers that
they are generated.
---
Makefile.am | 1 +
rhel/automake.mk | 9 ++++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 5e449d6..476f18f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,6 +82,7 @@ EXTRA_DIST += \
soexpand.pl
ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */'
+ro_shell = printf '\043 Generated automatically -- do not modify! -*-
buffer-read-only: t -*-\n'
SUFFIXES += .in
.in:
diff --git a/rhel/automake.mk b/rhel/automake.mk
index d4d5961..21f28c6 100644
--- a/rhel/automake.mk
+++ b/rhel/automake.mk
@@ -20,11 +20,14 @@ EXTRA_DIST += \
$(srcdir)/rhel/openvswitch-kmod-rhel5.spec:
rhel/openvswitch-kmod-rhel5.spec.in $(top_builddir)/config.status
- sed -e 's,[@]VERSION[@],$(VERSION),g' < $< > $@
+ ($(ro_shell) && sed -e 's,[@]VERSION[@],$(VERSION),g') \
+ < $(srcdir)/rhel/openvswitch-kmod-rhel5.spec.in > $@
$(srcdir)/rhel/openvswitch-kmod-rhel6.spec:
rhel/openvswitch-kmod-rhel6.spec.in $(top_builddir)/config.status
-
- sed -e 's,[@]VERSION[@],$(VERSION),g' < $< > $@
+ ($(ro_shell) && sed -e 's,[@]VERSION[@],$(VERSION),g') \
+ < $(srcdir)/rhel/openvswitch-kmod-rhel6.spec.in > $@
$(srcdir)/rhel/openvswitch.spec: rhel/openvswitch.spec.in
$(top_builddir)/config.status
sed -e 's,[@]VERSION[@],$(VERSION),g' < $< > $@
+ ($(ro_shell) && sed -e 's,[@]VERSION[@],$(VERSION),g') \
+ < $(srcdir)/rhel/openvswitch.spec.in > $@
--
1.7.4.4
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev