From: John L. <jla...@gm...> - 2006-10-25 18:16:17
|
In wxCode/build/bakefile/targets.bkl we have, which is similar as COMP_WANT_UNINSTALL_WXHEADERS_TARGET. <!-- "make install-wxheaders": --> <if cond="COMP_WANT_INSTALL_WXHEADERS_TARGET=='1'"> <data-files-tg id="install-wxheaders"> <files>$(COMP_BASEPATH)$(DIRSEP)include$(DIRSEP)wx$(DIRSEP)*.h</files> <if cond="TARGETING_WIN32=='1'"> <install-to>$(WX_DIR)$(DIRSEP)include$(DIRSEP)wx</install-to> <!-- little hack over "data-files-tg" which is truly defined only on unix --> <set var="__copy_cmd" eval="0"> mkdir $(__dstdir) cd $(__srcdir) copy /Y $(__files) $(__dstdir) </set> <dependency-of>install</dependency-of> <command>$(__copy_cmd)</command> </if> <if cond="TARGETING_WIN32=='0'"> <install-to>$(INCLUDEDIR)/wx</install-to> </if> </data-files-tg> ============================ BUT! If you have your includes as wxCode/components/wxstedit/include/wx/stedit/*.h this doesn't work. I figured that by adding "stedit" to the include path I'd avoid any problems with name clashes. In your user bakefile you have, optionally <set var="COMP_INCLUDE_PATH" overwrite="0"> include$(DIRSEP)wx$(DIRSEP)/stedit </set> and in wxCode/build/bakefile/targets.bkl <set var="COMP_INCLUDE_PATH" overwrite="0"> include$(DIRSEP)wx </set> and adjust the install and uninstall targets to use it <!-- "make install-wxheaders": --> <if cond="COMP_WANT_INSTALL_WXHEADERS_TARGET=='1'"> <data-files-tg id="install-wxheaders"> <files>$(COMP_BASEPATH)$(DIRSEP)$(COMP_INCLUDE_PATH)$(DIRSEP)*.h</files> <if cond="TARGETING_WIN32=='1'"> <install-to>$(WX_DIR)$(DIRSEP)$(COMP_INCLUDE_PATH)</install-to> <!-- little hack over "data-files-tg" which is truly defined only on unix --> <set var="__copy_cmd" eval="0"> mkdir $(__dstdir) cd $(__srcdir) copy /Y $(__files) $(__dstdir) </set> <dependency-of>install</dependency-of> <command>$(__copy_cmd)</command> </if> <if cond="TARGETING_WIN32=='0'"> <install-to>$(INCLUDEDIR)/wx</install-to> <=== HERE! </if> </data-files-tg> ============================ How to make the <install-to> item work? It doesn't want the "include" part of the path since it already has it from wxWidgets/include. Maybe just have the user only specify "wx/stedit" and assume everything is in "include" as in "include/wx/stedit"? Or will we run into similar problems with some other "nonstandard" component like mine? Any ideas? John Labenski |
From: John L. <jla...@gm...> - 2006-10-25 20:43:10
|
I applied a much simplier solution, you're still locked into using include/wx as a base path but you can now specify any number of additional extra paths. You merely set a variable in your component's bakefile as shown in the template bakefile: wxCode/build/empty.bkl.template <!-- Specify an optional extra path to the header files for install-wxheaders component/include/wx[$(DIRSEP)optional path] Always include the leading $(DIRSEP) and no trailing one, leave blank to use the path include/wx to your headers. --> <set var="COMP_WXHEADERS_EXTRA_INCLUDE_PATH"> </set> and then it's used here wxCode/build/targets.bkl. Hope this helps, John Labenski On 10/25/06, John Labenski <jla...@gm...> wrote: > In wxCode/build/bakefile/targets.bkl we have, which is similar as > COMP_WANT_UNINSTALL_WXHEADERS_TARGET. > > <!-- "make install-wxheaders": --> > <if cond="COMP_WANT_INSTALL_WXHEADERS_TARGET=='1'"> > <data-files-tg id="install-wxheaders"> > > <files>$(COMP_BASEPATH)$(DIRSEP)include$(DIRSEP)wx$(DIRSEP)*.h</files> > <if cond="TARGETING_WIN32=='1'"> > > <install-to>$(WX_DIR)$(DIRSEP)include$(DIRSEP)wx</install-to> > > <!-- little hack over "data-files-tg" which is > truly defined only on unix --> > <set var="__copy_cmd" eval="0"> > mkdir $(__dstdir) > cd $(__srcdir) > copy /Y $(__files) $(__dstdir) > </set> > <dependency-of>install</dependency-of> > <command>$(__copy_cmd)</command> > </if> > <if cond="TARGETING_WIN32=='0'"> > <install-to>$(INCLUDEDIR)/wx</install-to> > </if> > </data-files-tg> > > ============================ > > BUT! If you have your includes as > wxCode/components/wxstedit/include/wx/stedit/*.h this doesn't work. I > figured that by adding "stedit" to the include path I'd avoid any > problems with name clashes. > > In your user bakefile you have, optionally > > <set var="COMP_INCLUDE_PATH" overwrite="0"> > include$(DIRSEP)wx$(DIRSEP)/stedit > </set> > > > and in wxCode/build/bakefile/targets.bkl > > > <set var="COMP_INCLUDE_PATH" overwrite="0"> > include$(DIRSEP)wx > </set> > > and adjust the install and uninstall targets to use it > > <!-- "make install-wxheaders": --> > <if cond="COMP_WANT_INSTALL_WXHEADERS_TARGET=='1'"> > <data-files-tg id="install-wxheaders"> > > <files>$(COMP_BASEPATH)$(DIRSEP)$(COMP_INCLUDE_PATH)$(DIRSEP)*.h</files> > <if cond="TARGETING_WIN32=='1'"> > > <install-to>$(WX_DIR)$(DIRSEP)$(COMP_INCLUDE_PATH)</install-to> > > <!-- little hack over "data-files-tg" which is > truly defined only on unix --> > <set var="__copy_cmd" eval="0"> > mkdir $(__dstdir) > cd $(__srcdir) > copy /Y $(__files) $(__dstdir) > </set> > <dependency-of>install</dependency-of> > <command>$(__copy_cmd)</command> > </if> > <if cond="TARGETING_WIN32=='0'"> > <install-to>$(INCLUDEDIR)/wx</install-to> <=== HERE! > </if> > </data-files-tg> > > ============================ > > How to make the <install-to> item work? It doesn't want the "include" > part of the path since it already has it from wxWidgets/include. > > Maybe just have the user only specify "wx/stedit" and assume > everything is in "include" as in "include/wx/stedit"? Or will we run > into similar problems with some other "nonstandard" component like > mine? > > Any ideas? > John Labenski > |
From: Francesco M. <f18...@ya...> - 2006-10-26 19:19:44
|
John Labenski ha scritto: > I applied a much simplier solution, you're still locked into using > include/wx as a base path but you can now specify any number of > additional extra paths. > > You merely set a variable in your component's bakefile as shown in the > template bakefile: wxCode/build/empty.bkl.template > > <!-- Specify an optional extra path to the header files for > install-wxheaders > component/include/wx[$(DIRSEP)optional path] > Always include the leading $(DIRSEP) and no trailing one, leave blank > to use the path include/wx to your headers. --> > <set var="COMP_WXHEADERS_EXTRA_INCLUDE_PATH"> > </set> > > and then it's used here wxCode/build/targets.bkl. This is a good temporary fix sure. Thanks! Ok - I repeated it one million times but let me repeat once again; bakefile SVN trunk has a much better support for headers and you won't need any hack like this. Just like <sources> there will be an <headers> tag which will recognize which are the folders required by header files and will automatically install them. Francesco |
From: John L. <jla...@gm...> - 2006-10-26 20:18:44
|
On 10/26/06, Francesco Montorsi <f18...@ya...> wrote: > John Labenski ha scritto: > > I applied a much simplier solution, you're still locked into using > > include/wx as a base path but you can now specify any number of > > additional extra paths. > > > > You merely set a variable in your component's bakefile as shown in the > > template bakefile: wxCode/build/empty.bkl.template > > > > <!-- Specify an optional extra path to the header files for > > install-wxheaders > > component/include/wx[$(DIRSEP)optional path] > > Always include the leading $(DIRSEP) and no trailing one, leave blank > > to use the path include/wx to your headers. --> > > <set var="COMP_WXHEADERS_EXTRA_INCLUDE_PATH"> > > </set> > > > > and then it's used here wxCode/build/targets.bkl. > This is a good temporary fix sure. Thanks! > > Ok - I repeated it one million times but let me repeat once again; > bakefile SVN trunk has a much better support for headers and you won't > need any hack like this. Someday... there will be a new release of bakefile... > Just like <sources> there will be an <headers> tag which will recognize > which are the folders required by header files and will automatically > install them. That will be nice, I think I can struggle on with 0.2.0, at least for now hoping that everything is working. -John Labenski |