Skip to content

Commit

Permalink
makefiles: add generated files as dependencies
Browse files Browse the repository at this point in the history
With the previous commit ("makefiles: stop failing when config.mk does
not exist", 2022-06-23), make will not immediately fail when trying to
build a target without having the proper compile-time flags (which are
defined on common.mk).

For example, when running the command below:

    make distclean && make

It will throw an error only after (mis-)compiling multiple objects.

So add a dependency on config.mk on every target that uses output
variables (such as @name@ / $(NAME)) on its recipe.  And add a
dependency on config.sh on targets that call shell scripts that use
output variables (such as @name@ / $NAME).  Also, add a recipe for
config.mk / config.sh telling to run ./configure, to make it a bit more
obvious just in case.

With this commit, make will abort earlier, by detecting that the
config.mk / config.sh dependency does not exist.  This happens before
trying to execute the recipe.

This also makes the dependencies more accurate, since if config.mk
(which defines some CFLAGS) is changed, the CFLAGS may also have
changed, so a target that uses CFLAGS should probably be considered out
of date in this case anyway.

Relates to #5140.
  • Loading branch information
kmk3 committed Jun 25, 2022
1 parent 8fc2c6d commit a2ecd4d
Show file tree
Hide file tree
Showing 27 changed files with 62 additions and 57 deletions.
23 changes: 14 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 fi
SECCOMP_FILTERS = seccomp seccomp.debug seccomp.32 seccomp.block_secondary seccomp.mdwx seccomp.mdwx.32
ALL_ITEMS = $(APPS) $(SBOX_APPS) $(SBOX_APPS_NON_DUMPABLE) $(MYLIBS)

config.mk config.sh:
printf 'run ./configure to generate %s\n' "$@" >&2
false

.PHONY: all_items $(ALL_ITEMS)
all_items: $(ALL_ITEMS)
$(ALL_ITEMS): $(MYDIRS)
Expand All @@ -31,7 +35,7 @@ mydirs: $(MYDIRS)
$(MYDIRS):
$(MAKE) -C $@

$(MANPAGES): src/man
$(MANPAGES): src/man config.mk
./mkman.sh $(VERSION) src/man/$(basename $@).man $@

man: $(MANPAGES)
Expand Down Expand Up @@ -87,7 +91,7 @@ distclean: clean
$(MAKE) -C test distclean
rm -fr autom4te.cache config.log config.mk config.sh config.status

realinstall:
realinstall: config.mk
# firejail executable
install -m 0755 -d $(DESTDIR)$(bindir)
install -m 0755 src/firejail/firejail $(DESTDIR)$(bindir)
Expand Down Expand Up @@ -171,7 +175,7 @@ install-strip: all
strip $(ALL_ITEMS)
$(MAKE) realinstall

uninstall:
uninstall: config.mk
rm -f $(DESTDIR)$(bindir)/firejail
rm -f $(DESTDIR)$(bindir)/firemon
rm -f $(DESTDIR)$(bindir)/firecfg
Expand Down Expand Up @@ -208,7 +212,7 @@ src

DISTFILES_TEST = test/Makefile test/apps test/apps-x11 test/apps-x11-xorg test/root test/private-lib test/fnetfilter test/fcopy test/environment test/profiles test/utils test/compile test/filters test/network test/fs test/sysutils test/chroot

dist:
dist: config.mk
mv config.sh config.sh.old
mv config.status config.status.old
make distclean
Expand All @@ -223,19 +227,20 @@ dist:
tar -cJvf $(NAME)-$(VERSION).tar.xz $(NAME)-$(VERSION)
rm -fr $(NAME)-$(VERSION)

asc:; ./mkasc.sh $(VERSION)
asc: config.mk
./mkasc.sh $(VERSION)

deb: dist
deb: dist config.sh
./mkdeb.sh

deb-apparmor: dist
deb-apparmor: dist config.sh
./mkdeb.sh -apparmor --enable-apparmor

test-compile: dist
test-compile: dist config.mk
cd test/compile; ./compile.sh $(NAME)-$(VERSION)

.PHONY: rpms
rpms: src/man
rpms: src/man config.mk
./platform/rpm/mkrpm.sh $(NAME) $(VERSION)

extras: all
Expand Down
2 changes: 1 addition & 1 deletion src/bash_completion/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ all: firejail.bash_completion
ROOT = ../..
-include $(ROOT)/config.mk

firejail.bash_completion: firejail.bash_completion.in
firejail.bash_completion: firejail.bash_completion.in $(ROOT)/config.mk
gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp
sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@
rm $@.tmp
Expand Down
4 changes: 2 additions & 2 deletions src/fbuilder/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fbuilder
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fbuilder: $(OBJS)
fbuilder: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fcopy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fcopy
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fcopy: $(OBJS) ../lib/common.o
fcopy: $(OBJS) ../lib/common.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fids/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ all: fids
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h
%.o : %.c $(H_FILE_LIST) ../include/common.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

#fseccomp: $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o
fids: $(OBJS)
fids: $(OBJS $(ROOT)/config.mk)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/firecfg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: firecfg
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/euid_common.h ../include/libnetlink.h ../include/firejail_user.h ../include/pid.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/euid_common.h ../include/libnetlink.h ../include/firejail_user.h ../include/pid.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

firecfg: $(OBJS) ../lib/common.o ../lib/firejail_user.o
firecfg: $(OBJS) ../lib/common.o ../lib/firejail_user.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/firejail_user.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/firejail/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: firejail
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/rundefs.h ../include/common.h ../include/ldd_utils.h ../include/euid_common.h ../include/pid.h ../include/seccomp.h ../include/syscall_i386.h ../include/syscall_x86_64.h ../include/firejail_user.h
%.o : %.c $(H_FILE_LIST) ../include/rundefs.h ../include/common.h ../include/ldd_utils.h ../include/euid_common.h ../include/pid.h ../include/seccomp.h ../include/syscall_i386.h ../include/syscall_x86_64.h ../include/firejail_user.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

firejail: $(OBJS) ../lib/libnetlink.o ../lib/common.o ../lib/ldd_utils.o ../lib/firejail_user.o ../lib/errno.o ../lib/syscall.o
firejail: $(OBJS) ../lib/libnetlink.o ../lib/common.o ../lib/ldd_utils.o ../lib/firejail_user.o ../lib/errno.o ../lib/syscall.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/ldd_utils.o ../lib/firejail_user.o ../lib/errno.o ../lib/syscall.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/firemon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: firemon
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/pid.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/pid.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

firemon: $(OBJS) ../lib/common.o ../lib/pid.o
firemon: $(OBJS) ../lib/common.o ../lib/pid.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/pid.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fldd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fldd
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h ../include/ldd_utils.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h ../include/ldd_utils.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fldd: $(OBJS) ../lib/common.o ../lib/ldd_utils.o
fldd: $(OBJS) ../lib/common.o ../lib/ldd_utils.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/ldd_utils.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fnet
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/libnetlink.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/libnetlink.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fnet: $(OBJS) ../lib/common.o ../lib/libnetlink.o
fnet: $(OBJS) ../lib/common.o ../lib/libnetlink.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/libnetlink.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fnetfilter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fnetfilter
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fnetfilter: $(OBJS) ../lib/common.o
fnetfilter: $(OBJS) ../lib/common.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fnettrace-dns/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fnettrace-dns
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST)
%.o : %.c $(H_FILE_LIST) $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fnettrace-dns: $(OBJS)
fnettrace-dns: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fnettrace-sni/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fnettrace-sni
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST)
%.o : %.c $(H_FILE_LIST) $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fnettrace-sni: $(OBJS)
fnettrace-sni: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fnettrace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fnettrace
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST)
%.o : %.c $(H_FILE_LIST) $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fnettrace: $(OBJS)
fnettrace: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fsec-optimize/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fsec-optimize
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/seccomp.h ../include/syscall.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/seccomp.h ../include/syscall.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fsec-optimize: $(OBJS) ../lib/common.o ../lib/libnetlink.o
fsec-optimize: $(OBJS) ../lib/common.o ../lib/libnetlink.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/errno.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fsec-print/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fsec-print
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/seccomp.h ../include/syscall.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/seccomp.h ../include/syscall.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fsec-print: $(OBJS) ../lib/common.o ../lib/libnetlink.o ../lib/errno.o ../lib/syscall.o
fsec-print: $(OBJS) ../lib/common.o ../lib/libnetlink.o ../lib/errno.o ../lib/syscall.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fseccomp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fseccomp
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/syscall.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fseccomp: $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o
fseccomp: $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/errno.o ../lib/syscall.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/ftee/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: ftee
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST)
%.o : %.c $(H_FILE_LIST) $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

