Use automatic variable in Makefile
authorNed Bass <bass6@llnl.gov>
Thu, 22 Sep 2011 22:36:42 +0000 (15:36 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 26 Sep 2011 16:22:30 +0000 (09:22 -0700)
As written, the $(init_SCRIPTS) rule in etc/init.d/Makefule.am
would not work as expected if the init_SCRIPTS variable were
to contain any elements other than zfs.  Fix this by replacing
the hard-coded 'zfs' reference with $@.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #410

etc/init.d/Makefile.am
etc/init.d/Makefile.in

index 94a2168..c1b131b 100644 (file)
@@ -16,7 +16,7 @@ $(init_SCRIPTS):
                -e 's,@udevruledir\@,$(udevruledir),g' \
                -e 's,@sysconfdir\@,$(sysconfdir),g' \
                -e 's,@initdir\@,$(initdir),g' \
-               'zfs.$(DEFAULT_INIT_SCRIPT).in' >'$@'
+               '$@.$(DEFAULT_INIT_SCRIPT).in' >'$@'
 
 distclean-local::
        -$(RM) $(init_SCRIPTS)
index 32c73dc..a639233 100644 (file)
@@ -531,7 +531,7 @@ $(init_SCRIPTS):
                -e 's,@udevruledir\@,$(udevruledir),g' \
                -e 's,@sysconfdir\@,$(sysconfdir),g' \
                -e 's,@initdir\@,$(initdir),g' \
-               'zfs.$(DEFAULT_INIT_SCRIPT).in' >'$@'
+               '$@.$(DEFAULT_INIT_SCRIPT).in' >'$@'
 
 distclean-local::
        -$(RM) $(init_SCRIPTS)