From a888044525d9f03290cc1afe62dcfa3bec4bc0b9 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 19 Oct 2020 11:40:56 +0200 Subject: Cleanup: Automake: remove single use variables Throughout the Automake files, there is a consistent pattern somewhat like this: FOO_BINS = .... sbin_PROGRAMS += $(FOO_BINS) This commit all such patterns whenever the variable is not used anywhere else and appends to the target directly. Signed-off-by: David Oberhollenzer --- Makefile.am | 7 +------ jffsX-utils/Makemodule.am | 15 +++------------ misc-utils/Makemodule.am | 15 ++++----------- nand-utils/Makemodule.am | 5 +---- nor-utils/Makemodule.am | 5 +---- tests/checkfs/Makemodule.am | 5 +---- tests/jittertest/Makemodule.am | 5 +---- tests/unittests/Makemodule.am | 5 +---- ubi-utils/Makemodule.am | 10 +++------- ubifs-utils/Makemodule.am | 10 ++-------- 10 files changed, 18 insertions(+), 64 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8a169fb..ce8fc89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,12 +38,7 @@ dist_man1_MANS = dist_man8_MANS = TESTS = -EXTRA_DIST = - -GLOBAL_EXTRA = \ - COPYING - -EXTRA_DIST += $(GLOBAL_EXTRA) +EXTRA_DIST = COPYING include lib/Makemodule.am include ubi-utils/Makemodule.am diff --git a/jffsX-utils/Makemodule.am b/jffsX-utils/Makemodule.am index 64a969d..96389f6 100644 --- a/jffsX-utils/Makemodule.am +++ b/jffsX-utils/Makemodule.am @@ -27,16 +27,7 @@ jffs2dump_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) sumtool_SOURCES = jffsX-utils/sumtool.c jffsX-utils/summary.h sumtool_LDADD = libmtd.a -JFFSX_BINS = \ - mkfs.jffs2 jffs2dump jffs2reader sumtool +EXTRA_DIST += jffsX-utils/device_table.txt jffsX-utils/mkfs.jffs2.1 -JFFSX_MAN = \ - jffsX-utils/mkfs.jffs2.1 - -JFFSX_EXTRA = \ - jffsX-utils/device_table.txt jffsX-utils/mkfs.jffs2.1 - -EXTRA_DIST += $(JFFSX_EXTRA) - -dist_man1_MANS += $(JFFSX_MAN) -sbin_PROGRAMS += $(JFFSX_BINS) +dist_man1_MANS += jffsX-utils/mkfs.jffs2.1 +sbin_PROGRAMS += mkfs.jffs2 jffs2dump jffs2reader sumtool diff --git a/misc-utils/Makemodule.am b/misc-utils/Makemodule.am index 50703b6..b15c119 100644 --- a/misc-utils/Makemodule.am +++ b/misc-utils/Makemodule.am @@ -39,7 +39,7 @@ flashcp_SOURCES = misc-utils/flashcp.c flash_erase_SOURCES = misc-utils/flash_erase.c flash_erase_LDADD = libmtd.a -MISC_BINS = \ +sbin_PROGRAMS += \ ftl_format doc_loadbios ftl_check mtd_debug docfdisk \ serve_image recv_image fectest flash_erase flash_lock \ flash_unlock flash_otp_info flash_otp_dump flash_otp_lock \ @@ -48,22 +48,15 @@ MISC_BINS = \ MISC_SH = \ misc-utils/flash_eraseall -MISC_EXTRA = \ - misc-utils/MAKEDEV - -MISC_MAN = - if BUILD_LSMTD lsmtd_SOURCES = misc-utils/lsmtd.c misc-utils/lsmtd_scan.c misc-utils/lsmtd.h lsmtd_LDADD = libmtd.a libubi.a lsmtd_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/misc-utils -MISC_BINS += lsmtd -MISC_MAN += misc-utils/lsmtd.8 +sbin_PROGRAMS += lsmtd +dist_man8_MANS += misc-utils/lsmtd.8 endif -EXTRA_DIST += $(MISC_EXTRA) $(MISC_SH) +EXTRA_DIST += misc-utils/MAKEDEV $(MISC_SH) -dist_man8_MANS += $(MISC_MAN) -sbin_PROGRAMS += $(MISC_BINS) sbin_SCRIPTS += $(MISC_SH) diff --git a/nand-utils/Makemodule.am b/nand-utils/Makemodule.am index 439b37d..1cb69dc 100644 --- a/nand-utils/Makemodule.am +++ b/nand-utils/Makemodule.am @@ -18,15 +18,12 @@ nftl_format_LDADD = libmtd.a nandflipbits_SOURCES = nand-utils/nandflipbits.c nandflipbits_LDADD = libmtd.a -NAND_BINS = \ - nanddump nandwrite nandtest nftldump nftl_format nandflipbits - NAND_SH = \ nand-utils/load_nandsim.sh EXTRA_DIST += $(NAND_SH) -sbin_PROGRAMS += $(NAND_BINS) +sbin_PROGRAMS += nanddump nandwrite nandtest nftldump nftl_format nandflipbits if BUILD_TESTS if INSTALL_TESTS diff --git a/nor-utils/Makemodule.am b/nor-utils/Makemodule.am index ef46cf8..441a72e 100644 --- a/nor-utils/Makemodule.am +++ b/nor-utils/Makemodule.am @@ -4,7 +4,4 @@ rfddump_LDADD = libmtd.a rfdformat_SOURCES = nor-utils/rfdformat.c rfdformat_LDADD = libmtd.a -NOR_BINS = \ - rfddump rfdformat - -sbin_PROGRAMS += $(NOR_BINS) +sbin_PROGRAMS += rfddump rfdformat diff --git a/tests/checkfs/Makemodule.am b/tests/checkfs/Makemodule.am index 64ab869..9f91373 100644 --- a/tests/checkfs/Makemodule.am +++ b/tests/checkfs/Makemodule.am @@ -8,10 +8,7 @@ makefiles_CPPFLAGS = $(AM_CPPFLAGS) CHECKFS_BINS = \ makefiles checkfs -CHECKFS_EXTRA = \ - tests/checkfs/README - -EXTRA_DIST += $(CHECKFS_EXTRA) +EXTRA_DIST += tests/checkfs/README if INSTALL_TESTS pkglibexec_PROGRAMS += $(CHECKFS_BINS) diff --git a/tests/jittertest/Makemodule.am b/tests/jittertest/Makemodule.am index d4cc121..4698365 100644 --- a/tests/jittertest/Makemodule.am +++ b/tests/jittertest/Makemodule.am @@ -10,10 +10,7 @@ JITTEREST_BINS = \ JITTERTEST_SH = \ tests/jittertest/filljffs2.sh -JITTERTEST_EXTRA = \ - tests/jittertest/README - -EXTRA_DIST += $(JITTERTEST_EXTRA) $(JITTERTEST_SH) +EXTRA_DIST += tests/jittertest/README $(JITTERTEST_SH) if INSTALL_TESTS pkglibexec_SCRIPTS += $(JITTERTEST_SH) diff --git a/tests/unittests/Makemodule.am b/tests/unittests/Makemodule.am index cadd1bc..277cac2 100644 --- a/tests/unittests/Makemodule.am +++ b/tests/unittests/Makemodule.am @@ -14,10 +14,7 @@ TEST_BINS = \ ubilib_test \ mtdlib_test -UNITTEST_EXTRA = \ - tests/unittests/sysfs_mock - -EXTRA_DIST += $(UNITTEST_EXTRA) +EXTRA_DIST += tests/unittests/sysfs_mock TESTS += $(TEST_BINS) check_PROGRAMS += $(TEST_BINS) diff --git a/ubi-utils/Makemodule.am b/ubi-utils/Makemodule.am index 00d5d8f..7491a8a 100644 --- a/ubi-utils/Makemodule.am +++ b/ubi-utils/Makemodule.am @@ -42,17 +42,13 @@ ubihealthd_SOURCES = ubi-utils/ubihealthd.c ubihealthd_LDADD = libmtd.a libubi.a endif -UBI_BINS = \ +sbin_PROGRAMS += \ ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \ ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol ubiblock if WITH_GETRANDOM -UBI_BINS += ubihealthd +sbin_PROGRAMS += ubihealthd endif -UBI_MAN = \ - ubi-utils/ubinize.8 +dist_man8_MANS += ubi-utils/ubinize.8 -dist_man8_MANS += $(UBI_MAN) - -sbin_PROGRAMS += $(UBI_BINS) diff --git a/ubifs-utils/Makemodule.am b/ubifs-utils/Makemodule.am index feedb7c..6814d47 100644 --- a/ubifs-utils/Makemodule.am +++ b/ubifs-utils/Makemodule.am @@ -31,14 +31,8 @@ mkfs_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUI mkfs_ubifs_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) $(ZSTD_CFLAGS) $(UUID_CFLAGS) $(LIBSELINUX_CFLAGS)\ -I$(top_srcdir)/ubi-utils/include -I$(top_srcdir)/ubifs-utils/mkfs.ubifs/ -UBIFS_BINS = \ - mkfs.ubifs - -UBIFS_EXTRA = \ - ubifs-utils/mkfs.ubifs/README - -EXTRA_DIST += $(UBIFS_EXTRA) +EXTRA_DIST += ubifs-utils/mkfs.ubifs/README dist_sbin_SCRIPTS = ubifs-utils/mount.ubifs -sbin_PROGRAMS += $(UBIFS_BINS) +sbin_PROGRAMS += mkfs.ubifs -- cgit v1.2.3