File: makefile

package info (click to toggle)
mined 2000.10-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 10,904 kB
  • ctags: 2,258
  • sloc: ansic: 130,722; sh: 1,725; makefile: 260; perl: 169; sed: 152; cpp: 28
file content (169 lines) | stat: -rw-r--r-- 5,518 bytes parent folder | download | duplicates (3)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#############################################################################
# default: generate all
all:	mined help manual mnemodoc


#############################################################################
# generation
mined:
	./makemined

minced:
	./makemined minced

help:
	cd src; make help

mnemodoc:
	cd src; make mnemodoc

manual:
	cd man; make


#############################################################################
# installation
install:
	./makemined install

localinstall:
	./makemined localinstall

optinstall:
	./makemined optinstall

homeinstall:
	./makemined homeinstall


#############################################################################
# source distribution and private archives
archive:	all
	./makearch +

beta:	all
	if egrep -e "^printf" -e "^#define debug" src/*.c; then false; fi
	./makearch -

VER=$(shell sed -e 's,^[^0-9]*,,' -e 's,[^0-9][^0-9]*,.,g' -e q VERSION )
LSM=release/mined.lsm
SPEC=release/mined.spec

release:	distribution lsm

lsm:	$(LSM)

rpm:	$(SPEC)

$(SPEC):	DESCR makefile
	echo $(VER)
	echo "# partial spec file for mined" > $(SPEC)
	echo "Name:         mined" >> $(SPEC)
	echo "Group:        Productivity/Editors/Other" >> $(SPEC)
	echo "Version:      $(VER)" >> $(SPEC)
	echo "URL:          http://towo.net/mined/" >> $(SPEC)
	echo "Summary:      Powerful text editor with extensive Unicode and CJK support." >> $(SPEC)
	echo "" >> $(SPEC)
	echo "%description" >> $(SPEC)
	sed -e "s,^,	," DESCR >> $(SPEC)
	echo "" >> $(SPEC)

distribution:	all DESCR
	if egrep -e "^printf" -e "^#define debug" src/*.c; then false; fi
	if tail -1 src/keymaps.cfg | egrep '^#Ful'; then true; else false; fi
	cd src; make check
	./makearch


#############################################################################
# specific distribution packages

packages:	cygwin

REL=$(shell sed -e 's,.*[Rr]elease *\([0-9]*\).*,\1,' -e q README.cygwin )

cygrel=release/cygwin

cygwin:	release/mined-$(VER).tar.gz cygwinbin cygwinsrc

cygwinsrc:
	echo making cygwin source package release $(REL) of mined $(VER)
	mkdir -p $(cygrel)/
	gunzip -c release/mined-$(VER).tar.gz | bzip2 -c > $(cygrel)/mined-$(VER)-$(REL)-src.tar.bz2

cygwinbin:	$(cygrel)/setup.hint
	echo making cygwin package release $(REL) of mined $(VER)
	mkdir -p $(cygrel)/usr/bin $(cygrel)/usr/share/mined $(cygrel)/usr/share/man/man1/
	mkdir -p $(cygrel)/usr/share/doc/Cygwin
	mkdir -p $(cygrel)/usr/share/doc/mined
	cp -fp src/mined.exe $(cygrel)/usr/bin/
	cp -fp usrshare/* $(cygrel)/usr/share/mined/
	cp -fp man/mined.1 $(cygrel)/usr/share/man/man1/
	cp -fp README.cygwin $(cygrel)/usr/share/doc/Cygwin/mined.README
	cp -fp README* LICENSE.GNU CHANGES $(cygrel)/usr/share/doc/mined/
	cd $(cygrel); tar -cf mined-$(VER)-$(REL).tar usr
	cd $(cygrel); rm -f mined-$(VER)-$(REL).tar.bz2
	cd $(cygrel); bzip2 mined-$(VER)-$(REL).tar

$(cygrel)/setup.hint:	DESCR makefile
	mkdir -p $(cygrel)
	echo '# cygwin setup file' > $(cygrel)/setup.hint
	echo '@ mined' >> $(cygrel)/setup.hint
	echo 'sdesc: Powerful text mode editor with extensive Unicode and CJK encoding support.' >> $(cygrel)/setup.hint
	echo 'category: Editors' >> $(cygrel)/setup.hint
	echo 'requires: cygwin' >> $(cygrel)/setup.hint
	echo 'ldesc: "' >> $(cygrel)/setup.hint
	cat DESCR >> $(cygrel)/setup.hint
	echo '"' >> $(cygrel)/setup.hint

$(LSM):	DESCR makefile release/mined-$(VER).tar.gz
	mkdir -p release
	echo $(VER)
	echo "Begin4" > $(LSM)
	echo "Title:		mined" >> $(LSM)
	echo "Version:	$(VER)" >> $(LSM)
	echo "Entered-date:	`date +%Y-%m-%d`" >> $(LSM)
	echo "Description:	Powerful text editor with extensive Unicode and CJK support." >> $(LSM)
	sed -e "s,^,	," DESCR >> $(LSM)
	echo "Keywords:	text editor, Unicode editor, UTF-8 editor, CJK editor" >> $(LSM)
	echo "Author:		mined@towo.net (Thomas Wolff)" >> $(LSM)
	echo "Primary-site:	http://towo.net/mined/" >> $(LSM)
	(cd release; ls -l mined-$(VER).tar.gz) | sed -e "s,[^ ]* *[^ ]* *[^ ]* *[^ ]* *\([^ ]*\).* \([^ ]*\)$$,		\1 \2," >> $(LSM)
	echo "Alternate-site:	http://www.ibiblio.org/pub/Linux/apps/editors/mined-$(VER).tar.gz" >> $(LSM)
	echo "Platforms:	Unix (Linux/Sun/HP/BSD/Mac and more), DOS (djgpp), Windows (cygwin)" >> $(LSM)
	echo "Copying-policy:	GPL with comments" >> $(LSM)
	echo "End" >> $(LSM)

# NetBSD pkgsrc entry
DESCR:	doc/overview.html descr.sed makefile
	sed -f descr.sed doc/overview.html | sed -e "/./ b" -e "$$ d" > DESCR


release/mined-$(VER).tar.gz:	distribution


# PC binary archives (development target, doesn't currently work locally)
bin:	release/mined-$(VER)-cygwin.zip release/mined-$(VER)-dj.zip

release/mined-$(VER)-cygwin.zip:	src/cyg/mined.exe src/cyg/cyg*.dll usrshare/mined.hlp README README.cygwin
	mkdir -p release
	cd src/cyg; zip mined-$(VER)-cygwin.zip mined.exe cyg*.dll
	mv -f src/cyg/mined-$(VER)-cygwin.zip release/
	cd usrshare; zip ../release/mined-$(VER)-cygwin.zip mined.hlp minedmar.bat
	cp -fp README release/mined.txt
	cp -fp README.cygwin release/minedcyg.txt
	cd release; zip mined-$(VER)-cygwin.zip mined.txt minedcyg.txt
	rm -f release/mined.txt release/minedcyg.txt

release/mined-$(VER)-dj.zip:	src/dj/mined.exe usrshare/mined.hlp README
	mkdir -p release
	cd src/dj; zip mined-$(VER)-dj.zip mined.exe
	mv -f src/dj/mined-$(VER)-dj.zip release/
	cd usrshare; zip ../release/mined-$(VER)-dj.zip mined.hlp minedmar.bat
	cp -fp README release/mined.txt
	cd release; zip mined-$(VER)-dj.zip mined.txt
	rm -f release/mined.txt


#############################################################################
# end