From 142f84dd19f20b47157bbbf45aaba489b6577c88 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Mon, 26 Aug 2019 14:48:31 -0400 Subject: [PATCH] Restore :: in Makefile.am 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 Signed-off-by: Ryan Moeller Closes #9210 --- Makefile.am | 3 ++- contrib/dracut/02zfsexpandknowledge/Makefile.am | 2 ++ contrib/dracut/90zfs/Makefile.am | 1 + contrib/initramfs/hooks/Makefile.am | 2 ++ contrib/initramfs/scripts/Makefile.am | 2 ++ etc/init.d/Makefile.am | 1 + etc/modules-load.d/Makefile.am | 1 + etc/systemd/system-generators/Makefile.am | 1 + etc/systemd/system/Makefile.am | 1 + tests/zfs-tests/include/Makefile.am | 1 + tests/zfs-tests/tests/functional/pyzfs/Makefile.am | 1 + udev/rules.d/Makefile.am | 1 + 12 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index da4f6407d..3992fe9ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/contrib/dracut/02zfsexpandknowledge/Makefile.am b/contrib/dracut/02zfsexpandknowledge/Makefile.am index a5c567c16..6e553e8d4 100644 --- a/contrib/dracut/02zfsexpandknowledge/Makefile.am +++ b/contrib/dracut/02zfsexpandknowledge/Makefile.am @@ -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) diff --git a/contrib/dracut/90zfs/Makefile.am b/contrib/dracut/90zfs/Makefile.am index 0a557f57f..1680230fa 100644 --- a/contrib/dracut/90zfs/Makefile.am +++ b/contrib/dracut/90zfs/Makefile.am @@ -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) diff --git a/contrib/initramfs/hooks/Makefile.am b/contrib/initramfs/hooks/Makefile.am index 1735872c2..3d8ef627e 100644 --- a/contrib/initramfs/hooks/Makefile.am +++ b/contrib/initramfs/hooks/Makefile.am @@ -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) diff --git a/contrib/initramfs/scripts/Makefile.am b/contrib/initramfs/scripts/Makefile.am index 12c2641b8..3ab18ba2c 100644 --- a/contrib/initramfs/scripts/Makefile.am +++ b/contrib/initramfs/scripts/Makefile.am @@ -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) diff --git a/etc/init.d/Makefile.am b/etc/init.d/Makefile.am index 93432386a..8b1a7cf96 100644 --- a/etc/init.d/Makefile.am +++ b/etc/init.d/Makefile.am @@ -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) diff --git a/etc/modules-load.d/Makefile.am b/etc/modules-load.d/Makefile.am index 58c7acd44..47762b7d0 100644 --- a/etc/modules-load.d/Makefile.am +++ b/etc/modules-load.d/Makefile.am @@ -9,5 +9,6 @@ $(modulesload_DATA):%:%.in -e '' \ $< >'$@' +# Double-colon rules are allowed; there are multiple independent definitions. distclean-local:: -$(RM) $(modulesload_DATA) diff --git a/etc/systemd/system-generators/Makefile.am b/etc/systemd/system-generators/Makefile.am index c730982a5..b4df01322 100644 --- a/etc/systemd/system-generators/Makefile.am +++ b/etc/systemd/system-generators/Makefile.am @@ -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) diff --git a/etc/systemd/system/Makefile.am b/etc/systemd/system/Makefile.am index 130c6c757..4e14467a0 100644 --- a/etc/systemd/system/Makefile.am +++ b/etc/systemd/system/Makefile.am @@ -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) diff --git a/tests/zfs-tests/include/Makefile.am b/tests/zfs-tests/include/Makefile.am index 41e105287..86c387c67 100644 --- a/tests/zfs-tests/include/Makefile.am +++ b/tests/zfs-tests/include/Makefile.am @@ -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 diff --git a/tests/zfs-tests/tests/functional/pyzfs/Makefile.am b/tests/zfs-tests/tests/functional/pyzfs/Makefile.am index 0a27adecc..c4cd10894 100644 --- a/tests/zfs-tests/tests/functional/pyzfs/Makefile.am +++ b/tests/zfs-tests/tests/functional/pyzfs/Makefile.am @@ -14,5 +14,6 @@ $(pkgpyzfs_SCRIPTS):%:%.in $< >'$@' -chmod 775 $@ +# Double-colon rules are allowed; there are multiple independent definitions. distclean-local:: -$(RM) $(pkgpyzfs_SCRIPTS) diff --git a/udev/rules.d/Makefile.am b/udev/rules.d/Makefile.am index f79ea4b3c..86c33fc69 100644 --- a/udev/rules.d/Makefile.am +++ b/udev/rules.d/Makefile.am @@ -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)