XRC: make wxStaticText's wrap property a dimension.
[wxWidgets.git] / build / bakefiles / wx.bkl
1 <?xml version="1.0" ?>
2
3
4 <!-- Master bakefile for wxWidgets -->
5
6 <makefile>
7
8     <!-- make sure setup.h is created as soon as possible: -->
9     <phony id="setup_h" cond="FORMAT!='autoconf'">
10         <dependency-of>all</dependency-of>
11     </phony>
12
13     <set var="BUILDING_LIB">1</set>
14
15     <!-- common rules, names etc. for wx: -->
16     <include file="common.bkl"/>
17
18     <!-- list of files sorted into categories: -->
19     <include file="files.bkl"/>
20
21     <!-- wxWidgets variant where everything is in one library: -->
22     <include file="monolithic.bkl"/>
23     <!-- ...and when there are multiple libraries: -->
24     <include file="multilib.bkl"/>
25
26     <if cond="IS_MSVC_PRJ">
27         <set var="MSVC6PRJ_MERGED_TARGETS">
28             <if cond="MONOLITHIC=='0'">$(MSVC6PRJ_MERGED_TARGETS_MULTILIB)</if>
29             <if cond="MONOLITHIC=='1'">$(MSVC6PRJ_MERGED_TARGETS_MONOLIB)</if>
30         </set>
31     </if>
32
33     <!-- OpenGL canvas is built as separate library in both cases: -->
34     <include file="opengl.bkl"/>
35     <!-- Dynamically loadable plugins: -->
36     <include file="plugins.bkl"/>
37
38     <!-- Samples target (not dependency of 'all'): -->
39     <subproject id="samples">
40         <installable>no</installable>
41         <dir cond="FORMAT=='autoconf'">samples</dir>
42         <dir cond="FORMAT!='autoconf'">../../samples</dir>
43     </subproject>
44
45     <if cond="FORMAT=='autoconf'">
46
47         <!-- WXRC compiler is built by default: -->
48         <!-- FIXME: this is dirty hack, better bakefile support for
49              conditional and optional subprojects is needed -->
50         <action id="wxrc" cond="USE_XRC=='1'">
51             <dependency-of>all</dependency-of>
52
53             <!-- some of these are not built in all configurations, <depends>
54                  takes care of ignoring the disabled ones: -->
55             <depends>monodll</depends>
56             <depends>monolib</depends>
57             <depends>basedll</depends>
58             <depends>baselib</depends>
59             <depends>xmldll</depends>
60             <depends>xmllib</depends>
61
62             <command>
63                 (if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) all ; fi)
64             </command>
65         </action>
66         <action id="clean-wxrc" cond="USE_XRC=='1'">
67             <dependency-of>clean</dependency-of>
68             <command>
69                 (if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) clean ; fi)
70             </command>
71         </action>
72         <action id="install-wxrc" cond="USE_XRC=='1'">
73             <dependency-of>install</dependency-of>
74             <depends>wxrc</depends>
75             <command>
76                 (if test -f utils/wxrc/Makefile ; then cd utils/wxrc &amp;&amp; $(DOLLAR)(MAKE) install ; fi)
77             </command>
78         </action>
79
80         <!-- "make install": -->
81
82         <data-files>
83             <files>wxwin.m4</files>
84             <install-to>$(DATADIR)/aclocal</install-to>
85         </data-files>
86
87         <data-files>
88             <srcdir>$(SRCDIR)/build/bakefiles/wxpresets/presets</srcdir>
89             <files>wx.bkl wx_unix.bkl wx_win32.bkl wx_xrc.bkl wx_presets.py</files>
90             <install-to>$(DATADIR)/bakefile/presets</install-to>
91         </data-files>
92
93         <action id="install-wxconfig">
94             <dependency-of>install</dependency-of>
95             <command>
96                 $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
97                 $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)/wx/config
98                 $(INSTALL_PROGRAM) lib/wx/config/$(TOOLCHAIN_FULLNAME) $(DESTDIR)$(LIBDIR)/wx/config
99                 (cd $(DESTDIR)$(BINDIR) &amp;&amp; rm -f wx-config &amp;&amp; $(LN_S) $(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config || cp -p $(DESTDIR)$(LIBDIR)/wx/config/$(TOOLCHAIN_FULLNAME) wx-config)
100             </command>
101         </action>
102
103         <modify-target target="install">
104             <command>
105                 $(DYLIB_RPATH_INSTALL)
106             </command>
107         </modify-target>
108
109         <set var="RCDEFS_H">
110             <if cond="TOOLKIT=='MSW'">msw/rcdefs.h</if>
111         </set>
112
113
114         <data-files-tree>
115             <srcdir>
116                 $(BUILDDIR)/lib/wx/include/$(TOOLCHAIN_FULLNAME)/wx
117             </srcdir>
118             <files>
119                 setup.h $(RCDEFS_H)
120             </files>
121             <install-to>
122                 $(LIBDIR)/wx/include/$(TOOLCHAIN_FULLNAME)/wx
123             </install-to>
124         </data-files-tree>
125
126         <!-- FIXME: make this use per-target <headers> once it supports
127                     prefix removal -->
128         <data-files-tree>
129             <srcdir>$(SRCDIR)/include</srcdir>
130             <files>$(ALL_HEADERS)</files>
131             <install-to>
132                 $(INCLUDEDIR)/wx-$(WX_RELEASE)$(WX_FLAVOUR)
133             </install-to>
134         </data-files-tree>
135
136         <!-- Locales: -->
137         <using module="gettext"/>
138         <gettext-catalogs id="locale">
139             <srcdir>$(SRCDIR)/locale</srcdir>
140             <catalog-name>wxstd</catalog-name>
141             <linguas>
142                 ca cs da de el es fi fr hu id it ja nl pl ru sl sv tr uk
143                 zh zh_CN zh_TW
144             </linguas>
145             <install-to>$(LOCALEDIR)</install-to>
146         </gettext-catalogs>
147         <gettext-catalogs id="locale_msw">
148             <srcdir>$(SRCDIR)/locale/msw</srcdir>
149             <catalog-name>wxmsw</catalog-name>
150             <linguas>it</linguas>
151             <install-to>$(LOCALEDIR)</install-to>
152         </gettext-catalogs>
153
154
155         <!-- Mac OS X resources: -->
156         <set var="MACOS_R">lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).r</set>
157         <set var="MACOS_RSRC">lib/libwx_$(TOOLCHAIN_NAME).$(WXSOVERSION[0]).rsrc</set>
158         <action id="cocoa-res" cond="TOOLKIT=='COCOA'">
159             <dependency-of>all</dependency-of>
160             <set var="__targetname">$(MACOS_R)</set>
161             <command>
162                 $(REZ) -d __UNIX__ -useDF $(top_srcdir)/src/cocoa/dummy.r -o $(MACOS_RSRC)
163                 $(DEREZ) $(MACOS_RSRC) -useDF >$(MACOS_R)
164             </command>
165             <clean-files>$(MACOS_RSRC) $(MACOS_R)</clean-files>
166         </action>
167         <action id="cocoa-res-install" cond="TOOLKIT=='COCOA'">
168             <dependency-of>install</dependency-of>
169             <depends>cocoa-res</depends>
170             <command>
171                 $(INSTALL_DATA) $(MACOS_R) $(LIBDIR)
172                 $(INSTALL_DATA) $(MACOS_RSRC) $(LIBDIR)
173             </command>
174         </action>
175
176     </if>
177
178
179     <!-- copy setup.h on DOS/OS2/Windows if the format supports it: -->
180     <if cond="FORMAT!='autoconf' and IS_MSVC_PRJ=='0'">
181         <mkdir id="libdir">
182             <dir>$(LIBDIRNAME)</dir>
183         </mkdir>
184         <mkdir id="libdir_setup">
185             <depends>libdir</depends>
186             <dir>$(SETUPHDIR)</dir>
187         </mkdir>
188         <mkdir id="libdir_setup_wx">
189             <depends>libdir_setup</depends>
190             <dependency-of>setup_h</dependency-of>
191             <dir>$(SETUPHDIR)/wx</dir>
192         </mkdir>
193
194         <set var="SETUP_H_SUBDIR">
195             <if cond="WXUNIV=='1'">univ</if>
196             <if cond="WXUNIV=='0' and PLATFORM_OS2!='1'">$(TOOLKIT_LOWERCASE)</if>
197             <if cond="WXUNIV=='0' and PLATFORM_OS2=='1'">os2</if>
198         </set>
199
200         <copy-file-to-file-if-not-exist id="master_setup.h">
201             <src>$(SRCDIR)/include/wx/$(SETUP_H_SUBDIR)/setup0.h</src>
202             <dst>$(SRCDIR)/include/wx/$(SETUP_H_SUBDIR)/setup.h</dst>
203             <dependency-of>setup_h</dependency-of>
204         </copy-file-to-file-if-not-exist>
205         <copy-file-to-file-if-not-exist id="setup.h">
206             <dependency-of>setup_h</dependency-of>
207             <src>$(SRCDIR)/include/wx/$(SETUP_H_SUBDIR)/setup.h</src>
208             <dst>$(SETUPHDIR)/wx/setup.h</dst>
209         </copy-file-to-file-if-not-exist>
210     </if>
211
212
213     <!-- create rcdefs.h on Windows: -->
214     <if cond="FORMAT in ['borland','mingw','msvc','watcom']">
215
216         <mkdir id="libdir_setup_wx_msw">
217             <depends>libdir_setup_wx</depends>
218             <dir>$(SETUPHDIR)/wx/msw</dir>
219         </mkdir>
220
221         <action id="rcdefs.h">
222
223             <!-- Can't seem to set id to a name with a dollar sign
224                  so use __targetname as a temporary work around -->
225             <set var="__targetname">$(SETUPHDIR)\wx\msw\rcdefs.h</set>
226
227             <dependency-of>setup_h</dependency-of>
228             <depends>libdir_setup_wx_msw</depends>
229             <depends-on-file>$(SRCDIR)/include/wx/msw/genrcdefs.h</depends-on-file>
230
231             <command>
232                 $(DOLLAR)(CPP) "$(nativePaths(SRCDIR))\include\wx\msw\genrcdefs.h" > "$(SETUPHDIR)\wx\msw\rcdefs.h"
233             </command>
234
235         </action>
236
237     </if>
238
239
240     <if cond="FORMAT=='autoconf'">
241
242         <!-- Show this banner after installation: -->
243         <modify-target target="install">
244             <command>
245 @echo " "
246 @echo " ------------------------------------------------------"
247 @echo " "
248 @echo " The installation of wxWidgets is finished.  On certain"
249 @echo " platforms (e.g. Linux) you'll now have to run ldconfig"
250 @echo " if you installed a shared library and also modify the"
251 @echo " LD_LIBRARY_PATH (or equivalent) environment variable."
252 @echo " "
253 @echo " wxWidgets comes with no guarantees and doesn't claim"
254 @echo " to be suitable for any purpose."
255 @echo " "
256 @echo " Read the wxWindows Licence on licencing conditions."
257 @echo " "
258 @echo " ------------------------------------------------------"
259 @echo " "
260             </command>
261         </modify-target>
262
263         <!-- add "make dist" target to autoconf: -->
264         <set var="VARS_DONT_ELIMINATE" append="1">
265             ALL_PORTS_BASE_HEADERS ALL_BASE_SOURCES WX_VERSION
266         </set>
267         <fragment format="autoconf" file="make_dist.mk"/>
268
269     </if>
270
271     <include file="build_cfg.bkl"/>
272
273 </makefile>