-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
60 lines (45 loc) · 1.46 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
# $Id: Makefile,v 1.14 2007/03/08 22:25:53 sds Exp $
# $Source: /cvsroot/clocc/clocc/Makefile,v $
TOP := $(shell pwd)
LISPEXT := lisp
SOURCES := clocc
include $(TOP)/clocc.mk
TOP_DEP = clocc.$(FASLEXT) src/defsystem-3.x/defsystem.$(FASLEXT)
ifneq ($(DO_DUMP),)
ifneq ($(DUMPEXT),)
clocc-top: clocc-top$(DUMPEXT)
endif
clocc-top$(DUMPEXT): $(TOP_DEP)
$(RUNLISP) $(patsubst %,-i %,$^) -d clocc-top
else
clocc-top: clocc-top.$(FASLEXT)
clocc-top.$(FASLEXT): $(TOP_DEP)
$(RUNLISP) -cat $^ > $@
endif
recursive-clean: force
for x in `find . -type d ! -name CVS`; do \
if [ -r $${x}/Makefile ]; then $(MAKE) -C $${x} clean; \
else TOP=$(TOP) $(MAKE) -C $${x} -f $(TOP)/clocc.mk clean; \
fi ; \
done
cvs.log: force
cvs log > $@ 2>/dev/null
clocc.diff: force
(cvs diff > $@ && $(RM) $@) || true
clocc.diff.gz: clocc.diff
gzip -9vf $^
cvs-stat: cvs.log
@fgrep "author:" cvs.log | sed 's/^.*author: \([^;]*\);.*$$/\1/' | \
sort | uniq -c | sort | sed 's/^/ /';
@fgrep "author:" cvs.log | wc -l;
$(RUNLISP) -i clocc -i src/cllib/base -i src/cllib/cvs \
-x '(funcall (intern "CVS-STAT-LOG" :cllib) "cvs.log")'
fix-perms: force
find . -name \*.lisp -a -perm /+x -print0 | xargs -0 chmod -v a-x
tarname=clocc
TARFILES=INSTALL Makefile README bin clocc.lisp clocc.mk etc src
$(tarname).tgz: force
$(RM) $(tarname); $(LN) -s . $(tarname)
tar -zvhcf $@ $(addprefix $(tarname)/,$(TARFILES)) \
$(addprefix --exclude=,$(FASLFILES) $(JUNK) CVS .cvsignore)
$(RM) $(tarname)