[lxc-devel] [lxc/master] autotools: cleanup Makefile.am

brauner on Github lxc-bot at linuxcontainers.org
Wed Jul 11 20:36:50 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20180711/62a0d763/attachment.bin>
-------------- next part --------------
From ba7bd8c8debc4c6e95763b5ed3e2c349b3558364 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Wed, 11 Jul 2018 22:35:44 +0200
Subject: [PATCH] autotools: cleanup Makefile.am

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 src/lxc/Makefile.am | 398 ++++++++++++++++++++++++++++------------------------
 1 file changed, 216 insertions(+), 182 deletions(-)

diff --git a/src/lxc/Makefile.am b/src/lxc/Makefile.am
index ff4c7ff8c..c5e46ac28 100644
--- a/src/lxc/Makefile.am
+++ b/src/lxc/Makefile.am
@@ -1,48 +1,45 @@
-pkginclude_HEADERS = \
-	attach_options.h \
-	lxccontainer.h \
-	version.h
-
-noinst_HEADERS = \
-	attach.h \
-	storage/storage.h \
-	storage/btrfs.h \
-	storage/dir.h \
-	storage/loop.h \
-	storage/lvm.h \
-	storage/nbd.h \
-	storage/overlay.h \
-	storage/rbd.h \
-	storage/rsync.h \
-	storage/zfs.h \
-	storage/storage_utils.h \
-	tools/arguments.h \
-	cgroups/cgroup.h \
-	cgroups/cgroup_utils.h \
-	caps.h \
-	conf.h \
-	confile.h \
-	confile_utils.h \
-	error.h \
-	initutils.h \
-	list.h \
-	log.h \
-	lxc.h \
-	lxclock.h \
-	monitor.h \
-	namespace.h \
-	start.h \
-	state.h \
-	terminal.h \
-	utils.h \
-	criu.h \
-	../tests/lxctest.h
+pkginclude_HEADERS = attach_options.h \
+		     lxccontainer.h \
+		     version.h
+
+noinst_HEADERS = attach.h \
+		 caps.h \
+		 cgroups/cgroup.h \
+		 cgroups/cgroup_utils.h \
+		 conf.h \
+		 confile.h \
+		 confile_utils.h \
+		 criu.h \
+		 error.h \
+		 initutils.h \
+		 list.h \
+		 log.h \
+		 lxc.h \
+		 lxclock.h \
+		 monitor.h \
+		 namespace.h \
+		 start.h \
+		 state.h \
+		 storage/btrfs.h \
+		 storage/dir.h \
+		 storage/loop.h \
+		 storage/lvm.h \
+		 storage/nbd.h \
+		 storage/overlay.h \
+		 storage/rbd.h \
+		 storage/rsync.h \
+		 storage/storage.h \
+		 storage/storage_utils.h \
+		 storage/zfs.h \
+		 terminal.h \
+		 ../tests/lxctest.h \
+		 tools/arguments.h \
+		 utils.h
 
 if IS_BIONIC
-noinst_HEADERS += \
-	../include/ifaddrs.h \
-	../include/openpty.h \
-	../include/lxcmntent.h
+noinst_HEADERS += ../include/ifaddrs.h \
+		  ../include/lxcmntent.h \
+		  ../include/openpty.h
 endif
 
 if !HAVE_PRLIMIT
@@ -67,9 +64,9 @@ endif
 
 sodir=$(libdir)
 
-LSM_SOURCES = \
-	lsm/nop.c \
-	lsm/lsm.h lsm/lsm.c
+LSM_SOURCES = lsm/lsm.c \
+	      lsm/lsm.h \
+	      lsm/nop.c
 
 if ENABLE_APPARMOR
 LSM_SOURCES += lsm/apparmor.c
@@ -80,65 +77,63 @@ LSM_SOURCES += lsm/selinux.c
 endif
 
 lib_LTLIBRARIES = liblxc.la
-liblxc_la_SOURCES = \
-	storage/storage.c storage/storage.h \
-	storage/btrfs.c storage/btrfs.h \
-	storage/dir.c storage/dir.h \
-	storage/loop.c storage/loop.h \
-	storage/lvm.c storage/lvm.h \
-	storage/nbd.c storage/nbd.h \
-	storage/overlay.c storage/overlay.h \
-	storage/rbd.c storage/rbd.h \
-	storage/rsync.c storage/rsync.h \
-	storage/zfs.c storage/zfs.h \
-	storage/storage_utils.c storage/storage_utils.h \
-	cgroups/cgfsng.c \
-	cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
-	cgroups/cgroup.c cgroups/cgroup.h \
-	commands.c commands.h \
-	commands_utils.c commands_utils.h \
-	start.c start.h \
-	execute.c \
-	monitor.c monitor.h \
-	terminal.c \
-	freezer.c \
-	error.h error.c \
-	parse.c parse.h \
-	lxc.h \
-	initutils.c initutils.h \
-	utils.c utils.h \
-	sync.c sync.h \
-	namespace.h namespace.c \
-	conf.c conf.h \
-	confile.c confile.h \
-	confile_utils.c confile_utils.h \
-	list.h \
-	state.c state.h \
-	log.c log.h \
-	attach.c attach.h \
-	criu.c criu.h \
-	ringbuf.c ringbuf.h \
-	\
-	network.c network.h \
-	nl.c nl.h \
-	rtnl.c rtnl.h \
-	\
-	caps.c caps.h \
-	lxcseccomp.h \
-	mainloop.c mainloop.h \
-	af_unix.c af_unix.h \
-	\
-	lxclock.h lxclock.c \
-	lxccontainer.c lxccontainer.h \
-	version.h \
-	\
-	$(LSM_SOURCES)
+liblxc_la_SOURCES = af_unix.c af_unix.h \
+		    attach.c attach.h \
+		    caps.c caps.h \
+		    cgroups/cgfsng.c \
+		    cgroups/cgroup.c cgroups/cgroup.h \
+		    cgroups/cgroup_utils.c cgroups/cgroup_utils.h \
+		    commands.c commands.h \
+		    commands_utils.c commands_utils.h \
+		    conf.c conf.h \
+		    confile.c confile.h \
+		    confile_utils.c confile_utils.h \
+		    criu.c criu.h \
+		    error.c error.h \
+		    execute.c \
+		    freezer.c \
+		    initutils.c initutils.h \
+		    list.h \
+		    log.c log.h \
+		    lxc.h \
+		    lxccontainer.c lxccontainer.h \
+		    lxclock.c lxclock.h \
+		    lxcseccomp.h \
+		    mainloop.c mainloop.h \
+		    namespace.c namespace.h \
+		    nl.c nl.h \
+		    network.c network.h \
+		    monitor.c monitor.h \
+		    parse.c parse.h \
+		    ringbuf.c ringbuf.h \
+		    rtnl.c rtnl.h \
+		    state.c state.h \
+		    start.c start.h \
+		    storage/btrfs.c storage/btrfs.h \
+		    storage/dir.c storage/dir.h \
+		    storage/loop.c storage/loop.h \
+		    storage/lvm.c storage/lvm.h \
+		    storage/nbd.c storage/nbd.h \
+		    storage/overlay.c storage/overlay.h \
+		    storage/rbd.c storage/rbd.h \
+		    storage/rsync.c storage/rsync.h \
+		    storage/storage.c storage/storage.h \
+		    storage/storage_utils.c storage/storage_utils.h \
+		    storage/zfs.c storage/zfs.h \
+		    sync.c sync.h \
+		    terminal.c \
+		    utils.c utils.h \
+		    version.h \
+		    $(LSM_SOURCES)
 
 if IS_BIONIC
-liblxc_la_SOURCES += \
-	../include/ifaddrs.c ../include/ifaddrs.h \
-	../include/openpty.c ../include/openpty.h \
-	../include/lxcmntent.c ../include/lxcmntent.h
+liblxc_la_SOURCES += ../include/ifaddrs.c ../include/ifaddrs.h \
+		     ../include/lxcmntent.c ../include/lxcmntent.h \
+		     ../include/openpty.c ../include/openpty.h
+endif
+
+if !HAVE_GETGRGID_R
+liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
 endif
 
 if !HAVE_GETLINE
