From 00b538ffa3492053b03771b7bc76563d740c038d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Wed, 23 Nov 2022 23:28:34 +0100 Subject: [PATCH] =?UTF-8?q?build:=20Terminate=20lists=20in=20variables=20w?= =?UTF-8?q?ith=20=C2=AB#=20EOL=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This means we can add a trailing «\» to every element, so that they can be removed without requiring modification of other lines, and can be easily sorted. Replace the old usage of $(nil) which could possibly end up with junk added if such variable is ever defined, in the environment. --- Makefile.am | 9 +++++++-- include/Makefile.am | 2 +- man/Makefile.am | 6 +++--- src/Makefile.am | 28 ++++++++++++++++------------ test/Makefile.am | 16 +++++++++------- 5 files changed, 36 insertions(+), 25 deletions(-) diff --git a/Makefile.am b/Makefile.am index b839ae1..bdb8376 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,13 +1,18 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = include man src test +SUBDIRS = \ + include \ + man \ + src \ + test \ + # EOL ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ autogen \ get-version \ - $(nil) + # EOL dist-hook: echo $(VERSION) >$(distdir)/.dist-version diff --git a/include/Makefile.am b/include/Makefile.am index e6f66bd..ca0d06f 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -29,4 +29,4 @@ nobase_include_HEADERS = \ bsd/unistd.h \ bsd/vis.h \ bsd/wchar.h \ - $(nil) + # EOL diff --git a/man/Makefile.am b/man/Makefile.am index 9c6ad89..961d2f5 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -2,11 +2,11 @@ EXTRA_DIST = \ mdX.3bsd \ - $(nil) + # EOL CLEANFILES = \ md5.3bsd \ - $(nil) + # EOL SED_MD5_SUBST = -e 's/mdX/md5/g' -e 's/mdY/md4/g' -e 's/MDX/MD5/g' @@ -251,4 +251,4 @@ dist_man_MANS = \ vis.3bsd \ wcslcat.3bsd \ wcslcpy.3bsd \ - $(nil) + # EOL diff --git a/src/Makefile.am b/src/Makefile.am index 7cf4a09..5f803bb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -5,13 +5,14 @@ AM_CPPFLAGS = \ -isystem $(top_srcdir)/include/bsd/ \ -include $(top_builddir)/config.h \ -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED \ - -D__REENTRANT + -D__REENTRANT \ + # EOL if OS_WINDOWS AM_CPPFLAGS += \ -D_CRT_SECURE_NO_WARNINGS \ -D_CRT_NONSTDC_NO_WARNINGS \ - $(nil) + # EOL endif libbsd_la_included_sources = \ @@ -23,7 +24,7 @@ libbsd_la_included_sources = \ getentropy_osx.c \ getentropy_solaris.c \ getentropy_win.c \ - $(nil) + # EOL CLEANFILES = EXTRA_DIST = \ @@ -32,13 +33,13 @@ EXTRA_DIST = \ libbsd-ctor.pc.in \ libbsd-overlay.pc.in \ $(libbsd_la_included_sources) \ - $(nil) + # EOL pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = \ libbsd.pc \ libbsd-overlay.pc \ - $(nil) + # EOL lib_LTLIBRARIES = libbsd.la lib_LIBRARIES = @@ -51,16 +52,19 @@ endif libbsd_la_DEPENDENCIES = \ $(libbsd_la_included_sources) \ - libbsd.map + libbsd.map \ + # EOL libbsd_la_LIBADD = \ $(MD5_LIBS) \ $(LIBBSD_LIBS) \ - $(nil) + # EOL libbsd_la_LDFLAGS = \ - -version-number $(LIBBSD_ABI) + -version-number $(LIBBSD_ABI) \ + # EOL if HAVE_LINKER_VERSION_SCRIPT libbsd_la_LDFLAGS += \ - -Wl,--version-script=$(srcdir)/libbsd.map + -Wl,--version-script=$(srcdir)/libbsd.map \ + # EOL endif libbsd_la_SOURCES = \ arc4random.c \ @@ -117,12 +121,12 @@ libbsd_la_SOURCES = \ vis.c \ wcslcat.c \ wcslcpy.c \ - $(nil) + # EOL if !HAVE_GETENTROPY libbsd_la_SOURCES += \ getentropy.c \ - $(nil) + # EOL endif if NEED_TRANSPARENT_LIBMD @@ -133,7 +137,7 @@ endif libbsd_ctor_a_SOURCES = \ setproctitle_ctor.c \ - $(nil) + # EOL if NEED_TRANSPARENT_LIBMD TRANSPARENT_LIBMD_DEPENDS = format.ld diff --git a/test/Makefile.am b/test/Makefile.am index 3939583..64faaec 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -4,30 +4,32 @@ HEADERS_CPPFLAGS = \ -I$(top_builddir) \ -include $(top_builddir)/config.h \ -DLIBBSD_DISABLE_DEPRECATED \ - -D__REENTRANT + -D__REENTRANT \ + # EOL AM_CPPFLAGS = \ -isystem $(top_srcdir)/include/bsd/ \ $(HEADERS_CPPFLAGS) \ - -DLIBBSD_OVERLAY + -DLIBBSD_OVERLAY \ + # EOL AM_TESTS_ENVIRONMENT = \ export CC="$(CC)"; \ export CPPFLAGS="$(HEADERS_CPPFLAGS)"; \ export top_srcdir="$(top_srcdir)"; \ - $(nil) + # EOL LDADD = $(top_builddir)/src/libbsd.la EXTRA_DIST = \ headers-overlay.sh \ headers-system.sh \ - $(nil) + # EOL check_SCRIPTS = \ headers-overlay.sh \ headers-system.sh \ - $(nil) + # EOL check_PROGRAMS = \ overlay \ @@ -52,7 +54,7 @@ check_PROGRAMS = \ strtonum \ vis \ vis-openbsd \ - $(nil) + # EOL if HAVE_LIBTESTU01 arc4random_LDADD = $(LDADD) $(TESTU01_LIBS) @@ -65,7 +67,7 @@ proctitle_LDFLAGS = \ -Wl,-u,libbsd_init_func \ $(top_builddir)/src/libbsd-ctor.a \ $(top_builddir)/src/libbsd.la \ - $(nil) + # EOL check_PROGRAMS += proctitle endif