ftee: $(OBJS)
ftee: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/fzenity/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: fzenity
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h
%.o : %.c $(H_FILE_LIST) ../include/common.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

fzenity: $(OBJS)
fzenity: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/jailcheck/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: jailcheck
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/pid.h
%.o : %.c $(H_FILE_LIST) ../include/common.h ../include/pid.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

jailcheck: $(OBJS)
jailcheck: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) ../lib/common.o ../lib/pid.o $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
2 changes: 1 addition & 1 deletion src/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include $(ROOT)/src/common.mk
.PHONY: all
all: $(OBJS)

%.o : %.c $(H_FILE_LIST)
%.o : %.c $(H_FILE_LIST) $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/libpostexecseccomp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now
.PHONY: all
all: libpostexecseccomp.so

%.o : %.c $(H_FILE_LIST) ../include/seccomp.h ../include/rundefs.h
%.o : %.c $(H_FILE_LIST) ../include/seccomp.h ../include/rundefs.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@

libpostexecseccomp.so: $(OBJS)
libpostexecseccomp.so: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -shared -fPIC -z relro -o $@ $(OBJS) -ldl

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/libtrace/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now
.PHONY: all
all: libtrace.so

%.o : %.c $(H_FILE_LIST)
%.o : %.c $(H_FILE_LIST) $(ROOT)/config.mk
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@