@@ -165,28 +160,24 @@ if !HAVE_STRLCAT
 liblxc_la_SOURCES += ../include/strlcat.c ../include/strlcat.h
 endif
 
-if !HAVE_GETGRGID_R
-liblxc_la_SOURCES += ../include/getgrgid_r.c ../include/getgrgid_r.h
-endif
-
-AM_CFLAGS=-DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
-	-DLXCPATH=\"$(LXCPATH)\" \
-	-DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
-	-DLXCINITDIR=\"$(LXCINITDIR)\" \
-	-DLIBEXECDIR=\"$(LIBEXECDIR)\" \
-	-DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
-	-DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
-	-DLOGPATH=\"$(LOGPATH)\" \
-	-DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
-	-DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
-	-DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
-	-DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
-	-DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
-	-DSBINDIR=\"$(SBINDIR)\" \
-	-I $(top_srcdir)/src \
-	-I $(top_srcdir)/src/lxc \
-	-I $(top_srcdir)/src/lxc/storage \
-	-I $(top_srcdir)/src/lxc/cgroups
+AM_CFLAGS = -DLXCROOTFSMOUNT=\"$(LXCROOTFSMOUNT)\" \
+	    -DLXCPATH=\"$(LXCPATH)\" \
+	    -DLXC_GLOBAL_CONF=\"$(LXC_GLOBAL_CONF)\" \
+	    -DLXCINITDIR=\"$(LXCINITDIR)\" \
+	    -DLIBEXECDIR=\"$(LIBEXECDIR)\" \
+	    -DLXCTEMPLATEDIR=\"$(LXCTEMPLATEDIR)\" \
+	    -DLXCTEMPLATECONFIG=\"$(LXCTEMPLATECONFIG)\" \
+	    -DLOGPATH=\"$(LOGPATH)\" \
+	    -DLXC_DEFAULT_CONFIG=\"$(LXC_DEFAULT_CONFIG)\" \
+	    -DLXC_USERNIC_DB=\"$(LXC_USERNIC_DB)\" \
+	    -DLXC_USERNIC_CONF=\"$(LXC_USERNIC_CONF)\" \
+	    -DDEFAULT_CGROUP_PATTERN=\"$(DEFAULT_CGROUP_PATTERN)\" \
+	    -DRUNTIME_PATH=\"$(RUNTIME_PATH)\" \
+	    -DSBINDIR=\"$(SBINDIR)\" \
+	    -I $(top_srcdir)/src \
+	    -I $(top_srcdir)/src/lxc \
+	    -I $(top_srcdir)/src/lxc/storage \
+	    -I $(top_srcdir)/src/lxc/cgroups
 
 if ENABLE_APPARMOR
 AM_CFLAGS += -DHAVE_APPARMOR
@@ -197,7 +188,8 @@ AM_CFLAGS += -DHAVE_LIBGNUTLS
 endif
 
 if ENABLE_SECCOMP
-AM_CFLAGS += -DHAVE_SECCOMP $(SECCOMP_CFLAGS)
+AM_CFLAGS += -DHAVE_SECCOMP \
+	     $(SECCOMP_CFLAGS)
 endif
 
 if ENABLE_SELINUX
@@ -231,75 +223,105 @@ bin_SCRIPTS += cmd/lxc-checkconfig \
 endif
 
 if ENABLE_TOOLS
