From: Ben Pfaff Date: Mon, 25 Jul 2011 23:15:18 +0000 (-0700) Subject: rhel: Fix use of $< in ordinary Make rules. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbaa4ffe9b72904a7dad8ba23fa13cf2783b26c9;p=openvswitch rhel: Fix use of $< in ordinary Make rules. 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. --- diff --git a/Makefile.am b/Makefile.am index 5e449d6d..91218e14 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 d4d59613..34abe5b9 100644 --- a/rhel/automake.mk +++ b/rhel/automake.mk @@ -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 > $@