~ianmjones/snippetpixie

ref: pre-gui snippetpixie/Makefile -rw-r--r-- 755 bytes
bdbfe62aIan M. Jones Revert "Add skeleton AutoExpander." 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
sub_dirs := pkg internal cmd
target_dirs := $(foreach dir,$(sub_dirs),$(wildcard $(dir)/*))
make_target_dirs = $(foreach dir,$(target_dirs),$(MAKE) -C $(dir) $@;)
binaries := cmd/cli/snippetpixie cmd/daemon/snippetpixied
tgz_src = $(foreach binary,$(binaries),-C $(dir $(realpath $(binary))) $(notdir $(binary)))
tgz := snippetpixie.tgz

all: target_dirs

.PHONY: all target_dirs $(target_dirs) tgz test test-verbose clean clean-all tidy

target_dirs: $(target_dirs)

$(target_dirs):
	$(MAKE) -C $@

tgz: $(tgz)

$(tgz): $(binaries)
	tar -czf $@ $(tgz_src)

$(binaries): all

test:
	$(make_target_dirs)

test-verbose:
	$(make_target_dirs)

clean:
	rm -f $(tgz)
	$(make_target_dirs)

clean-all:
	$(make_target_dirs)

tidy:
	go mod tidy
	$(make_target_dirs)