Skip to content

Commit

Permalink
rhel: Fix use of $< in ordinary Make rules.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
blp committed Jul 25, 2011
1 parent 3e42dfd commit cbaa4ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 6 additions & 4 deletions rhel/automake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ 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 > $@

0 comments on commit cbaa4ff

Please sign in to comment.