Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[d2fc2a]: Makefile Maximize Restore History

Download this file

Makefile    61 lines (44 with data), 1.3 kB

 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
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
# should be exuberant ctags
CTAGS = ctags
TAGS : force
$(CTAGS) -e -R .
recursive-clean: force
for x in `find . -name .hg -prune -o -type d`; do \
if [ -r $${x}/Makefile ]; then $(MAKE) -C $${x} clean; \
else TOP=$(TOP) $(MAKE) -C $${x} -f $(TOP)/clocc.mk clean; \
fi ; \
done
hg.log: force
hg log > $@ 2>/dev/null
clocc.diff: force
(clocc diff > $@ && $(RM) $@) || true
clocc.diff.gz: clocc.diff
gzip -9vf $^
hg-stat: force
@hg log --template '{author}\n' | sort | uniq -c | sort -n
@hg log --template '\n' | wc -l
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) .hg .hgignore)
$(RM) $(tarname)