Skip to content

Commit

Permalink
Restore :: in Makefile.am
Browse files Browse the repository at this point in the history
The double-colon looked like a typo, but it's actually an obscure
feature. Rules with :: may appear multiple times and are run
independently of one another in the order they appear. The use of ::
for distclean-local was conventional, not accidental.

Add comments to indicate the intentional use of double-colon rules.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9210
  • Loading branch information
Ryan Moeller authored and behlendorf committed Aug 26, 2019
1 parent 95f0144 commit 142f84d
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ gitrev:

BUILT_SOURCES = gitrev

distclean-local:
# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) -R autom4te*.cache
-find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
-o -name .pc -o -name .hg -o -name .git \) -prune -o \
Expand Down
2 changes: 2 additions & 0 deletions contrib/dracut/02zfsexpandknowledge/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ $(pkgdracut_SCRIPTS):%:%.in
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< >'$@'

# Double-colon rules are allowed; there are multiple independent definitions.
clean-local::
-$(RM) $(pkgdracut_SCRIPTS)

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(pkgdracut_SCRIPTS)
1 change: 1 addition & 0 deletions contrib/dracut/90zfs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ $(pkgdracut_SCRIPTS) $(pkgdracut_DATA) :%:%.in
-e 's,@mounthelperdir\@,$(mounthelperdir),g' \
$< >'$@'

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(pkgdracut_SCRIPTS) $(pkgdracut_DATA)
2 changes: 2 additions & 0 deletions contrib/initramfs/hooks/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ $(hooks_SCRIPTS):%:%.in
-e 's,@mounthelperdir\@,$(mounthelperdir),g' \
$< >'$@'

# Double-colon rules are allowed; there are multiple independent definitions.
clean-local::
-$(RM) $(hooks_SCRIPTS)

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(hooks_SCRIPTS)
2 changes: 2 additions & 0 deletions contrib/initramfs/scripts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ $(scripts_DATA):%:%.in
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< >'$@'

# Double-colon rules are allowed; there are multiple independent definitions.
clean-local::
-$(RM) $(scripts_SCRIPTS)

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(scripts_SCRIPTS)
1 change: 1 addition & 0 deletions etc/init.d/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@ $(init_SCRIPTS) $(initconf_SCRIPTS) $(initcommon_SCRIPTS):%:%.in
[ '$@' = 'zfs-functions' -o '$@' = 'zfs' ] || \
chmod +x '$@')

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(init_SCRIPTS) $(initcommon_SCRIPTS) $(initconf_SCRIPTS)
1 change: 1 addition & 0 deletions etc/modules-load.d/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ $(modulesload_DATA):%:%.in
-e '' \
$< >'$@'

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(modulesload_DATA)
1 change: 1 addition & 0 deletions etc/systemd/system-generators/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ $(systemdgenerator_SCRIPTS): %: %.in
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< >'$@'

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(systemdgenerator_SCRIPTS)
1 change: 1 addition & 0 deletions etc/systemd/system/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ install-data-hook:
$(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
ln -sf /dev/null "$(DESTDIR)$(systemdunitdir)/zfs-import.service"

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(systemdunit_DATA) $(systemdpreset_DATA)
1 change: 1 addition & 0 deletions tests/zfs-tests/include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ $(nodist_pkgdata_DATA): %: %.in
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< >'$@'

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) default.cfg
1 change: 1 addition & 0 deletions tests/zfs-tests/tests/functional/pyzfs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ $(pkgpyzfs_SCRIPTS):%:%.in
$< >'$@'
-chmod 775 $@

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(pkgpyzfs_SCRIPTS)
1 change: 1 addition & 0 deletions udev/rules.d/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ $(udevrule_DATA):%:%.in
-e 's,@sysconfdir\@,$(sysconfdir),g' \
$< > '$@'

# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
-$(RM) $(udevrule_DATA)

0 comments on commit 142f84d

Please sign in to comment.