xref: /freebsd/contrib/ncurses/dist.mk (revision 7f3dea244c40159a41ab22da77a434d7c5b5e85a)
1# $Id: dist.mk,v 1.162 1999/08/21 23:40:17 tom Exp $
2# Makefile for creating ncurses distributions.
3#
4# This only needs to be used directly as a makefile by developers, but
5# configure mines the current version number out of here.  To move
6# to a new version number, just edit this file and run configure.
7#
8SHELL = /bin/sh
9
10# These define the major/minor/patch versions of ncurses.
11NCURSES_MAJOR = 5
12NCURSES_MINOR = 0
13NCURSES_PATCH = 990821
14
15# We don't append the patch to the version, since this only applies to releases
16VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
17
18DUMP	= lynx -dump
19DUMP2	= $(DUMP) -nolist
20
21ALL	= ANNOUNCE announce.html misc/ncurses-intro.doc misc/hackguide.doc
22
23all :	$(ALL)
24
25dist:	$(ALL)
26	(cd ..;  tar cvf ncurses-$(VERSION).tar `sed <ncurses-$(VERSION)/MANIFEST 's/^./ncurses-$(VERSION)/'`;  gzip ncurses-$(VERSION).tar)
27
28distclean:
29	rm -f $(ALL)
30
31# Don't mess with announce.html.in unless you have lynx available!
32announce.html: announce.html.in
33	sed 's,@VERSION@,$(VERSION),' <announce.html.in >announce.html
34
35ANNOUNCE : announce.html
36	$(DUMP) announce.html >ANNOUNCE
37
38misc/ncurses-intro.doc: misc/ncurses-intro.html
39	$(DUMP2) misc/ncurses-intro.html > misc/ncurses-intro.doc
40misc/hackguide.doc: misc/hackguide.html
41	$(DUMP2) misc/hackguide.html > misc/hackguide.doc
42
43# Prepare distribution for version control
44vcprepare:
45	find . -type d -exec mkdir {}/RCS \;
46
47# Write-lock almost all files not under version control.
48ADA_EXCEPTIONS=$(shell eval 'a="\\\\\|";for x in Ada95/gen/terminal*.m4; do echo -n $${a}Ada95/ada_include/`basename $${x} .m4`; done')
49EXCEPTIONS = 'announce.html$\\|ANNOUNCE\\|misc/.*\\.doc\\|man/terminfo.5\\|lib_gen.c'$(ADA_EXCEPTIONS)
50writelock:
51	for x in `grep -v $(EXCEPTIONS) MANIFEST`; do if [ ! -f `dirname $$x`/RCS/`basename $$x`,v ]; then chmod a-w $${x}; fi; done
52
53# This only works on a clean source tree, of course.
54MANIFEST:
55	-rm -f $@
56	touch $@
57	find . -type f -print |sort | fgrep -v .lsm |fgrep -v .spec >$@
58
59TAGS:
60	etags */*.[ch]
61
62# Makefile ends here
63