-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
72 lines (55 loc) · 1.11 KB
/
Makefile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
.PHONY: all .FORCE
.DEFAULT_GOAL := all
ifeq ($(strip $(V)),)
E := @echo
Q := @
else
E := @\#
Q :=
endif
export E Q
define msg-gen
$(E) " GEN " $(1)
endef
define msg-clean
$(E) " CLEAN " $(1)
endef
export msg-gen msg-clean
MAKEFLAGS += --no-print-directory
export MAKEFLAGS
RM ?= rm -f
MAKE ?= make
GIT ?= git
CP ?= cp -f
CTAGS ?= ctags
PYTHON ?= python3
export RM MAKE GIT C
src-y += src/gscope
src-y += src/gscope.py
src-y += setup.py
tags: $(src-y)
$(call msg-gen,$@)
$(Q) $(CTAGS) --language-force=python $(src-y)
sdist: $(src-y) .FORCE
$(call msg-gen,$@)
$(Q) $(PYTHON) setup.py sdist
.PHONY: sdist
all-y += sdist
# Default target
all: $(all-y)
help:
@echo ' Targets:'
@echo ' all - Build all [*] targets'
@echo ' *sdist - Prepare source distro'
@echo ' tags - Build tags'
.PHONY: help
archive:
$(Q) $(GIT) archive --format=tar --prefix=gscope/ HEAD > gscope.tar
.PHONY: archive
clean:
$(call msg-clean,tags)
$(Q) $(RM) tags
$(call msg-clean,sdist)
$(Q) $(RM) -r dist
.PHONY: clean
.SUFFIXES: