diff --git a/docs/tech/tn0021.txt b/docs/tech/tn0021.txt index 9a7d673e32..1bd5cafb5e 100644 --- a/docs/tech/tn0021.txt +++ b/docs/tech/tn0021.txt @@ -22,12 +22,12 @@ because then wxUSE_FOO would be not defined at all if the user directly includes wx/foo.h, include "wx/defs.h" before testing for wxUSE_FOO. -2. Required files update ------------------------- +2. Files to update +------------------ -Assuming wxUSE_FOO is used on all platforms, the following must be done: +The following files need to be modified when adding a new wxUSE_FOO: -a) update include/wx/setup_inc.h +a) include/wx/setup_inc.h This file contains all common wxUSE_XXXs, and is used to update wxMSW, wxMac setup.h and Unix setup.h.in using build/update-setup-h. Please try to add @@ -39,13 +39,26 @@ a) update include/wx/setup_inc.h After changing this file, run the update-setup-h script (this is probably better done on a Unix machine although it should work under Cygwin too). -b) update other setup.h files +a') include/wx/msw/setup_inc.h for MSW-specific options - Currently include/wx/univ/setup.h and setup.h_vms are not automatically - updated so please update them manually (or modify the update-setup-h script - to take care of them...). + This file contains MSW-specific options, so if the new option is only used + under MSW, add it here instead of include/wx/setup_inc.h. The rest of the + instructions is the same as above. -c) update configure.in +b) include/wx/chkconf.h + + Add the check for wxUSE_FOO definedness in the corresponding (base or GUI) + section. Please keep the alphabetic order. + + If there are any dependencies, i.e. wxUSE_FOO requires wxUSE_BAR and + wxUSE_BAZ, check for thme here too. + +b') include/wx/msw/chkconf.h for MSW-specific options + + These options won't be defined for the other ports, so shouldn't be added to + the common include/wx/chkconf.h but to this file instead. + +c) configure.in Here you need to add DEFAULT_wxUSE_FOO define. It should be added in the block beginning after WX_ARG_CACHE_INIT line and should default to "no" for @@ -59,12 +72,9 @@ c) update configure.in If you have a sample/foo which should be only built when wxUSE_FOO==1, then only add it to the SAMPLES_SUBDIRS if wxUSE_FOO=yes in configure. +d) docs/doxygen/mainpages/const_wxusedef.h -3. Documentation ----------------- - -Currently wxUSE_XXXs are documented in docs/latex/wx/wxusedef.tex and a few -important global ones are in docs/latex/wx/cppconst.tex. + Add a brief description of the new constant. === EOF ===