-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
92 lines (72 loc) · 2.48 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#
# OBJ3 2.06,2.08,2.09 Copyright (c) 2000-2003 Joseph Kiniry, Joseph Goguen
# OBJ3 2.05 Copyright (c) 2000 Sula Ma, Joseph Kiniry, Joseph Goguen
# OBJ3 2.04 Copyright (c) 1988,1991,1993 SRI International
# TRIM Copyright (c) 1994,2001 Lutz Hamel
# All Rights Reserved
#
#
# $Id: Makefile,v 209.4 2003/09/29 15:10:24 kiniry Exp $
#
project = OBJ3
version = 2.09
release = $(project)-$(version)
archives = $(release).tar.gz $(release).zip
binary = bin/*
trim_examples_binaries = FIB INT PEANO
release-dir = release
release-temp = release-temp
textfiles = BUGS.txt FAQ.txt LICENSE.txt README.txt \
RELEASE_NOTES.txt TODO.txt index.txt \
docs/index.txt docs/obj_bib.txt \
source/README.txt
.PHONY: all distribution archives build_archives cleanup documentation \
sources clean clean_archives textfiles version
all: documentation sources $(textfiles)
distribution: clean
find . -name "*.gz" -exec rm -f {} \;
make archives
archives: sources documentation textfiles \
cleanup clean_archives build_archives
build_archives: clean_archives
mkdir -p $(release-dir) $(release-temp)
rsync -av --exclude '**/CVS' --exclude 'CVS' \
--exclude 'release*' \
--exclude '**/.cvsignore' --exclude '.cvsignore' . $(release-temp)
(cd $(release-temp); tar czf ../$(release-dir)/$(release).tar.gz .)
(cd $(release-temp); zip -ryo ../$(release-dir)/$(release).zip .)
cleanup:
find . -name "*~" -exec rm -f {} \;
find . -name "*#" -exec rm -f {} \;
find . -name "core" -exec rm -f {} \;
find . -name ".auto" -exec rm -f {} \;
(cd docs; make cleanup)
(cd source/trim/src; make realclean)
(cd source/trim/examples; rm -f $(trim_examples_binaries))
documentation:
(cd docs; make all)
sources:
mkdir -p bin
(cd source/obj3; make all)
(cd source/trim/src; make all)
(cd source/trim/src; make install)
clean: cleanup clean_archives
rm -f $(textfiles) $(binary) *# *~ core
(cd docs; make -k clean)
(cd source/obj3; make -k clean)
(cd source/trim/src; make -k realclean)
(make -k clean_archives)
clean_archives:
rm -rf $(release-dir) $(release-temp)
textfiles: $(textfiles)
source/README.txt: source/README.html
lynx -dump source/README.html > source/README.txt
docs/index.txt: docs/index.html
lynx -dump docs/index.html > docs/index.txt
docs/obj_bib.txt: docs/obj_bib.html
lynx -dump docs/obj_bib.html > docs/obj_bib.txt
%.txt: %.html
lynx -dump $< > `basename $< .html`.txt
version:
find . -type f -and -not -name "*,v*" | xargs grep "\$$Id" | \
gawk "{ print \$$4 }" | gawk "{ x = x + \$$0 ; print x}"