diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel-install/Makefile | 4 | ||||
-rw-r--r-- | src/libbasic/Makefile | 48 | ||||
-rw-r--r-- | src/libbasic/btrfs-util.h | 2 | ||||
-rw-r--r-- | src/libbasic/fdset.c | 2 | ||||
-rw-r--r-- | src/libbasic/log.c | 2 | ||||
-rw-r--r-- | src/libbasic/log.h | 2 | ||||
-rw-r--r-- | src/libcore/loopback-setup.c | 2 | ||||
-rw-r--r-- | src/libfirewall/Makefile | 1 | ||||
-rw-r--r-- | src/libshared/Makefile | 14 | ||||
-rw-r--r-- | src/libshared/bus-util.h | 6 | ||||
-rw-r--r-- | src/libshared/efivars.c | 2 | ||||
-rw-r--r-- | src/libshared/efivars.h | 2 | ||||
-rw-r--r-- | src/libshared/gpt.h | 2 | ||||
-rw-r--r-- | src/libshared/ptyfwd.h | 2 | ||||
-rw-r--r-- | src/systemd-nspawn/.gitignore | 4 | ||||
-rw-r--r-- | src/systemd-nspawn/Makefile | 34 | ||||
-rw-r--r-- | src/systemd-nspawn/nspawn-expose-ports.c | 2 | ||||
-rw-r--r-- | src/systemd-nspawn/nspawn-expose-ports.h | 4 | ||||
-rw-r--r-- | src/systemd-nspawn/nspawn-network.c | 7 | ||||
-rw-r--r-- | src/systemd-nspawn/nspawn-register.c | 2 | ||||
-rw-r--r-- | src/systemd-nspawn/nspawn-register.h | 2 | ||||
-rw-r--r-- | src/systemd-nspawn/nspawn.c | 5 |
22 files changed, 106 insertions, 45 deletions
diff --git a/src/kernel-install/Makefile b/src/kernel-install/Makefile index 9e6def1a29..9518ba1283 100644 --- a/src/kernel-install/Makefile +++ b/src/kernel-install/Makefile @@ -20,6 +20,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/automake.head.mk + dist_bin_SCRIPTS = \ src/kernel-install/kernel-install @@ -27,3 +30,4 @@ dist_kernelinstall_SCRIPTS = \ src/kernel-install/50-depmod.install \ src/kernel-install/90-loaderentry.install +include $(topsrcdir)/automake.tail.mk diff --git a/src/libbasic/Makefile b/src/libbasic/Makefile index 64971e0423..c115b2fe8e 100644 --- a/src/libbasic/Makefile +++ b/src/libbasic/Makefile @@ -20,6 +20,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/automake.head.mk + noinst_LTLIBRARIES += \ libbasic.la @@ -238,50 +241,53 @@ libbasic_la_LIBADD = \ -lrt \ -lm -src/basic/errno-list.txt: - $(AM_V_at)$(MKDIR_P) $(dir $@) +am_out_files = libbasic.la +CFLAGS += $(libbasic_la_CFLAGS) +CPPFLAGS += -I$(topsrcdir)/src/libsystemd/include +CPPFLAGS += -I$(topoutdir)/src/libsystemd/include +CPPFLAGS += -include $(topoutdir)/config.h +$(outdir)/libbasic.la: $(patsubst src/basic/%.c,$(outdir)/%.lo,$(filter %.c,$(libbasic_la_SOURCES))) $(libbasic_la_LIBADD) + +$(outdir)/af-list.lo: $(outdir)/af-from-name.h $(outdir)/af-to-name.h +$(outdir)/arphrd-list.lo: $(outdir)/arphrd-from-name.h $(outdir)/arphrd-to-name.h +$(outdir)/cap-list.lo: $(outdir)/cap-from-name.h $(outdir)/cap-to-name.h +$(outdir)/errno-list.lo: $(outdir)/errno-from-name.h $(outdir)/errno-to-name.h + +$(outdir)/errno-list.txt: $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@ -src/basic/errno-to-name.h: src/basic/errno-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/errno-to-name.h: $(outdir)/errno-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ -src/basic/af-list.txt: - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/af-list.txt: $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@ -src/basic/af-to-name.h: src/basic/af-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/af-to-name.h: $(outdir)/af-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ -src/basic/arphrd-list.txt: - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/arphrd-list.txt: $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@ -src/basic/arphrd-to-name.h: src/basic/arphrd-list.txt +$(outdir)/arphrd-to-name.h: $(outdir)/arphrd-list.txt $(AM_V_at)$(MKDIR_P) $(dir $@) $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@ -src/basic/arphrd-from-name.gperf: src/basic/arphrd-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@ -src/basic/cap-list.txt: - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/cap-list.txt: $(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ -src/basic/cap-to-name.h: src/basic/cap-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/cap-to-name.h: $(outdir)/cap-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@ -src/basic/cap-from-name.gperf: src/basic/cap-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/cap-from-name.gperf: $(outdir)/cap-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@ -src/basic/cap-from-name.h: src/basic/cap-from-name.gperf - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/cap-from-name.h: $(outdir)/cap-from-name.gperf $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@ +include $(topsrcdir)/automake.tail.mk diff --git a/src/libbasic/btrfs-util.h b/src/libbasic/btrfs-util.h index 37802c2565..29f8ba63d3 100644 --- a/src/libbasic/btrfs-util.h +++ b/src/libbasic/btrfs-util.h @@ -23,7 +23,7 @@ #include <stdint.h> #include <sys/types.h> -#include "sd-id128.h" +#include <systemd/sd-id128.h> #include "time-util.h" diff --git a/src/libbasic/fdset.c b/src/libbasic/fdset.c index 3674d3ed9d..da1162991f 100644 --- a/src/libbasic/fdset.c +++ b/src/libbasic/fdset.c @@ -23,7 +23,7 @@ #include <fcntl.h> #include <stddef.h> -#include "sd-daemon.h" +#include <systemd/sd-daemon.h> #include "fd-util.h" #include "fdset.h" diff --git a/src/libbasic/log.c b/src/libbasic/log.c index d89e6f7274..f625e3bd95 100644 --- a/src/libbasic/log.c +++ b/src/libbasic/log.c @@ -33,7 +33,7 @@ #include <time.h> #include <unistd.h> -#include "sd-messages.h" +#include <systemd/sd-messages.h> #include "alloc-util.h" #include "fd-util.h" diff --git a/src/libbasic/log.h b/src/libbasic/log.h index 60ddead74c..8ccbf8ed70 100644 --- a/src/libbasic/log.h +++ b/src/libbasic/log.h @@ -27,7 +27,7 @@ #include <sys/socket.h> #include <syslog.h> -#include "sd-id128.h" +#include <systemd/sd-id128.h> #include "macro.h" diff --git a/src/libcore/loopback-setup.c b/src/libcore/loopback-setup.c index 04062a7910..d56bbfa6fc 100644 --- a/src/libcore/loopback-setup.c +++ b/src/libcore/loopback-setup.c @@ -20,7 +20,7 @@ #include <net/if.h> #include <stdlib.h> -#include "sd-netlink.h" +#include <systemd/sd-netlink.h> #include "loopback-setup.h" #include "missing.h" diff --git a/src/libfirewall/Makefile b/src/libfirewall/Makefile index 0171d35acd..f0697f1513 100644 --- a/src/libfirewall/Makefile +++ b/src/libfirewall/Makefile @@ -36,3 +36,4 @@ libfirewall_la_LIBADD = \ $(LIBIPTC_LIBS) endif +include $(topsrcdir)/automake.tail.mk diff --git a/src/libshared/Makefile b/src/libshared/Makefile index 0986c817f5..ebaa1a2e33 100644 --- a/src/libshared/Makefile +++ b/src/libshared/Makefile @@ -20,6 +20,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/automake.head.mk + noinst_LTLIBRARIES += \ libshared.la @@ -134,3 +137,14 @@ libshared_la_LIBADD = \ $(LIBIDN_LIBS) \ $(SECCOMP_LIBS) +am_out_files += libshared.la +CPPFLAGS += -I$(topsrcdir)/src/libsystemd/include +CPPFLAGS += -I$(topoutdir)/src/libsystemd/include +CPPFLAGS += -I$(topsrcdir)/src/libbasic +CPPFLAGS += -I$(topoutdir)/src/libbasic +CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" +CPPFLAGS += -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" \ +$(outdir)/libshared.la: \ + $(patsubst src/shared/%.c,$(outdir)/%.lo,$(filter %.c,$(libshared_la_SOURCES))) + +include $(topsrcdir)/automake.tail.mk diff --git a/src/libshared/bus-util.h b/src/libshared/bus-util.h index 204da55682..77474522be 100644 --- a/src/libshared/bus-util.h +++ b/src/libshared/bus-util.h @@ -24,9 +24,9 @@ #include <stdint.h> #include <sys/types.h> -#include "sd-bus-vtable.h" -#include "sd-bus.h" -#include "sd-event.h" +#include <systemd/sd-bus-vtable.h> +#include <systemd/sd-bus.h> +#include <systemd/sd-event.h> #include "hashmap.h" #include "install.h" diff --git a/src/libshared/efivars.c b/src/libshared/efivars.c index 8631a5a5d9..5073c61740 100644 --- a/src/libshared/efivars.c +++ b/src/libshared/efivars.c @@ -27,7 +27,7 @@ #include <sys/stat.h> #include <unistd.h> -#include "sd-id128.h" +#include <systemd/sd-id128.h> #include "alloc-util.h" #include "dirent-util.h" diff --git a/src/libshared/efivars.h b/src/libshared/efivars.h index b61d14c4ec..243151f922 100644 --- a/src/libshared/efivars.h +++ b/src/libshared/efivars.h @@ -23,7 +23,7 @@ #include <stddef.h> #include <stdint.h> -#include "sd-id128.h" +#include <systemd/sd-id128.h> #include "time-util.h" diff --git a/src/libshared/gpt.h b/src/libshared/gpt.h index 52ab29ed5f..9b8f59abee 100644 --- a/src/libshared/gpt.h +++ b/src/libshared/gpt.h @@ -21,7 +21,7 @@ #include <endian.h> -#include "sd-id128.h" +#include <systemd/sd-id128.h> /* We only support root disk discovery for x86, x86-64, Itanium and ARM for * now, since EFI for anything else doesn't really exist, and we only diff --git a/src/libshared/ptyfwd.h b/src/libshared/ptyfwd.h index a046eb4e5e..83c1f60970 100644 --- a/src/libshared/ptyfwd.h +++ b/src/libshared/ptyfwd.h @@ -21,7 +21,7 @@ #include <stdbool.h> -#include "sd-event.h" +#include <systemd/sd-event.h> #include "macro.h" diff --git a/src/systemd-nspawn/.gitignore b/src/systemd-nspawn/.gitignore index 85c81fff24..b1ba4fd9af 100644 --- a/src/systemd-nspawn/.gitignore +++ b/src/systemd-nspawn/.gitignore @@ -1 +1,5 @@ /nspawn-gperf.c +/loopback-setup.c +/loopback-setup.h +/mount-setup.c +/mount-setup.h diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile index e6b1e8e765..e485cac514 100644 --- a/src/systemd-nspawn/Makefile +++ b/src/systemd-nspawn/Makefile @@ -20,6 +20,9 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. +include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk +include $(topsrcdir)/automake.head.mk + systemd_nspawn_SOURCES = \ src/nspawn/nspawn.c \ src/nspawn/nspawn-settings.c \ @@ -43,6 +46,36 @@ systemd_nspawn_SOURCES = \ src/core/loopback-setup.c \ src/core/loopback-setup.h +am_out_files = systemd-nspawn +CPPFLAGS += -I$(topsrcdir)/src/libbasic +CPPFLAGS += -I$(topoutdir)/src/libbasic +CPPFLAGS += -I$(topsrcdir)/src/libshared +CPPFLAGS += -I$(topoutdir)/src/libshared +CPPFLAGS += -I$(topsrcdir)/src/libsystemd/include +CPPFLAGS += -I$(topoutdir)/src/libsystemd/include +CPPFLAGS += -I$(topsrcdir)/src/libudev/include +CPPFLAGS += -I$(topoutdir)/src/libudev/include +$(outdir)/systemd-nspawn: \ + $(outdir)/nspawn.o \ + $(outdir)/nspawn-settings.o \ + $(outdir)/nspawn-mount.o \ + $(outdir)/nspawn-network.o \ + $(outdir)/nspawn-expose-ports.o \ + $(outdir)/nspawn-cgroup.o \ + $(outdir)/nspawn-register.o \ + $(outdir)/nspawn-setuid.o \ + $(outdir)/nspawn-stub-pid1.o \ + $(outdir)/mount-setup.o \ + $(outdir)/loopback-setup.o \ + $(topsrcdir)/libshared/libshared.la $(BLKID_LIBS) + +$(outdir)/mount-setup.c: $(topsrcdir)/src/libcore/mount-setup.c; $(CP) $< $@ +$(outdir)/mount-setup.h: $(topsrcdir)/src/libcore/mount-setup.h; $(CP) $< $@ +$(outdir)/loopback-setup.c: $(topsrcdir)/src/libcore/loopback-setup.c; $(CP) $< $@ +$(outdir)/loopback-setup.h: $(topsrcdir)/src/libcore/loopback-setup.h; $(CP) $< $@ + +$(outdir)/nspawn.o: $(outdir)/loopback-setup.h + nodist_systemd_nspawn_SOURCES = \ src/nspawn/nspawn-gperf.c @@ -63,3 +96,4 @@ systemd_nspawn_LDADD += \ libfirewall.la endif +include $(topsrcdir)/automake.tail.mk diff --git a/src/systemd-nspawn/nspawn-expose-ports.c b/src/systemd-nspawn/nspawn-expose-ports.c index 86124b8779..8122a14f7b 100644 --- a/src/systemd-nspawn/nspawn-expose-ports.c +++ b/src/systemd-nspawn/nspawn-expose-ports.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-netlink.h" +#include <systemd/sd-netlink.h> #include "alloc-util.h" #include "fd-util.h" diff --git a/src/systemd-nspawn/nspawn-expose-ports.h b/src/systemd-nspawn/nspawn-expose-ports.h index 741ad9765c..0e9f8f7e88 100644 --- a/src/systemd-nspawn/nspawn-expose-ports.h +++ b/src/systemd-nspawn/nspawn-expose-ports.h @@ -21,8 +21,8 @@ #include <inttypes.h> -#include "sd-event.h" -#include "sd-netlink.h" +#include <systemd/sd-event.h> +#include <systemd/sd-netlink.h> #include "in-addr-util.h" #include "list.h" diff --git a/src/systemd-nspawn/nspawn-network.c b/src/systemd-nspawn/nspawn-network.c index fcb1efaa74..970eba3ae1 100644 --- a/src/systemd-nspawn/nspawn-network.c +++ b/src/systemd-nspawn/nspawn-network.c @@ -20,13 +20,12 @@ #include <linux/veth.h> #include <net/if.h> -#include "libudev.h" -#include "sd-id128.h" -#include "sd-netlink.h" +#include <libudev.h> +#include <systemd/sd-id128.h> +#include <systemd/sd-netlink.h> #include "alloc-util.h" #include "ether-addr-util.h" -#include "netlink-util.h" #include "nspawn-network.h" #include "siphash24.h" #include "string-util.h" diff --git a/src/systemd-nspawn/nspawn-register.c b/src/systemd-nspawn/nspawn-register.c index 760861089d..3b0d778f43 100644 --- a/src/systemd-nspawn/nspawn-register.c +++ b/src/systemd-nspawn/nspawn-register.c @@ -17,7 +17,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include "sd-bus.h" +#include <systemd/sd-bus.h> #include "bus-error.h" #include "bus-util.h" diff --git a/src/systemd-nspawn/nspawn-register.h b/src/systemd-nspawn/nspawn-register.h index 304c5a485b..c7a50f7477 100644 --- a/src/systemd-nspawn/nspawn-register.h +++ b/src/systemd-nspawn/nspawn-register.h @@ -21,7 +21,7 @@ #include <sys/types.h> -#include "sd-id128.h" +#include <systemd/sd-id128.h> #include "nspawn-mount.h" diff --git a/src/systemd-nspawn/nspawn.c b/src/systemd-nspawn/nspawn.c index ef348c335b..1de527b57b 100644 --- a/src/systemd-nspawn/nspawn.c +++ b/src/systemd-nspawn/nspawn.c @@ -41,8 +41,8 @@ #include <sys/types.h> #include <unistd.h> -#include "sd-daemon.h" -#include "sd-id128.h" +#include <systemd/sd-daemon.h> +#include <systemd/sd-id128.h> #include "alloc-util.h" #include "barrier.h" @@ -69,7 +69,6 @@ #include "missing.h" #include "mkdir.h" #include "mount-util.h" -#include "netlink-util.h" #include "nspawn-cgroup.h" #include "nspawn-expose-ports.h" #include "nspawn-mount.h" |