diff options
author | Steven Knight <knight@baldmt.com> | 2004-07-12 20:33:44 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2004-07-12 20:33:44 (GMT) |
commit | bb10501c96110a8f9a9068344c7f89e79e97fef2 (patch) | |
tree | 5a136a3e8fc5e26951471930ae036f53d88254e0 /doc | |
parent | 1c1b7792121a066fc3cb9537879c71e86b676102 (diff) | |
download | SCons-bb10501c96110a8f9a9068344c7f89e79e97fef2.zip SCons-bb10501c96110a8f9a9068344c7f89e79e97fef2.tar.gz SCons-bb10501c96110a8f9a9068344c7f89e79e97fef2.tar.bz2 |
QT fixes and enhancements: Moc() and Uic() builders, a lot of new variables. (Christoph Wiedemann)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man/scons.1 | 167 |
1 files changed, 110 insertions, 57 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 947804f..35a1619 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -1220,8 +1220,8 @@ env.CFile(target = 'bar', source = 'bar.y') '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .IP CXXFile() .IP env.CXXFile() -Builds a C++ source file given a lex (.ll), yacc (.yy) -or uic (.ui) input file. +Builds a C++ source file given a lex (.ll) or yacc (.yy) +input file. The suffix specified by the $CXXFILESUFFIX construction variable (.cc by default) is automatically added to the target @@ -1405,6 +1405,19 @@ env.M4(target = 'foo.c', source = 'foo.c.m4') .EE '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.IP Moc() +.IP env.Moc() +Builds an output file from a moc input file. Moc input files are either +header files or cxx files. This builder is only available after using the +tool 'qt'. See the QTDIR variable for more information. +Example: + +.ES +env.Moc('foo.h') # generates moc_foo.cc +env.Moc('foo.cpp') # generates foo.moc +.EE + +'\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .IP MSVSProject() .IP env.MSVSProject() Builds Microsoft Visual Studio project files. @@ -1835,6 +1848,25 @@ env.TypeLibrary(source="foo.idl") Will create foo.tlb, foo.h, foo_i.c, foo_p.c, and foo_data.c. '\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.IP Uic() +.IP env.Uic() +Builds a header file, an implementation file and a moc file from an ui file. +and returns the corresponding nodes in the above order. +This builder is only available after using the tool 'qt'. Note: you can +specify .ui files directly as inputs for Program, Library and SharedLibrary +without using this builder. Using the builder lets you override the standard +naming conventions (be careful: prefixes are always prepended to names of +built files; if you don't want prefixes, you may set them to ``). +See the QTDIR variable for more information. +Example: + +.ES +env.Uic('foo.ui') # -> ['foo.h', 'uic_foo.cc', 'moc_foo.cc'] +env.Uic(target = Split('include/foo.h gen/uicfoo.cc gen/mocfoo.cc'), + source = 'foo.ui') # -> ['include/foo.h', 'gen/uicfoo.cc', 'gen/mocfoo.cc'] +.EE + +'\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .IP Zip() .IP env.Zip() Builds a zip archive of the specified files @@ -5076,96 +5108,111 @@ are modified. Because the build-performance is affected when using this tool, you have to explicitly specify it at Environment creation: .ES -Environment(tools=['default','qt']). +Environment(tools=['default','qt']) .EE -.IP -You may want to use -.B Configure -to verify that the qt support really works. + The qt tool supports the following operations: .B Automatic moc file generation from header files. You do not have to specify moc files explicitly, the tool does it for you. However, there are a few preconditions to do so: Your header file must have the same filebase as your implementation file and must stay in the same -directory. It must have one of the suffixes .h, .hpp, .H, .hxx, .hh. +directory. It must have one of the suffixes .h, .hpp, .H, .hxx, .hh. You +can turn off automatic moc file generation by setting QT_AUTOSCAN to 0. +See also the corresponding builder method +.B Moc() .B Automatic moc file generation from cxx files. -As stated in the qt documentation, -include the moc file at the end of the cxx file. -Note that you have to include the file, which is generated by the -QT_MOCNAMEGENERATOR function. If you are using BuildDir, you may need to -specify duplicate=1. +As stated in the qt documentation, include the moc file at the end of +the cxx file. Note that you have to include the file, which is generated +by the transformation ${QT_MOCCXXPREFIX}<basename>${QT_MOCCXXSUFFIX}, by default +<basename>.moc. A warning is generated after building the moc file, if you +do not include the correct file. If you are using BuildDir, you may +need to specify duplicate=1. You can turn off automatic moc file generation +by setting QT_AUTOSCAN to 0. See also the corresponding builder method +.B Moc() .B Automatic handling of .ui files. The implementation files generated from .ui files are handled much the same -as yacc or lex files. Because there are also generated headers, you may -need to specify duplicate=1 in calls to BuildDir. +as yacc or lex files. Each .ui file given as a source of Program, Library or +SharedLibrary will generate three files, the declaration file, the +implementation file and a moc file. Because there are also generated headers, +you may need to specify duplicate=1 in calls to BuildDir. See also the corresponding builder method +.B Uic() + +.IP QT_AUTOSCAN +Turn off scanning for mocable files. Use the Moc Builder to explicitely +specify files to run moc on. -.IP QT_AUTOBUILD_MOC_SOURCES -If true, moc-generated sources are automatically compiled into the -program or library that uses them. Defaults to 1. +.IP QT_DEBUG +Prints lots of debugging information while scanning for moc files. .IP QT_LIB -Default value is 'qt'. You may want to set this to 'qt-mt' +Default value is 'qt'. You may want to set this to 'qt-mt'. .IP QT_MOC Default value is '$QTDIR/bin/moc'. -.IP QT_UIC -Default value is '$QTDIR/bin/uic'. +.IP QT_MOCCXXPREFIX +Default value is ''. Prefix for moc output files, when source is a cxx file. -.IP QT_UICIMPLFLAGS -Default value is ''. These flags are passed to uic, when creating a cxx -file from a .ui file. +.IP QT_MOCCXXSUFFIX +Default value is '.moc'. Suffix for moc output files, when source is a cxx +file. -.IP QT_UICDECLFLAGS -Default value is ''. These flags are passed to uic, when creating a a h -file from a .ui file. +.IP QT_MOCFROMCPPFLAGS +Default value is '-i'. These flags are passed to moc, when moccing a +cpp file. + +.IP QT_MOCFROMCXXCOM +Command to generate a moc file from a cpp file. + +.IP QT_MOCFROMHCOM +Command to generate a moc file from a header. .IP QT_MOCFROMHFLAGS Default value is ''. These flags are passed to moc, when moccing a header file. -.IP QT_MOCFROMCPPFLAGS -Default value is '-i'. These flags are passed to moc, when moccing a -cpp file. +.IP QT_MOCHPREFIX +Default value is 'moc_'. Prefix for moc output files, when source is a header. -.IP QT_HSUFFIX -Default value is '.h'. Suffix of headers generated with uic. +.IP QT_MOCHSUFFIX +Default value is '$CXXFILESUFFIX'. Suffix for moc output files, when source is +a header. -.IP QT_UISUFFIX -Default value is '.ui'. Suffix of designer files. - -.IP QT_UIHSUFFIX -Default value is '.ui.h'. - -.IP QT_MOCNAMEGENERATOR -Three-argument function, which generates names of moc output files. -This is the most flexible way to support the huge number of conventions -for this type of files. The arguments are the -.I filebase -, which is the file to be moc'd without path and extension, the -.I src_suffix -, which is the extension of the file to be moc'd and the environment -.I env -The default value maps 'myfile.myext' to 'moc_myfile.$CXXFILESUFFIX': +.IP QT_UIC +Default value is '$QTDIR/bin/uic'. -.ES -lambda filebase, src_suffix, env: 'moc_' + filebase + env['CXXFILESUFFIX'] -.EE +.IP QT_UICDECLCOM +Command to generate header files from .ui files. + +.IP QT_UICDECLFLAGS +Default value is ''. These flags are passed to uic, when creating a a h +file from a .ui file. + +.IP QT_UICDECLPREFIX +Default value is ''. Prefix for uic generated header files. + +.IP QT_UICDECLSUFFIX +Default value is '.h'. Suffix for uic generated header files. .IP QT_UICIMPLCOM Command to generate cxx files from .ui files. -.IP QT_UICDECLCOM -Command to generate header files from .ui files. +.IP QT_UICIMPLFLAGS +Default value is ''. These flags are passed to uic, when creating a cxx +file from a .ui file. -.IP QT_MOCFROMHCOM -Command to generate a moc file from a header. +.IP QT_UICIMPLPREFIX +Default value is 'uic_'. Prefix for uic generated implementation files. -.IP QT_MOCFROMCXXCOM -Command to generate a moc file from a cpp file. +.IP QT_UICIMPLSUFFIX +Default value is '$CXXFILESUFFIX'. Suffix for uic generated implementation +files. + +.IP QT_UISUFFIX +Default value is '.ui'. Suffix of designer input files. .IP RANLIB The archive indexer. @@ -6576,6 +6623,12 @@ Specifies a builder to use when a source file name suffix does not match any of the suffixes of the builder. Using this argument produces a multi-stage builder. +.IP single_source +Specifies that this builder expects exactly one source file per call. Giving +more than one source files without target files results in implicitely calling +the builder multiple times (once for each source given). Giving multiple +source files together with target files results in a UserError exception. + .RE .IP The |