diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-10-01 16:37:39 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-10-01 16:37:39 +0200 |
commit | facd05e01768369c3b950093aba7e36814674439 (patch) | |
tree | 16df2386e79951511e369bb27dc45eb4a4db7c6c /Makefile | |
parent | 875d015fc4743a457ca504ccf3ef3a9ae26d0eb3 (diff) | |
download | dna-backup-facd05e01768369c3b950093aba7e36814674439.tar.gz dna-backup-facd05e01768369c3b950093aba7e36814674439.zip |
call clean and all targets on submakes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -1,13 +1,14 @@ BIN := dna-backup SRC := $(shell find . -not \( -path './exp' -prune \) -type f -name '*.go') V := $(if $(CI),-v) +SUBDIRS := exp # Default installation paths PREFIX ?= /usr/local BINDIR = $(DESTDIR)$(PREFIX)/bin .PHONY: all -all: build +all: build $(SUBDIRS) .PHONY: build build: $(BIN) @@ -16,17 +17,16 @@ $(BIN): $(SRC) go build $V -o $@ .PHONY: clean -clean: +clean: buildclean $(SUBDIRS) + +.PHONY: buildclean +buildclean: rm -rf $(BIN) .PHONY: test test: go test $V ./... -.PHONY: exp -exp: - $(MAKE) -C $@ - .PHONY: install install: $(BIN) install -D $(BIN) $(BINDIR) @@ -34,3 +34,7 @@ install: $(BIN) .PHONY: uninstall uninstall: -rm -f $(BINDIR)/$(BIN) + +.PHONY: $(SUBDIRS) +$(SUBDIRS): + $(MAKE) -C $@ $(MAKECMDGOALS) |