1 # Top-level Makefile for wxGTK by Wolfram Gloger
2 # based on the version for wx-Xt by Martin Sperl
8 #if DIRS are defind make only executes in these diretories
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 $@); \
16 for i in $(DIRS) xxx; do \
17 if test "$$i" != xxx; then \
18 echo "entering directory $$i building $@"; \
19 (cd $$i; ${MAKE} -k $@); \
24 # what to do if a target is not understood:
25 # pass it on to all the children...
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 $@); \
34 for i in $(DIRS) xxx; do \
35 if test "$$i" != xxx; then \
36 echo "entering directory $$i building $@"; \
37 (cd $$i; ${MAKE} -k $@); \
43 @echo "entering directory src building all"
47 @echo "entering directory samples building all"
48 @cd samples; ${MAKE} all
51 @echo "entering directory utils building all"
52 @cd utils; ${MAKE} all
55 @echo "entering directory user building all"
59 @echo "entering directory src for installing"
60 @cd src; ${MAKE} install
61 # @echo "entering directory utils for installing"
62 # @cd utils; ${MAKE} install
64 # the following ones recreate all Makefiles.
69 @setup/general/createall
71 # the following ones define what needs to be done to distribute the
72 # library and its components
75 distrib:: distrib_base distrib_user join_utils join_samples
78 @echo "entering directory samples creating distribution files"
79 @(cd samples; ${MAKE} -k distrib)
82 @echo "entering directory user creating distribution files"
83 @(cd user; ${MAKE} -k distrib)
86 @echo "entering directory utils creating distribution files"
87 @(cd utils; ${MAKE} -k distrib)
89 join_utils:: distrib_utils
92 FILES=`echo distrib/utils/*.tgz `
94 join_samples:: distrib_samples
97 FILES=`echo distrib/samples/*.tgz `
99 join_user:: distrib_user
102 FILES=`echo distrib/user/*.tgz `
105 @# needed are BASEDIR and FILES
106 @if test "x$$BASEDIR" = x; then\
107 echo "BASEDIR not specified.";\
110 @if test "x$$FILES" != x ; then \
111 echo "putting all seperate distribution files:";\
113 echo "into distrib/$(BASEDIR).tgz";\
114 src/gtk/setup/general/jointar $(BASEDIR) $$FILES distrib/$(BASEDIR).tgz; \
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; \
122 @if test ! -d distrib ; then mkdir distrib; fi;
123 @if test ! -f system.list ; then \
124 echo "dummy" > system.list;\
126 @(curr=`pwd`; direc=`basename $$curr`;\
128 echo creating distrib/$$direc.tar from the current directory;\
129 tar -cf /tmp/$$direc.tar \
133 $$direc/template.mak\
135 $$direc/configure.in\
136 $$direc/config.guess\
139 $$direc/user/Makefile \
140 $$direc/utils/Makefile \
141 $$direc/samples/Makefile \
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 \
149 find $$direc/$$each \( -type f -o -type l \) -print \
150 | fgrep -vf /tmp/$$direc.list \
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;\
160 # the following ones are only needed if configure.in has changed
161 # and needs to be updated...
168 | sed "s/config.cache/\$$OSTYPE.config.cache/g" \
169 | sed "s/config.status/\$$OSTYPE.config.status/g" \
170 | sed "s/\*\*--/ --/g" \
172 @chmod a+x configure1
173 @mv configure1 configure