From 4cbf4918382f60e1bee4ff4a1021d2abd4341e8a Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Wed, 31 Aug 2022 14:25:48 -0600 Subject: [PATCH] make: use DIST_SUBDIRS As per automake manual[1], DIST_SUBDIRS should be used to recurse into the subdirectories those we want to ship as part of make dist and use SUBDIRS for conditionally building the directories. Adopt this rule across the source. [1] https://www.gnu.org/software/automake/manual/html_node/SUBDIRS-vs-DIST_005fSUBDIRS.html Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- Makefile.am | 6 ++---- doc/Makefile.am | 3 ++- samples/Makefile.am | 3 ++- src/Makefile.am | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2ab44f35..277e7402 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,7 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS= -I m4 -SUBDIRS = dist doc include samples scripts src -if WITH_TESTS -SUBDIRS += tests -endif +DIST_SUBDIRS = dist doc include scripts src tests samples +SUBDIRS = $(DIST_SUBDIRS) EXTRA_DIST = README_daemon libcgroup.doxyfile README_systemd CONTRIBUTING.md diff --git a/doc/Makefile.am b/doc/Makefile.am index 5822dc16..e4396141 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,2 +1,3 @@ -SUBDIRS = man +DIST_SUBDIRS = man +SUBDIRS = $(DIST_SUBDIRS) diff --git a/samples/Makefile.am b/samples/Makefile.am index 23f64d69..5c5566c5 100644 --- a/samples/Makefile.am +++ b/samples/Makefile.am @@ -1 +1,2 @@ -SUBDIRS = config c +DIST_SUBDIRS = config c +SUBDIRS = $(DIST_SUBDIRS) diff --git a/src/Makefile.am b/src/Makefile.am index 8c9b674a..6a838f1e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,6 +2,7 @@ BUILT_SOURCES = parse.c parse.h +DIST_SUBDIRS = . daemon pam tools python SUBDIRS = . daemon pam tools if ENABLE_PYTHON SUBDIRS += python -- 2.47.2