libtrace.so: $(OBJS)
libtrace.so: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -shared -fPIC -z relro -o $@ $(OBJS) -ldl

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/libtracelog/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ LDFLAGS += -pie -fPIE -Wl,-z,relro -Wl,-z,now
.PHONY: all
all: libtracelog.so

%.o : %.c $(H_FILE_LIST) ../include/rundefs.h
%.o : %.c $(H_FILE_LIST) ../include/rundefs.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@

libtracelog.so: $(OBJS)
libtracelog.so: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -shared -fPIC -z relro -o $@ $(OBJS) -ldl

.PHONY: clean
Expand Down
2 changes: 1 addition & 1 deletion src/man/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ all: firecfg.man firejail.man firejail-login.man firejail-users.man firejail-pro
ROOT = ../..
-include $(ROOT)/config.mk

%.man: %.txt
%.man: %.txt $(ROOT)/config.mk
gawk -f ./preproc.awk -- $(MANFLAGS) < $< > $@

.PHONY: clean
Expand Down
4 changes: 2 additions & 2 deletions src/profstats/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ all: profstats
ROOT = ../..
include $(ROOT)/src/common.mk

%.o : %.c $(H_FILE_LIST) ../include/common.h
%.o : %.c $(H_FILE_LIST) ../include/common.h $(ROOT)/config.mk
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(INCLUDE) -c $< -o $@

profstats: $(OBJS)
profstats: $(OBJS) $(ROOT)/config.mk
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(EXTRA_LDFLAGS)

.PHONY: clean
Expand Down
2 changes: 1 addition & 1 deletion src/zsh_completion/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ all: _firejail
ROOT = ../..
-include $(ROOT)/config.mk

_firejail: _firejail.in
_firejail: _firejail.in $(ROOT)/config.mk
gawk -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp
sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@
rm $@.tmp
Expand Down

0 comments on commit a2ecd4d

Please sign in to comment.