[systemd-devel] [PATCH 1/3] build-sys: move common libraries to separate Makefile

William Hubbs w.d.hubbs at gmail.com
Fri Jun 8 11:26:57 PDT 2012


---
 Makefile-shared.am |   98 +++++++++++++++++++++++++++++++++++++++++++++++++++
 Makefile.am        |   99 +---------------------------------------------------
 2 files changed, 99 insertions(+), 98 deletions(-)
 create mode 100644 Makefile-shared.am

diff --git a/Makefile-shared.am b/Makefile-shared.am
new file mode 100644
index 0000000..40dda24
--- /dev/null
+++ b/Makefile-shared.am
@@ -0,0 +1,98 @@
+# ------------------------------------------------------------------------------
+if HAVE_ACL
+noinst_LTLIBRARIES += \
+	libsystemd-acl.la
+
+libsystemd_acl_la_SOURCES = \
+	src/shared/acl-util.c \
+	src/shared/acl-util.h
+
+libsystemd_acl_la_CFLAGS = \
+	$(AM_CFLAGS) \
+	$(ACL_CFLAGS)
+
+libsystemd_acl_la_LIBADD = \
+	$(ACL_LIBS)
+endif
+
+# ------------------------------------------------------------------------------
+noinst_LTLIBRARIES += \
+	libsystemd-label.la
+
+libsystemd_label_la_SOURCES = \
+	src/shared/cgroup-label.c \
+	src/shared/socket-label.c \
+	src/shared/label.c \
+	src/shared/label.h \
+	src/shared/mkdir.c \
+	src/shared/mkdir.h \
+	src/shared/ask-password-api.c \
+	src/shared/ask-password-api.h \
+	src/shared/dev-setup.c \
+	src/shared/dev-setup.h
+
+libsystemd_label_la_CFLAGS = \
+	$(AM_CFLAGS) \
+	$(SELINUX_CFLAGS)
+
+libsystemd_label_la_LIBADD = \
+	$(SELINUX_LIBS)
+
+# ------------------------------------------------------------------------------
+noinst_LTLIBRARIES += \
+	libsystemd-shared.la
+
+libsystemd_shared_la_SOURCES = \
+	src/shared/linux/auto_dev-ioctl.h \
+	src/shared/linux/fanotify.h \
+	src/shared/missing.h \
+	src/shared/list.h \
+	src/shared/macro.h \
+	src/shared/def.h \
+	src/shared/util.c \
+	src/shared/util.h \
+	src/shared/virt.c \
+	src/shared/virt.h \
+	src/shared/path-util.c \
+	src/shared/path-util.h \
+	src/shared/hashmap.c \
+	src/shared/hashmap.h \
+	src/shared/set.c \
+	src/shared/set.h \
+	src/shared/strv.c \
+	src/shared/strv.h \
+	src/shared/conf-parser.c \
+	src/shared/conf-parser.h \
+	src/shared/log.c \
+	src/shared/log.h \
+	src/shared/ratelimit.h \
+	src/shared/ratelimit.c \
+	src/shared/exit-status.c \
+	src/shared/exit-status.h \
+	src/shared/utf8.c \
+	src/shared/utf8.h \
+	src/shared/pager.c \
+	src/shared/pager.h \
+	src/shared/ioprio.h \
+	src/shared/socket-util.c \
+	src/shared/socket-util.h \
+	src/shared/conf-files.c \
+	src/shared/conf-files.h \
+	src/shared/cgroup-util.c \
+	src/shared/cgroup-util.h \
+	src/shared/cgroup-show.c \
+	src/shared/cgroup-show.h \
+	src/shared/unit-name.c \
+	src/shared/unit-name.h \
+	src/shared/utmp-wtmp.c \
+	src/shared/utmp-wtmp.h \
+	src/shared/watchdog.c \
+	src/shared/watchdog.h \
+	src/shared/spawn-ask-password-agent.c \
+	src/shared/spawn-ask-password-agent.h \
+	src/shared/specifier.c \
+	src/shared/specifier.h \
+	src/shared/spawn-polkit-agent.c \
+	src/shared/spawn-polkit-agent.h \
+	src/shared/hwclock.c \
+	src/shared/hwclock.h
diff --git a/Makefile.am b/Makefile.am
index f45fa27..d4bc9eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -519,64 +519,7 @@ EXTRA_DIST += \
 	$(MANPAGES) \
 	$(MANPAGES_ALIAS)
 
-# ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
-	libsystemd-shared.la
-
-libsystemd_shared_la_SOURCES = \
-	src/shared/linux/auto_dev-ioctl.h \
-	src/shared/linux/fanotify.h \
-	src/shared/missing.h \
-	src/shared/list.h \
-	src/shared/macro.h \
-	src/shared/def.h \
-	src/shared/util.c \
-	src/shared/util.h \
-	src/shared/virt.c \
-	src/shared/virt.h \
-	src/shared/path-util.c \
-	src/shared/path-util.h \
-	src/shared/hashmap.c \
-	src/shared/hashmap.h \
-	src/shared/set.c \
-	src/shared/set.h \
-	src/shared/strv.c \
-	src/shared/strv.h \
-	src/shared/conf-parser.c \
-	src/shared/conf-parser.h \
-	src/shared/log.c \
-	src/shared/log.h \
-	src/shared/ratelimit.h \
-	src/shared/ratelimit.c \
-	src/shared/exit-status.c \
-	src/shared/exit-status.h \
-	src/shared/utf8.c \
-	src/shared/utf8.h \
-	src/shared/pager.c \
-	src/shared/pager.h \
-	src/shared/ioprio.h \
-	src/shared/socket-util.c \
-	src/shared/socket-util.h \
-	src/shared/conf-files.c \
-	src/shared/conf-files.h \
-	src/shared/cgroup-util.c \
-	src/shared/cgroup-util.h \
-	src/shared/cgroup-show.c \
-	src/shared/cgroup-show.h \
-	src/shared/unit-name.c \
-	src/shared/unit-name.h \
-	src/shared/utmp-wtmp.c \
-	src/shared/utmp-wtmp.h \
-	src/shared/watchdog.c \
-	src/shared/watchdog.h \
-	src/shared/spawn-ask-password-agent.c \
-	src/shared/spawn-ask-password-agent.h \
-	src/shared/specifier.c \
-	src/shared/specifier.h \
-	src/shared/spawn-polkit-agent.c \
-	src/shared/spawn-polkit-agent.h \
-	src/shared/hwclock.c \
-	src/shared/hwclock.h
+include Makefile-shared.am
 
 #-------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
@@ -613,29 +556,6 @@ libsystemd_units_la_CFLAGS = \
 
 # ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
-	libsystemd-label.la
-
-libsystemd_label_la_SOURCES = \
-	src/shared/cgroup-label.c \
-	src/shared/socket-label.c \
-	src/shared/label.c \
-	src/shared/label.h \
-	src/shared/mkdir.c \
-	src/shared/mkdir.h \
-	src/shared/ask-password-api.c \
-	src/shared/ask-password-api.h \
-	src/shared/dev-setup.c \
-	src/shared/dev-setup.h
-
-libsystemd_label_la_CFLAGS = \
-	$(AM_CFLAGS) \
-	$(SELINUX_CFLAGS)
-
-libsystemd_label_la_LIBADD = \
-	$(SELINUX_LIBS)
-
-# ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
 	libsystemd-logs.la
 
 libsystemd_logs_la_SOURCES = \
@@ -676,23 +596,6 @@ libsystemd_audit_la_LIBADD = \
 	libsystemd-capability.la
 
 # ------------------------------------------------------------------------------
-if HAVE_ACL
-noinst_LTLIBRARIES += \
-	libsystemd-acl.la
-
-libsystemd_acl_la_SOURCES = \
-	src/shared/acl-util.c \
-	src/shared/acl-util.h
-
-libsystemd_acl_la_CFLAGS = \
-	$(AM_CFLAGS) \
-	$(ACL_CFLAGS)
-
-libsystemd_acl_la_LIBADD = \
-	$(ACL_LIBS)
-endif
-
-# ------------------------------------------------------------------------------
 noinst_LTLIBRARIES += \
 	libsystemd-core.la
 
-- 
1.7.3.4



More information about the systemd-devel mailing list