build: Terminate lists in variables with «# EOL»

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.
This commit is contained in:
Guillem Jover 2022-11-23 23:28:34 +01:00
parent 5cfa39e5cd
commit 00b538ffa3
5 changed files with 36 additions and 25 deletions

View File

@ -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

View File

@ -29,4 +29,4 @@ nobase_include_HEADERS = \
bsd/unistd.h \
bsd/vis.h \
bsd/wchar.h \
$(nil)
# EOL

View File

@ -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

View File

@ -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

View File

@ -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