]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | # Top-level Makefile for wxGTK by Wolfram Gloger |
2 | # based on the version for wx-Xt by Martin Sperl | |
3 | ||
4 | SHELL=/bin/sh | |
5 | ||
6 | #if DIRS are defind make only executes in these diretories | |
7 | all:: | |
8 | @if test "x$(DIRS)" = x; then \ | |
9 | for i in src samples utils user; do \ | |
10 | echo "entering directory $$i building $@"; \ | |
11 | (cd $$i; ${MAKE} -k $@); \ | |
12 | done; \ | |
13 | else \ | |
14 | for i in $(DIRS) xxx; do \ | |
15 | if test "$$i" != xxx; then \ | |
16 | echo "entering directory $$i building $@"; \ | |
17 | (cd $$i; ${MAKE} -k $@); \ | |
18 | fi; \ | |
19 | done; \ | |
20 | fi | |
21 | ||
22 | # what to do if a target is not understood: | |
23 | # pass it on to all the children... | |
24 | ||
25 | .DEFAULT:: | |
26 | @if test "x$(DIRS)" = x; then \ | |
27 | for i in src samples utils user; do \ | |
28 | echo "entering directory $$i building $@"; \ | |
29 | (cd $$i; ${MAKE} -k $@); \ | |
30 | done; \ | |
31 | else \ | |
32 | for i in $(DIRS) xxx; do \ | |
33 | if test "$$i" != xxx; then \ | |
34 | echo "entering directory $$i building $@"; \ | |
35 | (cd $$i; ${MAKE} -k $@); \ | |
36 | fi; \ | |
37 | done; \ | |
38 | fi | |
39 | ||
40 | src:: | |
41 | @echo "entering directory src building all" | |
42 | @cd src; ${MAKE} all | |
43 | ||
44 | samples:: | |
45 | @echo "entering directory samples building all" | |
46 | @cd samples; ${MAKE} all | |
47 | ||
48 | utils:: | |
49 | @echo "entering directory utils building all" | |
50 | @cd utils; ${MAKE} all | |
51 | ||
52 | user:: | |
53 | @echo "entering directory user building all" | |
54 | @cd user; ${MAKE} all | |
55 | ||
c98f0421 RR |
56 | install:: |
57 | @echo "entering directory src for installing" | |
58 | @cd src; ${MAKE} install | |
59 | @echo "entering directory utils for installing" | |
60 | @cd utils; ${MAKE} install | |
61 | ||
c801d85f KB |
62 | # the following ones recreate all Makefiles. |
63 | ||
64 | makefiles:: recreate | |
65 | Makefiles:: recreate | |
66 | recreate:: | |
bcf1fa6b | 67 | @setup/general/createall |
c801d85f KB |
68 | |
69 | # the following ones define what needs to be done to distribute the | |
70 | # library and its components | |
71 | ||
72 | distribute:: distrib | |
73 | distrib:: distrib_base distrib_user join_utils join_samples | |
74 | ||
75 | distrib_samples:: | |
76 | @echo "entering directory samples creating distribution files" | |
77 | @(cd samples; ${MAKE} -k distrib) | |
78 | ||
79 | distrib_user:: | |
80 | @echo "entering directory user creating distribution files" | |
81 | @(cd user; ${MAKE} -k distrib) | |
82 | ||
83 | distrib_utils:: | |
84 | @echo "entering directory utils creating distribution files" | |
85 | @(cd utils; ${MAKE} -k distrib) | |
86 | ||
87 | join_utils:: distrib_utils | |
88 | @$(MAKE) join \ | |
89 | BASEDIR=utils \ | |
90 | FILES=`echo distrib/utils/*.tgz ` | |
91 | ||
92 | join_samples:: distrib_samples | |
93 | @$(MAKE) join \ | |
94 | BASEDIR=samples \ | |
95 | FILES=`echo distrib/samples/*.tgz ` | |
96 | ||
97 | join_user:: distrib_user | |
98 | @$(MAKE) join \ | |
99 | BASEDIR=user \ | |
100 | FILES=`echo distrib/user/*.tgz ` | |
101 | ||
102 | join:: | |
103 | @# needed are BASEDIR and FILES | |
104 | @if test "x$$BASEDIR" = x; then\ | |
105 | echo "BASEDIR not specified.";\ | |
106 | exit -1;\ | |
107 | fi | |
108 | @if test "x$$FILES" != x ; then \ | |
109 | echo "putting all seperate distribution files:";\ | |
110 | echo "$$FILES";\ | |
111 | echo "into distrib/$(BASEDIR).tgz";\ | |
112 | src/gtk/setup/general/jointar $(BASEDIR) $$FILES distrib/$(BASEDIR).tgz; \ | |
113 | else \ | |
114 | echo "Nothing to join - deleting..."; \ | |
115 | echo "This may be the case, if you have not specified FILES."\ | |
116 | rm -f distrib/$(BASEDIR).tgz; \ | |
117 | fi | |
118 | ||
119 | distrib_base:: | |
120 | @if test ! -d distrib ; then mkdir distrib; fi; | |
121 | @if test ! -f system.list ; then \ | |
122 | echo "dummy" > system.list;\ | |
123 | fi | |
124 | @(curr=`pwd`; direc=`basename $$curr`;\ | |
125 | (cd ..; \ | |
126 | echo creating distrib/$$direc.tar from the current directory;\ | |
127 | tar -cf /tmp/$$direc.tar \ | |
128 | $$direc/COPYING\ | |
129 | $$direc/INSTALL\ | |
130 | $$direc/Makefile\ | |
131 | $$direc/template.mak\ | |
132 | $$direc/configure\ | |
133 | $$direc/configure.in\ | |
134 | $$direc/config.guess\ | |
135 | $$direc/config.sub\ | |
136 | $$direc/install-sh\ | |
137 | $$direc/user/Makefile \ | |
138 | $$direc/utils/Makefile \ | |
139 | $$direc/samples/Makefile \ | |
140 | ;\ | |
141 | sed "s|^\(.*\)$$|/\1/|g" $$direc/system.list \ | |
142 | | uniq > /tmp/$$direc.list; \ | |
143 | echo "/RCS/" >> /tmp/$$direc.list; \ | |
144 | for each in misc docs wx src setup; do \ | |
145 | tar -uf /tmp/$$direc.tar \ | |
146 | `\ | |
147 | find $$direc/$$each \( -type f -o -type l \) -print \ | |
148 | | fgrep -vf /tmp/$$direc.list \ | |
149 | | grep -v "[~#]$$" \ | |
150 | ` ;\ | |
151 | done; \ | |
152 | echo compressing $$direc.tar to $$direc.tgz;\ | |
153 | gzip -9 -c /tmp/$$direc.tar > $$direc/distrib/$$direc.tgz;\ | |
154 | rm /tmp/$$direc.tar /tmp/$$direc.list;\ | |
155 | )\ | |
156 | ) | |
157 | ||
158 | # the following ones are only needed if configure.in has changed | |
159 | # and needs to be updated... | |
160 | ||
161 | config:: configure | |
162 | ||
163 | configure:: | |
164 | @autoconf | |
165 | @cat configure \ | |
166 | | sed "s/config.cache/\$$OSTYPE.config.cache/g" \ | |
167 | | sed "s/config.status/\$$OSTYPE.config.status/g" \ | |
168 | | sed "s/\*\*--/ --/g" \ | |
169 | > configure1 | |
170 | @chmod a+x configure1 | |
171 | @mv configure1 configure | |
172 | ||
173 |