comparison anagram/run/DEFS.mk @ 0:13d2b8934445

Import AnaGram (near-)release tree into Mercurial.
author David A. Holland
date Sat, 22 Dec 2007 17:52:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:13d2b8934445
1 CHECKSUM=$(BUILDTOP)/checksum/checksum
2 INSERTSUMS=$(BUILDTOP)/insertsums/insertsums
3
4 include $(BUILDTOP)/config.mk
5 include $(TOP)/mk/installdirs.mk
6
7 FILES.nogui=agcl$(EXEEXT)
8 FILES.hasgui=agcl$(EXEEXT) ag$(EXEEXT)
9 FILES.noshlib=
10 FILES.hasshlib=ag1$(AGLIBEXT)
11
12
13 FILES=$(FILES.$(HASGUI)) $(FILES.$(HASSHLIB))
14
15 ############################################################
16
17 all: .stamp.sums
18
19 .stamp.sums: sums.dat sums.ctl $(INSERTSUMS)
20 @echo -n ' [INSERT] sums.dat -> '
21 @sed < sums.ctl 's/#.*//;s/ .*//;s,.*/,,' | tr '\n' ' '
22 @echo
23 @$(INSERTSUMS) sums.dat sums.ctl
24 @touch .stamp.sums
25
26 sums.dat sums.ctl: $(FILES) $(CHECKSUM)
27 @rm -f sums.*
28 @echo -n ' [SUM] '
29 @if [ $(HASSHLIB) = hasshlib ]; then \
30 echo -n ' ag1$(AGLIBEXT)'; \
31 $(CHECKSUM) sums ag1 ag1$(AGLIBEXT); \
32 fi
33 @if [ $(HASGUI) = hasgui ]; then \
34 echo -n ' ag$(EXEEXT)'; \
35 $(CHECKSUM) sums ag ag$(EXEEXT); \
36 fi
37 @echo -n ' agcl$(EXEEXT)'
38 @$(CHECKSUM) sums agcl agcl$(EXEEXT)
39 @echo
40 @echo ' [BUILDINFO]'
41 @echo -n 'Build date:' >> sums.dat
42 @date '+%b %d %Y' >> sums.dat
43 @echo -n 'Build OS:' >> sums.dat
44 @(cat /etc/redhat-release 2>/dev/null || uname -sr; echo) |\
45 sed '2,$$d' >> sums.dat
46
47 ##############################
48
49 ag1$(AGLIBEXT): ../ag1/ag1$(AGLIBEXT)
50 @echo ' [CP] $@'
51 @cp ../ag1/ag1$(AGLIBEXT) $@
52
53 ag$(EXEEXT): ../ag/ag$(EXEEXT)
54 @echo ' [CP] $@'
55 @cp ../ag/ag$(EXEEXT) $@
56
57 agcl$(EXEEXT): ../agcl/agcl$(EXEEXT)
58 @echo ' [CP] $@'
59 @cp ../agcl/agcl$(EXEEXT) $@
60
61 ##############################
62
63 install.hasshlib:
64 @$(TOP)/mk/mkinstalldirs.sh "$(LIBDIR)"
65 @echo ' [CP] ag1$(AGLIBEXT)'
66 @cp ag1$(AGLIBEXT) "$(LIBDIR)/ag1$(AGLIBEXT)"
67 @chmod 644 "$(LIBDIR)/ag1$(AGLIBEXT)"
68
69 install.hasgui:
70 @$(TOP)/mk/mkinstalldirs.sh "$(BINDIR)"
71 @echo ' [CP] ag$(EXEEXT)'
72 @cp ag$(EXEEXT) "$(BINDIR)/ag$(EXEEXT)"
73 @chmod 755 "$(BINDIR)/ag$(EXEEXT)"
74
75 install.noshlib install.nogui:;
76
77 install: install.$(HASSHLIB) install.$(HASGUI)
78 @$(TOP)/mk/mkinstalldirs.sh "$(BINDIR)"
79 @echo ' [CP] agcl$(EXEEXT)'
80 @cp agcl$(EXEEXT) "$(BINDIR)/agcl$(EXEEXT)"
81 @chmod 755 "$(BINDIR)/agcl$(EXEEXT)"
82
83 ##############################
84
85 rules depend agfiles agclean:;
86
87 clean distclean: cleansums
88 cleansums:
89 @echo ' [RM] $(FILES)'
90 @rm -f $(FILES)
91 @echo ' [RM] sums.ctl sums.dat .stamp.sums'
92 @rm -f sums.ctl sums.dat .stamp.sums
93
94 .PHONY: all rules depend clean distclean cleansums
95 .PHONY: install install.hasshlib install.noshlib install.hasgui install.nogui