build: Sort variables and their contents in automake files

This should make it easier to add new entries, and find them afterwards.
This commit is contained in:
Guillem Jover 2024-02-11 23:55:40 +01:00
parent c8e5338a7c
commit a81d0b7113
3 changed files with 114 additions and 101 deletions

View File

@ -243,10 +243,15 @@ dist_man_MANS += \
# EOL
endif
if NEED_PROGNAME
if NEED_FPURGE
dist_man_MANS += \
getprogname.3bsd \
setprogname.3bsd \
fpurge.3bsd \
# EOL
endif
if NEED_FUNOPEN
dist_man_MANS += \
funopen.3bsd \
# EOL
endif
@ -262,29 +267,16 @@ dist_man_MANS += \
# EOL
endif
if NEED_STRL
if NEED_PROGNAME
dist_man_MANS += \
strlcat.3bsd \
strlcpy.3bsd \
# EOL
endif
if NEED_WCSL
dist_man_MANS += \
wcslcat.3bsd \
wcslcpy.3bsd \
# EOL
endif
if NEED_STRMODE
dist_man_MANS += \
strmode.3bsd \
getprogname.3bsd \
setprogname.3bsd \
# EOL
endif
dist_man_MANS += \
uid_from_user.3bsd \
gid_from_group.3bsd \
uid_from_user.3bsd \
# EOL
if NEED_NAME_FROM_ID
@ -294,14 +286,22 @@ dist_man_MANS += \
# EOL
endif
if NEED_FPURGE
if NEED_STRL
dist_man_MANS += \
fpurge.3bsd \
strlcat.3bsd \
strlcpy.3bsd \
# EOL
endif
if NEED_FUNOPEN
if NEED_STRMODE
dist_man_MANS += \
funopen.3bsd \
strmode.3bsd \
# EOL
endif
if NEED_WCSL
dist_man_MANS += \
wcslcat.3bsd \
wcslcpy.3bsd \
# EOL
endif

View File

@ -113,30 +113,6 @@ libbsd_la_SOURCES = \
vis.c \
# EOL
if NEED_ERR
libbsd_la_SOURCES += \
err.c \
# EOL
endif
if NEED_ERRC
libbsd_la_SOURCES += \
errc.c \
# EOL
endif
if NEED_PROGNAME
libbsd_la_SOURCES += \
progname.c \
# EOL
endif
if NEED_BSD_GETOPT
libbsd_la_SOURCES += \
bsd_getopt.c \
# EOL
endif
if NEED_ARC4RANDOM
if !HAVE_GETENTROPY
libbsd_la_SOURCES += \
@ -154,35 +130,21 @@ libbsd_la_SOURCES += \
# EOL
endif
if NEED_MD5
if NEED_BSD_GETOPT
libbsd_la_SOURCES += \
md5.c \
bsd_getopt.c \
# EOL
endif
if NEED_NLIST
if NEED_ERR
libbsd_la_SOURCES += \
nlist.c \
err.c \
# EOL
endif
if NEED_STRL
if NEED_ERRC
libbsd_la_SOURCES += \
strlcat.c \
strlcpy.c \
# EOL
endif
if NEED_WCSL
libbsd_la_SOURCES += \
wcslcat.c \
wcslcpy.c \
# EOL
endif
if NEED_STRMODE
libbsd_la_SOURCES += \
strmode.c \
errc.c \
# EOL
endif
@ -198,6 +160,44 @@ libbsd_la_SOURCES += \
# EOL
endif
if NEED_MD5
libbsd_la_SOURCES += \
md5.c \
# EOL
endif
if NEED_NLIST
libbsd_la_SOURCES += \
nlist.c \
# EOL
endif
if NEED_PROGNAME
libbsd_la_SOURCES += \
progname.c \
# EOL
endif
if NEED_STRL
libbsd_la_SOURCES += \
strlcat.c \
strlcpy.c \
# EOL
endif
if NEED_STRMODE
libbsd_la_SOURCES += \
strmode.c \
# EOL
endif
if NEED_WCSL
libbsd_la_SOURCES += \
wcslcat.c \
wcslcpy.c \
# EOL
endif
if NEED_TRANSPARENT_LIBMD
CLEANFILES += \
format.ld \

View File

@ -49,21 +49,27 @@ check_PROGRAMS = \
vis-openbsd \
# EOL
if NEED_PROGNAME
check_PROGRAMS += progname
if NEED_ARC4RANDOM
if HAVE_LIBTESTU01
check_PROGRAMS += arc4random
arc4random_LDADD = $(LDADD) $(TESTU01_LIBS)
endif
endif
if NEED_NLIST
check_PROGRAMS += nlist
endif
fgetln_SOURCES = \
test-stream.c \
test-stream.h \
fgetln.c \
# EOL
if NEED_STRL
check_PROGRAMS += strl
endif
fgetln_CFLAGS = -Wno-deprecated-declarations
if NEED_STRMODE
check_PROGRAMS += strmode
endif
fparseln_SOURCES = \
test-stream.c \
test-stream.h \
fparseln.c \
# EOL
if NEED_FPURGE
check_PROGRAMS += fpurge
@ -73,24 +79,6 @@ if NEED_FUNOPEN
check_PROGRAMS += funopen
endif
if NEED_ARC4RANDOM
if HAVE_LIBTESTU01
arc4random_LDADD = $(LDADD) $(TESTU01_LIBS)
check_PROGRAMS += arc4random
endif
endif
if BUILD_LIBBSD_CTOR
proctitle_LDFLAGS = \
-Wl,-u,libbsd_init_func \
$(top_builddir)/src/libbsd-ctor.a \
$(top_builddir)/src/libbsd.la \
# EOL
check_PROGRAMS += proctitle
endif
if NEED_MD5
check_PROGRAMS += md5
@ -100,11 +88,36 @@ md5_LDADD = $(LDADD) $(MD5_LIBS)
endif
endif
fgetln_SOURCES = test-stream.c test-stream.h fgetln.c
fgetln_CFLAGS = -Wno-deprecated-declarations
fparseln_SOURCES = test-stream.c test-stream.h fparseln.c
if NEED_NLIST
check_PROGRAMS += nlist
endif
proctitle_init_SOURCES = \
proctitle.c \
# EOL
proctitle_init_SOURCES = proctitle.c
proctitle_init_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_USE_SETPROCTITLE_INIT=1
if BUILD_LIBBSD_CTOR
check_PROGRAMS += proctitle
proctitle_LDFLAGS = \
-Wl,-u,libbsd_init_func \
$(top_builddir)/src/libbsd-ctor.a \
$(top_builddir)/src/libbsd.la \
# EOL
endif
if NEED_PROGNAME
check_PROGRAMS += progname
endif
if NEED_STRL
check_PROGRAMS += strl
endif
if NEED_STRMODE
check_PROGRAMS += strmode
endif
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)