-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile.build_dist
125 lines (106 loc) · 4.05 KB
/
Makefile.build_dist
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
#
# Copyright (c) Mark J. Kilgard, 1999.
#
# This Makefile.build_dist should build a GLUT distribution on Linux.
TOP = .
RM = -rm -rf
# lib - GLUT libraries
# test - GLUT tests
# progs - GLUT programs
# doc - GLUT documentation
SUBDIRS = lib test progs
LDIRT = *.bak glut.tar glut.tar.Z glut.tar.gz glut_data.tar.gz glut_data.tar glut_data.tar.Z disttest data.tmp *.zip
default $(COMMONTARGS): $(_FORCE)
$(SUBDIRS_MAKERULE)
DIST = README NOTICE README.glut2 README.fortran README.xinput \
README.inventor README.irix64bit CHANGES Imakefile Makefile.sgi \
mkmkfiles.imake mkmkfiles.sgi Glut.cf lib test progs man \
README.ibm-shlib README.irix6 FAQ.glut README.glut3 README.linux \
README.man Makefile IAFA-PACKAGE README.mesa README.ada \
include adainclude glutdefs README.win README.mui \
glutmake.bat glutwin32.mak Makefile.win Portability.txt
DIST_NAME = glut-3.8
ZIP_NAME = glut38
ZIP_DATA_NAME = glutdata
glut.tar.gz :
$(RM) disttest $(DIST_NAME) glut.stage1.tar $@
find . -name '.nfs*' -print
./mkmkfiles.imake
$(MAKE) -f Makefile.build_dist tree_clobber
find . -name '*.bak' -print | xargs /bin/rm -f
tar cvf glut.stage1.tar $(DIST)
$(RM) $(DIST_NAME)
mkdir $(DIST_NAME)
( cd $(DIST_NAME) ; tar xvf ../glut.stage1.tar )
( cd $(DIST_NAME) ; find . -name '*.ac' -print | xargs /bin/rm -f )
tar cvf glut.tar $(DIST_NAME)
$(RM) $(DIST_NAME) glut.stage1.tar
gzip -fv glut.tar
ZIP = /usr/bin/zip
zip: glut.tar.gz glut_data.tar.gz
$(RM) disttest
mkdir disttest
( cd disttest ; cp ../glut.tar.gz . ; gunzip glut.tar.gz ; tar xvf glut.tar )
( cd disttest; for i in `find . -name Makefile.win -print` ; do \
rm -f `dirname $$i`/`basename $$i .win` ; \
cp $$i `dirname $$i`/`basename $$i .win` ; \
done )
( cd disttest ; $(ZIP) -r ../$(ZIP_NAME).zip $(DIST_NAME) )
$(RM) disttest
mkdir disttest
( cd disttest ; cp ../glut_data.tar.gz . ; gunzip glut_data.tar.gz ; tar xvf glut_data.tar )
( cd disttest ; $(ZIP) -r ../$(ZIP_DATA_NAME).zip $(DIST_NAME) )
$(RM) disttest
dist: zip
tree_clobber:
$(RM) $(LDIRT)
( cd build ; /bin/rm -f IDB finalidb joinedidb )
$(MAKE) clean
( cd lib/glut ; $(MAKE) clean )
( cd lib/fglut ; $(MAKE) clean )
( cd lib/mui ; $(MAKE) clean )
( cd lib/glut.n32 ; $(MAKE) clean )
( cd lib/fglut.n32 ; $(MAKE) clean )
( cd lib/mui.n32 ; $(MAKE) clean )
( cd lib/glut.n64 ; $(MAKE) clean )
( cd lib/fglut.n64 ; $(MAKE) clean )
( cd lib/mui.n64 ; $(MAKE) clean )
( cd progs/fortran ; $(MAKE) clean )
( cd progs/inventor ; $(MAKE) clean )
( cd progs/tiff ; $(MAKE) clean )
( cd progs/glc ; $(MAKE) clean )
( cd progs/ada ; $(MAKE) clean )
( cd mkfiles ; $(MAKE) clean )
( cd man ; $(MAKE) clean )
( cd adainclude ; $(MAKE) clean )
( cd progs/ada ; $(MAKE) clean )
glut_data.tar.gz :
find . -name '*.bak' -print | xargs /bin/rm -f
tar cvf glut_data.stage1.tar data
$(RM) data.tmp/$(DIST_NAME)
mkdir -p data.tmp/$(DIST_NAME)
( cd data.tmp/$(DIST_NAME) ; tar xvf ../../glut_data.stage1.tar )
( cd data.tmp ; tar cvf ../glut_data.tar $(DIST_NAME) )
$(RM) data.tmp/$(DIST_NAME) glut_data.stage1.tar
gzip -fv glut_data.tar
dist: $(_FORCE)
$(RM) glut.tar.gz glut.tar.Z
$(MAKE) -f Makefile.build_dist glut.tar.gz
.ORDER: glut.tar.gz glut_data.tar.gz
testdist: glut.tar.gz glut_data.tar.gz
$(RM) disttest
mkdir disttest
( cd disttest ; cp ../glut.tar.gz . ; gunzip glut.tar.gz ; tar xvf glut.tar )
( cd disttest ; cp ../glut_data.tar.gz . ; gunzip glut_data.tar.gz ; tar xvf glut_data.tar )
( cd disttest/$(DIST_NAME) ; ./mkmkfiles.imake ; make )
( cd disttest/$(DIST_NAME)/test ; make test )
$(RM) disttest
mkdir disttest
( cd disttest ; cp ../glut.tar.gz . ; gunzip glut.tar.gz ; tar xvf glut.tar )
( cd disttest ; cp ../glut_data.tar.gz . ; gunzip glut_data.tar.gz ; tar xvf glut_data.tar )
( cd disttest/$(DIST_NAME) ; ./mkmkfiles.imake ; make )
( cd disttest/$(DIST_NAME)/test ; make test )
$(RM) disttest
$(SUBDIRS): $(_FORCE)
cd $@; $(MAKE)
$(_FORCE):