summaryrefslogtreecommitdiff
path: root/web/noweb/Makefile
blob: f2fd5753a62851afee5dfca00b879e78b705e70c (plain)
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
# Copyright 1995-2006 by Norman Ramsey.  All rights reserved.
# See file COPYRIGHT for more information.
#
# Don't edit this file; you should be editing the Makefiles in the
# src and contrib directories.

VERSION=2.12
SHELL=/bin/sh
CINAME=-Nv`echo $(VERSION) | tr . _`
CIMSG=-f -m'standard checkin preparing to export version $(VERSION)'

all:
	@echo "You have no business running 'make' here; please look at the README file"
	@exit 1
source: ;	for i in src; do (cd $$i; make source); done
www: ;		for i in src/xdoc examples; do (cd $$i; make www); done

clean:
	for i in src examples contrib; do (cd $$i; make clean); done
	rm -f nwsrcfilter *~ */*~
clobber: clean
	for i in src examples contrib; do (cd $$i; make clobber); done

DATE:
	(./echo -n "Version $(VERSION) of "; date) > DATE

versioncheck:
	@if [ -z "$(UPPERVERSION)" ]; then echo "run 'make versioncheck' in the parent directory, not here" 1>&2; exit 1; fi
	@if [ "$(VERSION)" = "$(UPPERVERSION)" ]; then echo "Version $(VERSION) OK in Makefile"; else echo "Version mismatch in Makefile: upper $(UPPERVERSION) lower $(VERSION)"; exit 1; fi
	@if [ "$(VERSION)" = "`awk '{print $$2}' DATE`" ]; then echo "Version $(VERSION) OK in DATE"; else ./echo -n "Version mismatch in DATE: "; cat DATE; exit 1; fi
	@if fgrep -s "This is version $(VERSION) of " README; then echo "Version $(VERSION) OK in README"; else echo "Version mismatch in README"; exit 1; fi
	@if fgrep -s "CHANGES FOR VERSION $(VERSION)" CHANGES; then echo "Version $(VERSION) OK in CHANGES"; else echo "Version mismatch in CHANGES"; exit 1; fi
	@if fgrep -s " for version $(VERSION) of" src/README; then echo "Version $(VERSION) OK in src/README"; else echo "Version mismatch in src/README"; exit 1; fi
	@if fgrep -s "version $(VERSION)" src/xdoc/notangle.txt; then echo "Version $(VERSION) OK in src/xdoc/notangle.txt"; else echo "Version mismatch in src/xdoc/notangle.txt"; exit 1; fi

nwsrcfilter: nwsrcfilter.icn
	icont nwsrcfilter

tarnames: clean source nwsrcfilter DATE
	find . -not -type d -not -name FAQ.old -print | ./nwsrcfilter

tar:	clean source nwsrcfilter DATE emacscheck
	chmod +w src/Makefile
	rm -rf /tmp/noweb-$(VERSION)
	mkdir /tmp/noweb-$(VERSION)
	tar cvf - `find . ! -type d -not -name FAQ.old -print | ./nwsrcfilter` | (cd /tmp/noweb-$(VERSION) ; tar xf - )
	(cd /tmp; tar cf - noweb-$(VERSION) ) | gzip -v > ../noweb-$(VERSION).tgz
	rm -f ../noweb.tgz
	(cd .. ; ln -s noweb-$(VERSION).tgz noweb.tgz)
	chmod -w src/Makefile

ctan:	clean source nwsrcfilter DATE emacscheck
	chmod +w src/Makefile
	(cd src; make boot)
	rm -f ../noweb-$(VERSION)-ctan.zip
	find ./* ! -type d -not -name FAQ.old -not -name '.git*' -print | ./nwsrcfilter | sed 's@^@noweb/@' | ( ln -s . noweb; zip ../noweb-$(VERSION)-ctan.zip -@; rm -f noweb )
	chmod -w src/Makefile

emacscheck:
	-echo "Checking to ensure distribution matches personal emacs mode" 1>&2
	diff src/elisp/noweb-mode.el $(HOME)/emacs/noweb-mode.el

checkin:
	(cd src; make "CINAME=$(CINAME)" "CIMSG=$(CIMSG)" checkin)