-bin_PROGRAMS = \
-	lxc-attach \
-	lxc-autostart \
-	lxc-cgroup \
-	lxc-checkpoint \
-	lxc-copy \
-	lxc-config \
-	lxc-console \
-	lxc-create \
-	lxc-destroy \
-	lxc-device \
-	lxc-execute \
-	lxc-freeze \
-	lxc-info \
-	lxc-ls \
-	lxc-monitor \
-	lxc-snapshot \
-	lxc-start \
-	lxc-stop \
-	lxc-top \
-	lxc-unfreeze \
-	lxc-unshare \
-	lxc-usernsexec \
-	lxc-wait
+bin_PROGRAMS = lxc-attach \
+	       lxc-autostart \
+	       lxc-cgroup \
+	       lxc-checkpoint \
+	       lxc-copy \
+	       lxc-config \
+	       lxc-console \
+	       lxc-create \
+	       lxc-destroy \
+	       lxc-device \
+	       lxc-execute \
+	       lxc-freeze \
+	       lxc-info \
+	       lxc-ls \
+	       lxc-monitor \
+	       lxc-snapshot \
+	       lxc-start \
+	       lxc-stop \
+	       lxc-top \
+	       lxc-unfreeze \
+	       lxc-unshare \
+	       lxc-usernsexec \
+	       lxc-wait
 endif
 
 if ENABLE_COMMANDS
 sbin_PROGRAMS = init.lxc
-pkglibexec_PROGRAMS = \
-	lxc-monitord \
-	lxc-user-nic
+
+pkglibexec_PROGRAMS = lxc-monitord \
+		      lxc-user-nic
 endif
 
 AM_LDFLAGS = -Wl,-E
+
 if ENABLE_RPATH
 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
 endif
-LDADD=liblxc.la @CAP_LIBS@ @GNUTLS_LIBS@ @SELINUX_LIBS@ @SECCOMP_LIBS@
+
+LDADD = liblxc.la \
+	@CAP_LIBS@ \
+	@GNUTLS_LIBS@ \
+	@SECCOMP_LIBS@ \
+	@SELINUX_LIBS@
 
 if ENABLE_TOOLS
-lxc_attach_SOURCES = tools/lxc_attach.c tools/arguments.c
-lxc_autostart_SOURCES = tools/lxc_autostart.c tools/arguments.c
-lxc_cgroup_SOURCES = tools/lxc_cgroup.c tools/arguments.c
-lxc_config_SOURCES = tools/lxc_config.c tools/arguments.c
-lxc_console_SOURCES = tools/lxc_console.c tools/arguments.c
-lxc_destroy_SOURCES = tools/lxc_destroy.c tools/arguments.c
-lxc_device_SOURCES = tools/lxc_device.c tools/arguments.c
-lxc_execute_SOURCES = tools/lxc_execute.c tools/arguments.c
-lxc_freeze_SOURCES = tools/lxc_freeze.c tools/arguments.c
-lxc_info_SOURCES = tools/lxc_info.c tools/arguments.c
-lxc_monitor_SOURCES = tools/lxc_monitor.c tools/arguments.c
-lxc_ls_SOURCES = tools/lxc_ls.c tools/arguments.c
-lxc_copy_SOURCES = tools/lxc_copy.c tools/arguments.c
-lxc_start_SOURCES = tools/lxc_start.c tools/arguments.c
-lxc_stop_SOURCES = tools/lxc_stop.c tools/arguments.c
-lxc_top_SOURCES = tools/lxc_top.c tools/arguments.c
-lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c tools/arguments.c
-lxc_unshare_SOURCES = tools/lxc_unshare.c tools/arguments.c
-lxc_wait_SOURCES = tools/lxc_wait.c tools/arguments.c
-lxc_create_SOURCES = tools/lxc_create.c tools/arguments.c
-lxc_snapshot_SOURCES = tools/lxc_snapshot.c tools/arguments.c
-lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c tools/arguments.c
+lxc_attach_SOURCES = tools/lxc_attach.c \
+		     tools/arguments.c tools/arguments.h
+lxc_autostart_SOURCES = tools/lxc_autostart.c \
+			tools/arguments.c tools/arguments.h
+lxc_cgroup_SOURCES = tools/lxc_cgroup.c \
+		     tools/arguments.c tools/arguments.h
+lxc_config_SOURCES = tools/lxc_config.c \
+		     tools/arguments.c tools/arguments.h
+lxc_console_SOURCES = tools/lxc_console.c \
+		      tools/arguments.c tools/arguments.h
+lxc_destroy_SOURCES = tools/lxc_destroy.c \
+		      tools/arguments.c tools/arguments.h
+lxc_device_SOURCES = tools/lxc_device.c \
+		     tools/arguments.c tools/arguments.h
+lxc_execute_SOURCES = tools/lxc_execute.c \
+		      tools/arguments.c tools/arguments.h
+lxc_freeze_SOURCES = tools/lxc_freeze.c \
+		     tools/arguments.c tools/arguments.h
+lxc_info_SOURCES = tools/lxc_info.c \
+		   tools/arguments.c tools/arguments.h
+lxc_monitor_SOURCES = tools/lxc_monitor.c \
+		      tools/arguments.c tools/arguments.h
+lxc_ls_SOURCES = tools/lxc_ls.c \
+		 tools/arguments.c tools/arguments.h
+lxc_copy_SOURCES = tools/lxc_copy.c \
+		   tools/arguments.c tools/arguments.h
+lxc_start_SOURCES = tools/lxc_start.c \
+		    tools/arguments.c tools/arguments.h
+lxc_stop_SOURCES = tools/lxc_stop.c \
+		   tools/arguments.c tools/arguments.h
+lxc_top_SOURCES = tools/lxc_top.c \
+		  tools/arguments.c tools/arguments.h
+lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c \
+		       tools/arguments.c tools/arguments.h
+lxc_unshare_SOURCES = tools/lxc_unshare.c \
+		      tools/arguments.c tools/arguments.h
+lxc_wait_SOURCES = tools/lxc_wait.c \
+		   tools/arguments.c tools/arguments.h
+lxc_create_SOURCES = tools/lxc_create.c \
+		     tools/arguments.c tools/arguments.h
+lxc_snapshot_SOURCES = tools/lxc_snapshot.c \
+		       tools/arguments.c tools/arguments.h
+lxc_checkpoint_SOURCES = tools/lxc_checkpoint.c \
+			 tools/arguments.c tools/arguments.h
 endif
 
 if ENABLE_COMMANDS
 # Binaries shipping with liblxc
 init_lxc_SOURCES = cmd/lxc_init.c
 lxc_monitord_SOURCES = cmd/lxc_monitord.c
