diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-07-10 15:32:19 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-07-10 16:36:01 +0200 |
| commit | 1c8397d40d825b17a38f8388f0f5607f074c385d (patch) | |
| tree | eff79af1b0f6129ca8d2d2cbea42e95626c2b5dc | |
| parent | fcf2d1d2f37508ec836612147fd90a55d710355d (diff) | |
| download | man-pages-1c8397d40d825b17a38f8388f0f5607f074c385d.tar.gz | |
Makefile: rename targets that build examples
Use 'build-src' as a prefix, to improve the organization.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rw-r--r-- | Makefile | 43 |
1 files changed, 23 insertions, 20 deletions
@@ -236,7 +236,7 @@ _man8pages := $(filter %$(man8ext),$(_manpages)) _LINT_man_groff :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.lint.man.groff.touch,$(LINTMAN)) _LINT_man_mandoc:=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.lint.man.mandoc.touch,$(LINTMAN)) _SRCPAGEDIRS:=$(patsubst $(MANDIR)/%,$(_SRCDIR)/%.d,$(LINTMAN)) -_UNITS_src :=$(sort $(patsubst $(MANDIR)/%,$(_SRCDIR)/%,$(shell \ +_UNITS_src_src :=$(sort $(patsubst $(MANDIR)/%,$(_SRCDIR)/%,$(shell \ find $(MANDIR)/man?/ -type f \ | grep '$(manext)$$' \ | xargs grep -l '^\.TH ' \ @@ -244,14 +244,14 @@ _UNITS_src :=$(sort $(patsubst $(MANDIR)/%,$(_SRCDIR)/%,$(shell \ <$$m \ sed -n "s,^\... SRC BEGIN (\(.*.[ch]\))$$,$$m.d/\1,p"; \ done))) -_UNITS_h := $(filter %.h,$(_UNITS_src)) -_UNITS_c := $(filter %.c,$(_UNITS_src)) -_UNITS_o := $(patsubst %.c,%.o,$(_UNITS_c)) -_UNITS_bin := $(patsubst %.c,%,$(_UNITS_c)) -_LINT_c_checkpatch := $(patsubst %.c,%.lint.c.checkpatch.touch,$(_UNITS_c)) -_LINT_c_clang-tidy := $(patsubst %.c,%.lint.c.clang-tidy.touch,$(_UNITS_c)) -_LINT_c_cpplint := $(patsubst %.c,%.lint.c.cpplint.touch,$(_UNITS_c)) -_LINT_c_iwyu := $(patsubst %.c,%.lint.c.iwyu.touch,$(_UNITS_c)) +_UNITS_src_h := $(filter %.h,$(_UNITS_src_src)) +_UNITS_src_c := $(filter %.c,$(_UNITS_src_src)) +_UNITS_src_o := $(patsubst %.c,%.o,$(_UNITS_src_c)) +_UNITS_src_bin := $(patsubst %.c,%,$(_UNITS_src_c)) +_LINT_c_checkpatch := $(patsubst %.c,%.lint.c.checkpatch.touch,$(_UNITS_src_c)) +_LINT_c_clang-tidy := $(patsubst %.c,%.lint.c.clang-tidy.touch,$(_UNITS_src_c)) +_LINT_c_cpplint := $(patsubst %.c,%.lint.c.cpplint.touch,$(_UNITS_src_c)) +_LINT_c_iwyu := $(patsubst %.c,%.lint.c.iwyu.touch,$(_UNITS_src_c)) MANDIRS := $(sort $(shell find $(MANDIR)/man? -type d)) _HTMLDIRS := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%/.,$(MANDIRS)) @@ -384,9 +384,9 @@ $(_SRCPAGEDIRS): $(_SRCDIR)/%.d: $(MANDIR)/% | $$(@D)/. $(MKDIR) $@ touch $@ -$(_UNITS_src): $$(patsubst $(_SRCDIR)/%.d,$(MANDIR)/%,$$(@D)) | $$(@D) -$(_UNITS_c): $$(filter $$(@D)/%.h,$(_UNITS_h)) -$(_UNITS_src): +$(_UNITS_src_src): $$(patsubst $(_SRCDIR)/%.d,$(MANDIR)/%,$$(@D)) | $$(@D) +$(_UNITS_src_c): $$(filter $$(@D)/%.h,$(_UNITS_src_h)) +$(_UNITS_src_src): $(info SED $@) <$< \ sed -n \ @@ -398,33 +398,36 @@ $(_UNITS_src): | sed 's/^ //' \ >$@ -$(_UNITS_o): $(_SRCDIR)/%.o: $(_SRCDIR)/%.c +$(_UNITS_src_o): $(_SRCDIR)/%.o: $(_SRCDIR)/%.c $(info CC $@) $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< -$(_UNITS_bin): $(_SRCDIR)/%: $(_SRCDIR)/%.o +$(_UNITS_src_bin): $(_SRCDIR)/%: $(_SRCDIR)/%.o $(info LD $@) $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS) $(_SRCDIRS): %/.: | $$(dir %). $(_SRCDIR)/. -.PHONY: build-src src -build-src src: $(_UNITS_c) | builddirs-src +.PHONY: build-src-c +build-src-c: $(_UNITS_src_c) | builddirs-src @: -.PHONY: build-cc -build-cc: $(_UNITS_o) +.PHONY: build-src-cc +build-src-cc: $(_UNITS_src_o) @: -.PHONY: build-ld -build-ld: $(_UNITS_bin) +.PHONY: build-src-ld +build-src-ld: $(_UNITS_src_bin) @: .PHONY: builddirs-src builddirs-src: $(_SRCDIRS) @: +.PHONY: build-src +build-src: build-src-ld + ######################################################################## # lint-c |
