diff options
author | kremlin <ian@kremlin.cc> | 2014-07-23 05:15:50 +0800 |
---|---|---|
committer | kremlin <ian@kremlin.cc> | 2014-07-23 05:15:50 +0800 |
commit | 79001fac1523c0b5100e3461a96c3e357a5e665c (patch) | |
tree | e6f3a572e9d3a20000a84a90d260c0d04e5ba02c /Makefile | |
parent | aace2439d6df89da8ca082a91a362103ad44a26f (diff) | |
download | systembsd-79001fac1523c0b5100e3461a96c3e357a5e665c.tar systembsd-79001fac1523c0b5100e3461a96c3e357a5e665c.tar.gz systembsd-79001fac1523c0b5100e3461a96c3e357a5e665c.tar.bz2 systembsd-79001fac1523c0b5100e3461a96c3e357a5e665c.tar.lz systembsd-79001fac1523c0b5100e3461a96c3e357a5e665c.tar.xz systembsd-79001fac1523c0b5100e3461a96c3e357a5e665c.tar.zst systembsd-79001fac1523c0b5100e3461a96c3e357a5e665c.zip |
remove genfiles from repo, instead generate in makefile
genfiles (-gen.{c,h}) should be generated at build time instead of
being included in the repo. remove them & add relevant recipes/pre-reqs
include genfiles in 'clean' recipe
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -17,9 +17,11 @@ SYSCONFDIR=/etc SRCDIR=src INTFDIR=$(SRCDIR)/interfaces -DBUS_POLICYDIR=$(SYSCONFDIR)/dbus-1/systemd.d +DBUS_POLICYDIR=$(SYSCONFDIR)/dbus-1/system.d DBUS_CONFIGDIR=$(PREFIX)/share/dbus-1/system-services +INVOKE_GENFILE_SCRIPT=./scripts/gen-gdbus-interfaces.sh + all: build build: _build_interface_objs_debug @@ -29,8 +31,8 @@ publish: _build_interface_objs $(CC) -o bin/out.bin $(CFLAGS) $(GLIBEF) $(SANITY) $(SRCDIR)/main.c clean: - rm bin/* - rm bin/obj/* + find ./bin -type f -exec rm {} \; + find $(INTFDIR)/ -type f -iname *-gen.* -exec rm {} \; install: _install_conf _install_interface_binaries @@ -46,18 +48,24 @@ _build_interface_objs_debug: _build_genfile_objs_debug $(CC) -o bin/systemd-timedated $(DEBUGF) $(GLIBEF) $(SANITY) $(INTFDIR)/timedated/timedated.c bin/obj/timedated-gen.o $(CC) -o bin/systemd-logind $(DEBUGF) $(GLIBEF) $(SANITY) $(INTFDIR)/logind/logind.c bin/obj/logind-gen.o -_build_genfile_objs: +_build_genfile_objs: _generate_genfiles $(CC) -o bin/obj/hostnamed-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/hostnamed/hostnamed-gen.c $(CC) -o bin/obj/localed-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/localed/localed-gen.c $(CC) -o bin/obj/timedated-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/timedated/timedated-gen.c $(CC) -o bin/obj/logind-gen.o $(CFLAGS) $(GLIBOF) $(SANITY) -c $(INTFDIR)/logind/logind-gen.c -_build_genfile_objs_debug: +_build_genfile_objs_debug: _generate_genfiles $(CC) -o bin/obj/hostnamed-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/hostnamed/hostnamed-gen.c $(CC) -o bin/obj/localed-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/localed/localed-gen.c $(CC) -o bin/obj/timedated-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/timedated/timedated-gen.c $(CC) -o bin/obj/logind-gen.o $(DEBUGF) $(GLIBOF) $(SANITY) -c $(INTFDIR)/logind/logind-gen.c +_generate_genfiles: + $(INVOKE_GENFILE_SCRIPT) hostnamed + $(INVOKE_GENFILE_SCRIPT) localed + $(INVOKE_GENFILE_SCRIPT) timedated + $(INVOKE_GENFILE_SCRIPT) logind + _install_conf: cp conf/*-dbus.conf $(DBUS_POLICYDIR)/ cp conf/org.freedesktop.*.service $(DBUS_CONFIGDIR)/ |