1 # Top-level Makefile for wxGTK by Wolfram Gloger
2 # based on the version for wx-Xt by Martin Sperl
6 #if DIRS are defind make only executes in these diretories
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 $@); \
14 for i in $(DIRS) xxx; do \
15 if test "$$i" != xxx; then \
16 echo "entering directory $$i building $@"; \
17 (cd $$i; ${MAKE} -k $@); \
22 # what to do if a target is not understood:
23 # pass it on to all the children...
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 $@); \
32 for i in $(DIRS) xxx; do \
33 if test "$$i" != xxx; then \
34 echo "entering directory $$i building $@"; \
35 (cd $$i; ${MAKE} -k $@); \
41 @echo "entering directory src building all"
45 @echo "entering directory samples building all"
46 @cd samples; ${MAKE} all
49 @echo "entering directory utils building all"
50 @cd utils; ${MAKE} all
53 @echo "entering directory user building all"
56 # the following ones recreate all Makefiles.
61 @install/unix/setup/general/createall
63 # the following ones define what needs to be done to distribute the
64 # library and its components
67 distrib:: distrib_base distrib_user join_utils join_samples
70 @echo "entering directory samples creating distribution files"
71 @(cd samples; ${MAKE} -k distrib)
74 @echo "entering directory user creating distribution files"
75 @(cd user; ${MAKE} -k distrib)
78 @echo "entering directory utils creating distribution files"
79 @(cd utils; ${MAKE} -k distrib)
81 join_utils:: distrib_utils
84 FILES=`echo distrib/utils/*.tgz `
86 join_samples:: distrib_samples
89 FILES=`echo distrib/samples/*.tgz `
91 join_user:: distrib_user
94 FILES=`echo distrib/user/*.tgz `
97 @# needed are BASEDIR and FILES
98 @if test "x$$BASEDIR" = x; then\
99 echo "BASEDIR not specified.";\
102 @if test "x$$FILES" != x ; then \
103 echo "putting all seperate distribution files:";\
105 echo "into distrib/$(BASEDIR).tgz";\
106 src/gtk/setup/general/jointar $(BASEDIR) $$FILES distrib/$(BASEDIR).tgz; \
108 echo "Nothing to join - deleting..."; \
109 echo "This may be the case, if you have not specified FILES."\
110 rm -f distrib/$(BASEDIR).tgz; \
114 @if test ! -d distrib ; then mkdir distrib; fi;
115 @if test ! -f system.list ; then \
116 echo "dummy" > system.list;\
118 @(curr=`pwd`; direc=`basename $$curr`;\
120 echo creating distrib/$$direc.tar from the current directory;\
121 tar -cf /tmp/$$direc.tar \
125 $$direc/template.mak\
127 $$direc/configure.in\
128 $$direc/config.guess\
131 $$direc/user/Makefile \
132 $$direc/utils/Makefile \
133 $$direc/samples/Makefile \
135 sed "s|^\(.*\)$$|/\1/|g" $$direc/system.list \
136 | uniq > /tmp/$$direc.list; \
137 echo "/RCS/" >> /tmp/$$direc.list; \
138 for each in misc docs wx src setup; do \
139 tar -uf /tmp/$$direc.tar \
141 find $$direc/$$each \( -type f -o -type l \) -print \
142 | fgrep -vf /tmp/$$direc.list \
146 echo compressing $$direc.tar to $$direc.tgz;\
147 gzip -9 -c /tmp/$$direc.tar > $$direc/distrib/$$direc.tgz;\
148 rm /tmp/$$direc.tar /tmp/$$direc.list;\
152 # the following ones are only needed if configure.in has changed
153 # and needs to be updated...
160 | sed "s/config.cache/\$$OSTYPE.config.cache/g" \
161 | sed "s/config.status/\$$OSTYPE.config.status/g" \
162 | sed "s/\*\*--/ --/g" \
164 @chmod a+x configure1
165 @mv configure1 configure