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