-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathGNUmakefile
33 lines (26 loc) · 845 Bytes
/
GNUmakefile
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
# this assumes a recent system -- you're using GNU make right ?
# POSIX make doesn't support default values, so we export from here.
CFLAGS ?= -O2 -g
CFLAGS += -Wall
export CFLAGS
compress cleanup install install_core install_extra: Makefile
$(MAKE) -f Makefile $@
clean: cleanup
distclean: cleanup
rm -f Makefile
Makefile: Makefile.def GNUmakefile
sed \
-e 's:options= :options= -DUTIME_H -DLSTAT :' \
Makefile.def > Makefile
check:
./tests/runtests.sh
PN = ncompress
PV := $(shell awk '{print $$NF; exit}' Changes)
PATCHVER := $(shell awk '{print $$NF; exit}' patchlevel.h | cut -d\" -f1)
ifneq ($(PV),$(PATCHVER))
$(error Changes has version $(PV) but patchlevel.h has $(PATCHVER))
endif
P = $(PN)-$(PV)
dist:
git archive --prefix=$(P)/ HEAD | gzip -9 > $(P).tar.gz
.PHONY: check clean cleanup compress dist distclean install