-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (43 loc) · 1.24 KB
/
Copy pathMakefile
File metadata and controls
53 lines (43 loc) · 1.24 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
# TARGETS:
#
# distfiles - generates a distfile
#
# site - generates a set of these pages with a customized header.
# make SITE=foo site
# uses the file 'foo.html' as a header and puts the results
# into 'foo/'
# note, this should be synchronized with 'index.html'
VER=1.6A
FILES= README ${HTMLFILES} ${IMAGES} mstrip.obj favicon.xpm
HTMLFILES=\
copying.html \
erinfo.html \
index.html \
rghinfo.html \
rhoinfo.html \
tmetinfo.html
IMAGES= mstrip.gif favicon.ico
distfiles: mcalc-$(VER).tar.gz
mcalc-$(VER).tar.gz: $(FILES) Makefile
mkdir mcalc-$(VER)
cp -p $(FILES) mcalc-$(VER)
tar -cvf - mcalc-$(VER) | gzip > mcalc-$(VER).tar.gz
zip -r mcalc-$(VER).zip mcalc-$(VER)
rm -fr mcalc-$(VER)
@echo mcalc-$(VER).tar.gz is ready
@echo mcalc-$(VER).zip is ready
favicon.ico: favicon.xpm
xpmtoppm favicon.xpm | ppmtowinicon > $@
site: ${SITE}
.PHONY : ${SITE}
${SITE}: ${FILES} ${SITE}.html Makefile
test -f ${SITE}.html
rm -fr $@
mkdir $@
cp upload $@
cp ${IMAGES} $@
for f in ${HTMLFILES} ; do \
awk 'BEGIN{p=1} /^<\!--FOOTER-->/ {p=0} p==1 {print} ' $$f > $@/$$f ;\
cat ${SITE}.html >> $@/$$f ;\
awk 'BEGIN{p=0} p==1 {print} /^<\!--FOOTER-->/ {p=1} ' $$f >> $@/$$f ;\
done