diff options
author | 2024-05-29 21:27:50 +0000 | |
---|---|---|
committer | 2024-05-29 21:27:50 +0000 | |
commit | abc6996cc5993fc3e6cc8835d0c2eddb8aa9c14d (patch) | |
tree | d3417697b69c1af51b39c2152a2dd65274380aad /src | |
parent | profiles: libreoffice: support signing documents with GPG (#6353) (diff) | |
parent | build: allow overriding common tools (diff) | |
download | firejail-abc6996cc5993fc3e6cc8835d0c2eddb8aa9c14d.tar.gz firejail-abc6996cc5993fc3e6cc8835d0c2eddb8aa9c14d.tar.zst firejail-abc6996cc5993fc3e6cc8835d0c2eddb8aa9c14d.zip |
Merge pull request #6354 from kmk3/build-tool-vars
build: allow overriding common tools
Diffstat (limited to 'src')
-rw-r--r-- | src/bash_completion/Makefile | 7 | ||||
-rw-r--r-- | src/man/Makefile | 10 | ||||
-rw-r--r-- | src/prog.mk | 5 | ||||
-rw-r--r-- | src/so.mk | 5 | ||||
-rw-r--r-- | src/zsh_completion/Makefile | 7 |
5 files changed, 25 insertions, 9 deletions
diff --git a/src/bash_completion/Makefile b/src/bash_completion/Makefile index c7ef6afc6..c06323f64 100644 --- a/src/bash_completion/Makefile +++ b/src/bash_completion/Makefile | |||
@@ -2,14 +2,17 @@ | |||
2 | ROOT = ../.. | 2 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 3 | -include $(ROOT)/config.mk |
4 | 4 | ||
5 | GAWK ?= gawk | ||
6 | RM ?= rm -f | ||
7 | |||
5 | .PHONY: all | 8 | .PHONY: all |
6 | all: firejail.bash_completion | 9 | all: firejail.bash_completion |
7 | 10 | ||
8 | firejail.bash_completion: firejail.bash_completion.in $(ROOT)/config.mk | 11 | firejail.bash_completion: firejail.bash_completion.in $(ROOT)/config.mk |
9 | $(GAWK) -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp | 12 | $(GAWK) -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp |
10 | sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ | 13 | sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ |
11 | rm $@.tmp | 14 | $(RM) $@.tmp |
12 | 15 | ||
13 | .PHONY: clean | 16 | .PHONY: clean |
14 | clean: | 17 | clean: |
15 | rm -fr firejail.bash_completion | 18 | $(RM) -r firejail.bash_completion |
diff --git a/src/man/Makefile b/src/man/Makefile index 1c1fd49a5..767920e2b 100644 --- a/src/man/Makefile +++ b/src/man/Makefile | |||
@@ -2,6 +2,10 @@ | |||
2 | ROOT = ../.. | 2 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 3 | -include $(ROOT)/config.mk |
4 | 4 | ||
5 | GAWK ?= gawk | ||
6 | GZIP ?= gzip | ||
7 | RM ?= rm -f | ||
8 | |||
5 | MOD_DIR := $(ROOT)/src/man | 9 | MOD_DIR := $(ROOT)/src/man |
6 | MANPAGES_IN := $(sort $(wildcard $(MOD_DIR)/*.in)) | 10 | MANPAGES_IN := $(sort $(wildcard $(MOD_DIR)/*.in)) |
7 | MANPAGES_GZ := $(MANPAGES_IN:.in=.gz) | 11 | MANPAGES_GZ := $(MANPAGES_IN:.in=.gz) |
@@ -19,8 +23,8 @@ $(MOD_DIR)/%: $(MOD_DIR)/%.in $(ROOT)/config.mk | |||
19 | # foo.1.gz: foo.1 | 23 | # foo.1.gz: foo.1 |
20 | $(MOD_DIR)/%.gz: $(MOD_DIR)/% | 24 | $(MOD_DIR)/%.gz: $(MOD_DIR)/% |
21 | @printf 'Generating %s from %s\n' $@ $< | 25 | @printf 'Generating %s from %s\n' $@ $< |
22 | @rm -f $@ | 26 | @$(RM) $@ |
23 | @gzip -n9 $< | 27 | @$(GZIP) -n9 $< |
24 | 28 | ||
25 | .PHONY: clean | 29 | .PHONY: clean |
26 | clean:; rm -f *.1 *.5 *.gz | 30 | clean:; $(RM) *.1 *.5 *.gz |
diff --git a/src/prog.mk b/src/prog.mk index a639e87fc..3e89a6ba8 100644 --- a/src/prog.mk +++ b/src/prog.mk | |||
@@ -5,6 +5,9 @@ | |||
5 | # The includer should probably define PROG and TARGET and may also want to | 5 | # The includer should probably define PROG and TARGET and may also want to |
6 | # define EXTRA_OBJS and extend CLEANFILES. | 6 | # define EXTRA_OBJS and extend CLEANFILES. |
7 | 7 | ||
8 | CC ?= cc | ||
9 | RM ?= rm -f | ||
10 | |||
8 | HDRS := | 11 | HDRS := |
9 | SRCS := $(sort $(wildcard $(MOD_DIR)/*.c)) | 12 | SRCS := $(sort $(wildcard $(MOD_DIR)/*.c)) |
10 | OBJS := $(SRCS:.c=.o) | 13 | OBJS := $(SRCS:.c=.o) |
@@ -25,4 +28,4 @@ $(PROG): $(OBJS) $(EXTRA_OBJS) $(ROOT)/config.mk | |||
25 | $(CC) $(PROG_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRA_OBJS) $(LIBS) | 28 | $(CC) $(PROG_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(EXTRA_OBJS) $(LIBS) |
26 | 29 | ||
27 | .PHONY: clean | 30 | .PHONY: clean |
28 | clean:; rm -fr $(PROG) $(CLEANFILES) | 31 | clean:; $(RM) -r $(PROG) $(CLEANFILES) |
@@ -5,6 +5,9 @@ | |||
5 | # The includer should probably define SO and TARGET and may also want to define | 5 | # The includer should probably define SO and TARGET and may also want to define |
6 | # EXTRA_OBJS and extend CLEANFILES. | 6 | # EXTRA_OBJS and extend CLEANFILES. |
7 | 7 | ||
8 | CC ?= cc | ||
9 | RM ?= rm -f | ||
10 | |||
8 | HDRS := | 11 | HDRS := |
9 | SRCS := $(sort $(wildcard $(MOD_DIR)/*.c)) | 12 | SRCS := $(sort $(wildcard $(MOD_DIR)/*.c)) |
10 | OBJS := $(SRCS:.c=.o) | 13 | OBJS := $(SRCS:.c=.o) |
@@ -25,4 +28,4 @@ $(SO): $(OBJS) $(EXTRA_OBJS) $(ROOT)/config.mk | |||
25 | $(CC) $(SO_LDFLAGS) -shared $(LDFLAGS) -o $@ $(OBJS) $(EXTRA_OBJS) -ldl | 28 | $(CC) $(SO_LDFLAGS) -shared $(LDFLAGS) -o $@ $(OBJS) $(EXTRA_OBJS) -ldl |
26 | 29 | ||
27 | .PHONY: clean | 30 | .PHONY: clean |
28 | clean:; rm -fr $(SO) $(CLEANFILES) | 31 | clean:; $(RM) -r $(SO) $(CLEANFILES) |
diff --git a/src/zsh_completion/Makefile b/src/zsh_completion/Makefile index e964d39ec..cbc476a73 100644 --- a/src/zsh_completion/Makefile +++ b/src/zsh_completion/Makefile | |||
@@ -2,14 +2,17 @@ | |||
2 | ROOT = ../.. | 2 | ROOT = ../.. |
3 | -include $(ROOT)/config.mk | 3 | -include $(ROOT)/config.mk |
4 | 4 | ||
5 | GAWK ?= gawk | ||
6 | RM ?= rm -f | ||
7 | |||
5 | .PHONY: all | 8 | .PHONY: all |
6 | all: _firejail | 9 | all: _firejail |
7 | 10 | ||
8 | _firejail: _firejail.in $(ROOT)/config.mk | 11 | _firejail: _firejail.in $(ROOT)/config.mk |
9 | $(GAWK) -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp | 12 | $(GAWK) -f ../man/preproc.awk -- $(MANFLAGS) < $< > $@.tmp |
10 | sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ | 13 | sed "s|_SYSCONFDIR_|$(sysconfdir)|" < $@.tmp > $@ |
11 | rm $@.tmp | 14 | $(RM) $@.tmp |
12 | 15 | ||
13 | .PHONY: clean | 16 | .PHONY: clean |
14 | clean: | 17 | clean: |
15 | rm -fr _firejail | 18 | $(RM) -r _firejail |