From: Lennart Poettering Date: Sun, 16 May 2010 16:45:24 +0000 (+0200) Subject: build-sys: move source files to subdirectory X-Git-Tag: 0.git+20100605+dfd8ee-1~13^2~3^2~16 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e99e38bbdcca3fe5956823bdb3d38544ccf93221;p=systemd build-sys: move source files to subdirectory --- diff --git a/Makefile.am b/Makefile.am index c676712e..0da02af0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,11 +33,8 @@ AM_CPPFLAGS = \ -DSESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session\" \ -DSESSION_DATA_UNIT_PATH=\"$(sessionunitdir)\" \ -DCGROUP_AGENT_PATH=\"$(pkglibexecdir)/systemd-cgroups-agent\" \ - -DSYSTEMD_BINARY_PATH=\"$(sbindir)/systemd\" - -VALA_CFLAGS = \ - -Wno-unused-variable \ - -Wno-unused-function + -DSYSTEMD_BINARY_PATH=\"$(sbindir)/systemd\" \ + -I $(top_srcdir)/src sbin_PROGRAMS = \ systemd @@ -86,65 +83,65 @@ EXTRA_DIST = \ # rules for C programs, but not Vala programs. We therefore can't # list the .h files as dependencies if we want make dist to work. BASIC_SOURCES = \ - util.c \ - hashmap.c \ - set.c \ - strv.c \ - conf-parser.c \ - socket-util.c \ - log.c \ - ratelimit.c + src/util.c \ + src/hashmap.c \ + src/set.c \ + src/strv.c \ + src/conf-parser.c \ + src/socket-util.c \ + src/log.c \ + src/ratelimit.c COMMON_SOURCES = \ $(BASIC_SOURCES) \ - unit.c \ - job.c \ - manager.c \ - load-fragment.c \ - service.c \ - automount.c \ - mount.c \ - swap.c \ - device.c \ - target.c \ - snapshot.c \ - socket.c \ - timer.c \ - load-dropin.c \ - execute.c \ - dbus.c \ - dbus-manager.c \ - dbus-unit.c \ - dbus-job.c \ - dbus-service.c \ - dbus-socket.c \ - dbus-target.c \ - dbus-mount.c \ - dbus-automount.c \ - dbus-swap.c \ - dbus-snapshot.c \ - dbus-device.c \ - dbus-execute.c \ - cgroup.c \ - mount-setup.c \ - hostname-setup.c \ - loopback-setup.c \ - utmp-wtmp.c \ - specifier.c \ - unit-name.c \ - fdset.c \ - namespace.c + src/unit.c \ + src/job.c \ + src/manager.c \ + src/load-fragment.c \ + src/service.c \ + src/automount.c \ + src/mount.c \ + src/swap.c \ + src/device.c \ + src/target.c \ + src/snapshot.c \ + src/socket.c \ + src/timer.c \ + src/load-dropin.c \ + src/execute.c \ + src/dbus.c \ + src/dbus-manager.c \ + src/dbus-unit.c \ + src/dbus-job.c \ + src/dbus-service.c \ + src/dbus-socket.c \ + src/dbus-target.c \ + src/dbus-mount.c \ + src/dbus-automount.c \ + src/dbus-swap.c \ + src/dbus-snapshot.c \ + src/dbus-device.c \ + src/dbus-execute.c \ + src/cgroup.c \ + src/mount-setup.c \ + src/hostname-setup.c \ + src/loopback-setup.c \ + src/utmp-wtmp.c \ + src/specifier.c \ + src/unit-name.c \ + src/fdset.c \ + src/namespace.c EXTRA_DIST += \ ${COMMON_SOURCES:.c=.h} \ - macro.h \ - ioprio.h \ - missing.h \ - list.h \ - securebits.h \ - linux/auto_dev-ioctl.h \ - initreq.h \ - sd-daemon.h + src/macro.h \ + src/ioprio.h \ + src/missing.h \ + src/list.h \ + src/securebits.h \ + src/linux/auto_dev-ioctl.h \ + src/initreq.h \ + src/sd-daemon.h dist_man_MANS = \ systemd.unit.5 \ @@ -163,7 +160,7 @@ EXTRA_DIST += \ systemd_SOURCES = \ $(COMMON_SOURCES) \ - main.c + src/main.c systemd_CPPFLAGS = \ $(AM_CPPFLAGS) \ @@ -178,43 +175,43 @@ systemd_LDADD = \ test_engine_SOURCES = \ $(COMMON_SOURCES) \ - test-engine.c + src/test-engine.c test_engine_CPPFLAGS = $(systemd_CPPFLAGS) test_engine_LDADD = $(systemd_LDADD) test_job_type_SOURCES = \ $(COMMON_SOURCES) \ - test-engine.c + src/test-engine.c test_job_type_CPPFLAGS = $(systemd_CPPFLAGS) test_job_type_LDADD = $(systemd_LDADD) test_ns_SOURCES = \ $(BASIC_SOURCES) \ - test-ns.c \ - namespace.c + src/test-ns.c \ + src/namespace.c test_ns_CPPFLAGS = $(systemd_CPPFLAGS) test_ns_LDADD = $(systemd_LDADD) test_loopback_SOURCES = \ $(BASIC_SOURCES) \ - test-loopback.c \ - loopback-setup.c + src/test-loopback.c \ + src/loopback-setup.c test_loopback_CPPFLAGS = $(systemd_CPPFLAGS) test_loopback_LDADD = $(systemd_LDADD) systemd_logger_SOURCES = \ $(BASIC_SOURCES) \ - logger.c \ - sd-daemon.c + src/logger.c \ + src/sd-daemon.c systemd_initctl_SOURCES = \ $(BASIC_SOURCES) \ - initctl.c \ - sd-daemon.c + src/initctl.c \ + src/sd-daemon.c systemd_initctl_CPPFLAGS = \ $(AM_CPPFLAGS) \ @@ -225,7 +222,7 @@ systemd_initctl_LDADD = \ systemd_cgroups_agent_SOURCES = \ $(BASIC_SOURCES) \ - cgroups-agent.c + src/cgroups-agent.c systemd_cgroups_agent_CPPFLAGS = \ $(AM_CPPFLAGS) \ @@ -234,18 +231,31 @@ systemd_cgroups_agent_CPPFLAGS = \ systemd_cgroups_agent_LDADD = \ $(DBUS_LIBS) -VALAFLAGS = -g --save-temps --pkg=dbus-glib-1 --pkg=posix --pkg gtk+-2.0 +VALAFLAGS = \ + -g \ + --save-temps \ + --pkg=dbus-glib-1 \ + --pkg=posix + +if HAVE_GTK +VALAFLAGS += \ + --pkg=gtk+-2.0 +endif + +VALA_CFLAGS = \ + -Wno-unused-variable \ + -Wno-unused-function systemctl_SOURCES = \ - systemctl.vala \ - systemd-interfaces.vala + src/systemctl.vala \ + src/systemd-interfaces.vala systemctl_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(VALA_CFLAGS) systemctl_LDADD = $(DBUSGLIB_LIBS) systemadm_SOURCES = \ - systemadm.vala \ - systemd-interfaces.vala + src/systemadm.vala \ + src/systemd-interfaces.vala systemadm_CPPFLAGS = $(AM_CPPFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(VALA_CFLAGS) systemadm_LDADD = $(DBUSGLIB_LIBS) $(GTK_LIBS) @@ -261,9 +271,9 @@ systemd-logger.service: units/systemd-logger.service.in Makefile < $< > $@ CLEANFILES = \ - systemd-interfaces.c \ - systemctl.c \ - systemadm.c \ + src/systemd-interfaces.c \ + src/systemctl.c \ + src/systemadm.c \ systemd-initctl.service \ systemd-logger.service diff --git a/configure.ac b/configure.ac index 1d2efc3a..691d9700 100644 --- a/configure.ac +++ b/configure.ac @@ -18,11 +18,11 @@ AC_PREREQ(2.63) AC_INIT([systemd],[0],[systemd-devel@lists.freedesktop.org]) -AC_CONFIG_SRCDIR([main.c]) +AC_CONFIG_SRCDIR([src/main.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax]) +AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax subdir-objects]) AC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/wiki/Software/systemd]) diff --git a/automount.c b/src/automount.c similarity index 100% rename from automount.c rename to src/automount.c diff --git a/automount.h b/src/automount.h similarity index 100% rename from automount.h rename to src/automount.h diff --git a/cgroup.c b/src/cgroup.c similarity index 100% rename from cgroup.c rename to src/cgroup.c diff --git a/cgroup.h b/src/cgroup.h similarity index 100% rename from cgroup.h rename to src/cgroup.h diff --git a/cgroups-agent.c b/src/cgroups-agent.c similarity index 100% rename from cgroups-agent.c rename to src/cgroups-agent.c diff --git a/conf-parser.c b/src/conf-parser.c similarity index 100% rename from conf-parser.c rename to src/conf-parser.c diff --git a/conf-parser.h b/src/conf-parser.h similarity index 100% rename from conf-parser.h rename to src/conf-parser.h diff --git a/dbus-automount.c b/src/dbus-automount.c similarity index 100% rename from dbus-automount.c rename to src/dbus-automount.c diff --git a/dbus-automount.h b/src/dbus-automount.h similarity index 100% rename from dbus-automount.h rename to src/dbus-automount.h diff --git a/dbus-device.c b/src/dbus-device.c similarity index 100% rename from dbus-device.c rename to src/dbus-device.c diff --git a/dbus-device.h b/src/dbus-device.h similarity index 100% rename from dbus-device.h rename to src/dbus-device.h diff --git a/dbus-execute.c b/src/dbus-execute.c similarity index 100% rename from dbus-execute.c rename to src/dbus-execute.c diff --git a/dbus-execute.h b/src/dbus-execute.h similarity index 100% rename from dbus-execute.h rename to src/dbus-execute.h diff --git a/dbus-job.c b/src/dbus-job.c similarity index 100% rename from dbus-job.c rename to src/dbus-job.c diff --git a/dbus-job.h b/src/dbus-job.h similarity index 100% rename from dbus-job.h rename to src/dbus-job.h diff --git a/dbus-manager.c b/src/dbus-manager.c similarity index 100% rename from dbus-manager.c rename to src/dbus-manager.c diff --git a/dbus-manager.h b/src/dbus-manager.h similarity index 100% rename from dbus-manager.h rename to src/dbus-manager.h diff --git a/dbus-mount.c b/src/dbus-mount.c similarity index 100% rename from dbus-mount.c rename to src/dbus-mount.c diff --git a/dbus-mount.h b/src/dbus-mount.h similarity index 100% rename from dbus-mount.h rename to src/dbus-mount.h diff --git a/dbus-service.c b/src/dbus-service.c similarity index 100% rename from dbus-service.c rename to src/dbus-service.c diff --git a/dbus-service.h b/src/dbus-service.h similarity index 100% rename from dbus-service.h rename to src/dbus-service.h diff --git a/dbus-snapshot.c b/src/dbus-snapshot.c similarity index 100% rename from dbus-snapshot.c rename to src/dbus-snapshot.c diff --git a/dbus-snapshot.h b/src/dbus-snapshot.h similarity index 100% rename from dbus-snapshot.h rename to src/dbus-snapshot.h diff --git a/dbus-socket.c b/src/dbus-socket.c similarity index 100% rename from dbus-socket.c rename to src/dbus-socket.c diff --git a/dbus-socket.h b/src/dbus-socket.h similarity index 100% rename from dbus-socket.h rename to src/dbus-socket.h diff --git a/dbus-swap.c b/src/dbus-swap.c similarity index 100% rename from dbus-swap.c rename to src/dbus-swap.c diff --git a/dbus-swap.h b/src/dbus-swap.h similarity index 100% rename from dbus-swap.h rename to src/dbus-swap.h diff --git a/dbus-target.c b/src/dbus-target.c similarity index 100% rename from dbus-target.c rename to src/dbus-target.c diff --git a/dbus-target.h b/src/dbus-target.h similarity index 100% rename from dbus-target.h rename to src/dbus-target.h diff --git a/dbus-unit.c b/src/dbus-unit.c similarity index 100% rename from dbus-unit.c rename to src/dbus-unit.c diff --git a/dbus-unit.h b/src/dbus-unit.h similarity index 100% rename from dbus-unit.h rename to src/dbus-unit.h diff --git a/dbus.c b/src/dbus.c similarity index 100% rename from dbus.c rename to src/dbus.c diff --git a/dbus.h b/src/dbus.h similarity index 100% rename from dbus.h rename to src/dbus.h diff --git a/device.c b/src/device.c similarity index 100% rename from device.c rename to src/device.c diff --git a/device.h b/src/device.h similarity index 100% rename from device.h rename to src/device.h diff --git a/execute.c b/src/execute.c similarity index 100% rename from execute.c rename to src/execute.c diff --git a/execute.h b/src/execute.h similarity index 100% rename from execute.h rename to src/execute.h diff --git a/fdset.c b/src/fdset.c similarity index 100% rename from fdset.c rename to src/fdset.c diff --git a/fdset.h b/src/fdset.h similarity index 100% rename from fdset.h rename to src/fdset.h diff --git a/hashmap.c b/src/hashmap.c similarity index 100% rename from hashmap.c rename to src/hashmap.c diff --git a/hashmap.h b/src/hashmap.h similarity index 100% rename from hashmap.h rename to src/hashmap.h diff --git a/hostname-setup.c b/src/hostname-setup.c similarity index 100% rename from hostname-setup.c rename to src/hostname-setup.c diff --git a/hostname-setup.h b/src/hostname-setup.h similarity index 100% rename from hostname-setup.h rename to src/hostname-setup.h diff --git a/initctl.c b/src/initctl.c similarity index 100% rename from initctl.c rename to src/initctl.c diff --git a/initreq.h b/src/initreq.h similarity index 100% rename from initreq.h rename to src/initreq.h diff --git a/ioprio.h b/src/ioprio.h similarity index 100% rename from ioprio.h rename to src/ioprio.h diff --git a/job.c b/src/job.c similarity index 100% rename from job.c rename to src/job.c diff --git a/job.h b/src/job.h similarity index 100% rename from job.h rename to src/job.h diff --git a/linux/auto_dev-ioctl.h b/src/linux/auto_dev-ioctl.h similarity index 100% rename from linux/auto_dev-ioctl.h rename to src/linux/auto_dev-ioctl.h diff --git a/list.h b/src/list.h similarity index 100% rename from list.h rename to src/list.h diff --git a/load-dropin.c b/src/load-dropin.c similarity index 100% rename from load-dropin.c rename to src/load-dropin.c diff --git a/load-dropin.h b/src/load-dropin.h similarity index 100% rename from load-dropin.h rename to src/load-dropin.h diff --git a/load-fragment.c b/src/load-fragment.c similarity index 100% rename from load-fragment.c rename to src/load-fragment.c diff --git a/load-fragment.h b/src/load-fragment.h similarity index 100% rename from load-fragment.h rename to src/load-fragment.h diff --git a/log.c b/src/log.c similarity index 100% rename from log.c rename to src/log.c diff --git a/log.h b/src/log.h similarity index 100% rename from log.h rename to src/log.h diff --git a/logger.c b/src/logger.c similarity index 100% rename from logger.c rename to src/logger.c diff --git a/loopback-setup.c b/src/loopback-setup.c similarity index 100% rename from loopback-setup.c rename to src/loopback-setup.c diff --git a/loopback-setup.h b/src/loopback-setup.h similarity index 100% rename from loopback-setup.h rename to src/loopback-setup.h diff --git a/macro.h b/src/macro.h similarity index 100% rename from macro.h rename to src/macro.h diff --git a/main.c b/src/main.c similarity index 100% rename from main.c rename to src/main.c diff --git a/manager.c b/src/manager.c similarity index 100% rename from manager.c rename to src/manager.c diff --git a/manager.h b/src/manager.h similarity index 100% rename from manager.h rename to src/manager.h diff --git a/missing.h b/src/missing.h similarity index 100% rename from missing.h rename to src/missing.h diff --git a/mount-setup.c b/src/mount-setup.c similarity index 100% rename from mount-setup.c rename to src/mount-setup.c diff --git a/mount-setup.h b/src/mount-setup.h similarity index 100% rename from mount-setup.h rename to src/mount-setup.h diff --git a/mount.c b/src/mount.c similarity index 100% rename from mount.c rename to src/mount.c diff --git a/mount.h b/src/mount.h similarity index 100% rename from mount.h rename to src/mount.h diff --git a/namespace.c b/src/namespace.c similarity index 100% rename from namespace.c rename to src/namespace.c diff --git a/namespace.h b/src/namespace.h similarity index 100% rename from namespace.h rename to src/namespace.h diff --git a/ratelimit.c b/src/ratelimit.c similarity index 100% rename from ratelimit.c rename to src/ratelimit.c diff --git a/ratelimit.h b/src/ratelimit.h similarity index 100% rename from ratelimit.h rename to src/ratelimit.h diff --git a/sd-daemon.c b/src/sd-daemon.c similarity index 100% rename from sd-daemon.c rename to src/sd-daemon.c diff --git a/sd-daemon.h b/src/sd-daemon.h similarity index 100% rename from sd-daemon.h rename to src/sd-daemon.h diff --git a/securebits.h b/src/securebits.h similarity index 100% rename from securebits.h rename to src/securebits.h diff --git a/service.c b/src/service.c similarity index 100% rename from service.c rename to src/service.c diff --git a/service.h b/src/service.h similarity index 100% rename from service.h rename to src/service.h diff --git a/set.c b/src/set.c similarity index 100% rename from set.c rename to src/set.c diff --git a/set.h b/src/set.h similarity index 100% rename from set.h rename to src/set.h diff --git a/snapshot.c b/src/snapshot.c similarity index 100% rename from snapshot.c rename to src/snapshot.c diff --git a/snapshot.h b/src/snapshot.h similarity index 100% rename from snapshot.h rename to src/snapshot.h diff --git a/socket-util.c b/src/socket-util.c similarity index 100% rename from socket-util.c rename to src/socket-util.c diff --git a/socket-util.h b/src/socket-util.h similarity index 100% rename from socket-util.h rename to src/socket-util.h diff --git a/socket.c b/src/socket.c similarity index 100% rename from socket.c rename to src/socket.c diff --git a/socket.h b/src/socket.h similarity index 100% rename from socket.h rename to src/socket.h diff --git a/specifier.c b/src/specifier.c similarity index 100% rename from specifier.c rename to src/specifier.c diff --git a/specifier.h b/src/specifier.h similarity index 100% rename from specifier.h rename to src/specifier.h diff --git a/strv.c b/src/strv.c similarity index 100% rename from strv.c rename to src/strv.c diff --git a/strv.h b/src/strv.h similarity index 100% rename from strv.h rename to src/strv.h diff --git a/swap.c b/src/swap.c similarity index 100% rename from swap.c rename to src/swap.c diff --git a/swap.h b/src/swap.h similarity index 100% rename from swap.h rename to src/swap.h diff --git a/systemadm.vala b/src/systemadm.vala similarity index 100% rename from systemadm.vala rename to src/systemadm.vala diff --git a/systemctl.vala b/src/systemctl.vala similarity index 100% rename from systemctl.vala rename to src/systemctl.vala diff --git a/systemd-interfaces.vala b/src/systemd-interfaces.vala similarity index 100% rename from systemd-interfaces.vala rename to src/systemd-interfaces.vala diff --git a/target.c b/src/target.c similarity index 100% rename from target.c rename to src/target.c diff --git a/target.h b/src/target.h similarity index 100% rename from target.h rename to src/target.h diff --git a/test-engine.c b/src/test-engine.c similarity index 100% rename from test-engine.c rename to src/test-engine.c diff --git a/test-job-type.c b/src/test-job-type.c similarity index 100% rename from test-job-type.c rename to src/test-job-type.c diff --git a/test-loopback.c b/src/test-loopback.c similarity index 100% rename from test-loopback.c rename to src/test-loopback.c diff --git a/test-ns.c b/src/test-ns.c similarity index 100% rename from test-ns.c rename to src/test-ns.c diff --git a/timer.c b/src/timer.c similarity index 100% rename from timer.c rename to src/timer.c diff --git a/timer.h b/src/timer.h similarity index 100% rename from timer.h rename to src/timer.h diff --git a/unit-name.c b/src/unit-name.c similarity index 100% rename from unit-name.c rename to src/unit-name.c diff --git a/unit-name.h b/src/unit-name.h similarity index 100% rename from unit-name.h rename to src/unit-name.h diff --git a/unit.c b/src/unit.c similarity index 100% rename from unit.c rename to src/unit.c diff --git a/unit.h b/src/unit.h similarity index 100% rename from unit.h rename to src/unit.h diff --git a/util.c b/src/util.c similarity index 100% rename from util.c rename to src/util.c diff --git a/util.h b/src/util.h similarity index 100% rename from util.h rename to src/util.h diff --git a/utmp-wtmp.c b/src/utmp-wtmp.c similarity index 100% rename from utmp-wtmp.c rename to src/utmp-wtmp.c diff --git a/utmp-wtmp.h b/src/utmp-wtmp.h similarity index 100% rename from utmp-wtmp.h rename to src/utmp-wtmp.h