-lxc_user_nic_SOURCES = cmd/lxc_user_nic.c namespace.c network.c parse.c
+lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
+		       namespace.c namespace.h \
+		       network.c network.h \
+		       parse.c parse.h
 lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c
 endif
 
@@ -314,11 +336,17 @@ if ENABLE_COMMANDS
 if HAVE_STATIC_LIBCAP
 sbin_PROGRAMS += init.lxc.static
 
-init_lxc_static_SOURCES = cmd/lxc_init.c error.c log.c initutils.c caps.c parse.c namespace.c
+init_lxc_static_SOURCES = cmd/lxc_init.c \
+			  caps.c caps.h \
+			  error.c error.h \
+			  initutils.c initutils.h \
+			  log.c log.h \
+			  namespace.c namespace.h \
+			  parse.c parse.h
 
 if !HAVE_GETLINE
 if HAVE_FGETLN
-init_lxc_static_SOURCES += ../include/getline.c
+init_lxc_static_SOURCES += ../include/getline.c ../include/getline.h
 endif
 endif
 
@@ -339,10 +367,16 @@ endif
 if ENABLE_PAM
 if HAVE_PAM
 pam_LTLIBRARIES = pam_cgfs.la
-pam_cgfs_la_SOURCES = pam/pam_cgfs.c pam/utils.c pam/utils.h
+pam_cgfs_la_SOURCES = pam/pam_cgfs.c \
+		      pam/utils.c pam/utils.h
 pam_cgfs_la_CFLAGS = $(AM_CFLAGS)
-pam_cgfs_la_LIBADD = $(AM_LIBS) $(PAM_LIBS) -L$(top_srcdir)
-pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared
+pam_cgfs_la_LIBADD = $(AM_LIBS) \
+		     $(PAM_LIBS) \
+		     -L$(top_srcdir)
+pam_cgfs_la_LDFLAGS = $(AM_LDFLAGS) \
+		      -avoid-version \
+		      -module \
+		      -shared
 endif
 endif
 


More information about the lxc-devel mailing list