From cbaa4ffe9b72904a7dad8ba23fa13cf2783b26c9 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 25 Jul 2011 16:15:18 -0700 Subject: [PATCH] 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. --- Makefile.am | 1 + rhel/automake.mk | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 5e449d6d3..91218e14a 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 d4d59613e..34abe5b9d 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 > $@ -- 2.43.0