eliminate DIRECTORY_IF_* and TARGET_IF_* for BUILD_DIRECTORY and BUILD_TARGET

This commit is contained in:
David Rose 2002-05-29 16:46:58 +00:00
parent bbe5517c6b
commit 3868e3e94d
42 changed files with 70 additions and 136 deletions

View File

@ -1,9 +1,7 @@
// This package presently only builds on Windows.
#define DIRECTORY_IF_WINDOWS yes
// We also require the network layer (queuedConnectionManager, etc.)
#define DIRECTORY_IF_NET yes
#define BUILD_DIRECTORY $[and $[WINDOWS_PLATFORM],$[HAVE_NET]]
#define LOCAL_LIBS \
directbase

View File

@ -1,9 +1,7 @@
// This package presently only builds on Windows.
#define DIRECTORY_IF_WINDOWS yes
// We also require the network layer (queuedConnectionManager, etc.)
#define DIRECTORY_IF_NET yes
#define BUILD_DIRECTORY $[and $[WINDOWS_PLATFORM],$[HAVE_NET]]
//#define LOCAL_LIBS \
// directbase

View File

@ -241,72 +241,27 @@
#define chromium_libs $[CHROMIUM_LIBS]
#endif
// We define these two variables true here in the global scope; a
// particular Sources.pp file can redefine these to be false to
// prevent a particular directory or target from being built in
// certain circumstances.
#define BUILD_DIRECTORY 1
#define BUILD_TARGET 1
// This variable, when evaluated in the scope of a particular directory,
// will indicate true (i.e. nonempty) when the directory is truly built,
// or false (empty) when the directory is not to be built.
#defer build_directory \
$[and \
$[or $[not $[DIRECTORY_IF_WINDOWS]],$[WINDOWS_PLATFORM]], \
$[or $[not $[DIRECTORY_IF_UNIX]],$[UNIX_PLATFORM]], \
$[or $[not $[DIRECTORY_IF_PYTHON]],$[HAVE_PYTHON]], \
$[or $[not $[DIRECTORY_IF_NSPR]],$[HAVE_NSPR]], \
$[or $[not $[DIRECTORY_IF_CRYPTO]],$[HAVE_CRYPTO]], \
$[or $[not $[DIRECTORY_IF_ZLIB]],$[HAVE_ZLIB]], \
$[or $[not $[DIRECTORY_IF_SOXST]],$[HAVE_SOXST]], \
$[or $[not $[DIRECTORY_IF_GL]],$[HAVE_GL]], \
$[or $[not $[DIRECTORY_IF_CHROMIUM]],$[HAVE_CHROMIUM]], \
$[or $[not $[DIRECTORY_IF_DX]],$[HAVE_DX]], \
$[or $[not $[DIRECTORY_IF_GLX]],$[HAVE_GLX]], \
$[or $[not $[DIRECTORY_IF_GLUT]],$[HAVE_GLUT]], \
$[or $[not $[DIRECTORY_IF_WGL]],$[HAVE_WGL]], \
$[or $[not $[DIRECTORY_IF_RIB]],$[HAVE_RIB]], \
$[or $[not $[DIRECTORY_IF_PS2]],$[HAVE_PS2]], \
$[or $[not $[DIRECTORY_IF_SGIGL]],$[HAVE_SGIGL]], \
$[or $[not $[DIRECTORY_IF_JPEG]],$[HAVE_JPEG]], \
$[or $[not $[DIRECTORY_IF_JPEG2000]],$[HAVE_JPEG2000]], \
$[or $[not $[DIRECTORY_IF_TIFF]],$[HAVE_TIFF]], \
$[or $[not $[DIRECTORY_IF_FFTW]],$[HAVE_FFTW]], \
$[or $[not $[DIRECTORY_IF_VRPN]],$[HAVE_VRPN]], \
$[or $[not $[DIRECTORY_IF_GTKMM]],$[HAVE_GTKMM]], \
$[or $[not $[DIRECTORY_IF_MAYA]],$[HAVE_MAYA]], \
$[or $[not $[DIRECTORY_IF_IPC]],$[HAVE_IPC]], \
$[or $[not $[DIRECTORY_IF_NET]],$[HAVE_NET]], \
$[or $[not $[DIRECTORY_IF_AUDIO]],$[HAVE_AUDIO]], \
$[or $[not $[DIRECTORY_IF_INTERROGATE]],$[HAVE_INTERROGATE]], \
1 ]
#defer build_directory $[BUILD_DIRECTORY]
// It maps to a direct evaluation of the user-set variable,
// BUILD_DIRECTORY, for historical reasons. This also allows us to
// reserve the right to extend this variable to test other conditions
// as well, should the need arise.
// This variable, when evaluated in the scope of a particular target,
// will indicated true when the target should be built, or false when
// the target is not to be built.
#defer build_target \
$[and \
$[or $[not $[TARGET_IF_WINDOWS]],$[WINDOWS_PLATFORM]], \
$[or $[not $[TARGET_IF_UNIX]],$[UNIX_PLATFORM]], \
$[or $[not $[TARGET_IF_PYTHON]],$[HAVE_PYTHON]], \
$[or $[not $[TARGET_IF_NSPR]],$[HAVE_NSPR]], \
$[or $[not $[TARGET_IF_CRYPTO]],$[HAVE_CRYPTO]], \
$[or $[not $[TARGET_IF_ZLIB]],$[HAVE_ZLIB]], \
$[or $[not $[TARGET_IF_SOXST]],$[HAVE_SOXST]], \
$[or $[not $[TARGET_IF_GL]],$[HAVE_GL]], \
$[or $[not $[TARGET_IF_CHROMIUM]],$[HAVE_CHROMIUM]], \
$[or $[not $[TARGET_IF_DX]],$[HAVE_DX]], \
$[or $[not $[TARGET_IF_GLX]],$[HAVE_GLX]], \
$[or $[not $[TARGET_IF_GLUT]],$[HAVE_GLUT]], \
$[or $[not $[TARGET_IF_WGL]],$[HAVE_WGL]], \
$[or $[not $[TARGET_IF_RIB]],$[HAVE_RIB]], \
$[or $[not $[TARGET_IF_PS2]],$[HAVE_PS2]], \
$[or $[not $[TARGET_IF_SGIGL]],$[HAVE_SGIGL]], \
$[or $[not $[TARGET_IF_JPEG]],$[HAVE_JPEG]], \
$[or $[not $[TARGET_IF_JPEG2000]],$[HAVE_JPEG2000]], \
$[or $[not $[TARGET_IF_TIFF]],$[HAVE_TIFF]], \
$[or $[not $[TARGET_IF_FFTW]],$[HAVE_FFTW]], \
$[or $[not $[TARGET_IF_VRPN]],$[HAVE_VRPN]], \
$[or $[not $[TARGET_IF_GTKMM]],$[HAVE_GTKMM]], \
$[or $[not $[TARGET_IF_MAYA]],$[HAVE_MAYA]], \
$[or $[not $[TARGET_IF_IPC]],$[HAVE_IPC]], \
$[or $[not $[TARGET_IF_NET]],$[HAVE_NET]], \
$[or $[not $[TARGET_IF_RAD_MSS]],$[HAVE_RAD_MSS]], \
1 ]
#defer build_target $[BUILD_TARGET]
// This takes advantage of the above two variables to get the actual
// list of local libraries we are to link with, eliminating those that

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_INTERROGATE yes
#define BUILD_DIRECTORY $[HAVE_INTERROGATE]
#define LOCAL_LIBS dtoolutil dtoolbase
#define YACC_PREFIX cppyy
@ -40,17 +40,4 @@
cppTypeParser.cxx cppTypeProxy.cxx cppTypedef.cxx \
cppUsing.cxx cppVisibility.cxx indent.cxx
// These are temporary; they need not be installed in the future. These are
// necessary only when using template stopgap.
#define INSTALL_HEADERS \
cppDeclaration.h cppExtensionType.h cppIdentifier.h cppInstance.h \
cppManifest.h cppPreprocessor.h cppScope.h cppToken.h cppType.h \
cppVisibility.h cppBisonDefs.h cppParser.h cppInstanceIdentifier.h \
cppFunctionType.h cppSimpleType.h cppParameterList.h cppTypedef.h \
cppTypeDeclaration.h \
cppPointerType.h cppReferenceType.h cppConstType.h cppArrayType.h \
cppEnumType.h cppStructType.h cppFile.h cppTemplateParameterList.h \
cppFunctionGroup.h cppNameComponent.h cppTypeProxy.h cppTBDType.h \
cppExpressionParser.h cppExpression.h cppGlobals.h cppCommentBlock.h
#end static_lib_target

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_INTERROGATE yes
#define BUILD_DIRECTORY $[HAVE_INTERROGATE]
#define LOCAL_LIBS cppParser pystub interrogatedb dconfig dtoolutil dtoolbase

View File

@ -6,7 +6,7 @@
#define DIR_TYPE metalib
#define BUILDING_DLL BUILDING_PANDACR
#define DIRECTORY_IF_CHROMIUM yes
#define BUILD_DIRECTORY $[HAVE_CHROMIUM]
//#define USE_CHROMIUM yes

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_DX yes
#define BUILD_DIRECTORY $[HAVE_DX]
// DIR_TYPE "metalib" indicates we are building a shared library that
// consists mostly of references to other shared libraries. Under

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_DX yes
#define BUILD_DIRECTORY $[HAVE_DX]
// DIR_TYPE "metalib" indicates we are building a shared library that
// consists mostly of references to other shared libraries. Under

View File

@ -6,7 +6,7 @@
#define DIR_TYPE metalib
#define BUILDING_DLL BUILDING_PANDAGL
#define DIRECTORY_IF_GL yes
#define BUILD_DIRECTORY $[HAVE_GL]
#if $[eq $[LINK_IN_GL],]
// We don't have any components if we're linking the GL library

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_RIB yes
#define BUILD_DIRECTORY $[HAVE_RIB]
// DIR_TYPE "metalib" indicates we are building a shared library that
// consists mostly of references to other shared libraries. Under

View File

@ -1,5 +1,5 @@
#define OTHER_LIBS dtoolconfig dtool
#define DIRECTORY_IF_AUDIO yes
#define BUILD_DIRECTORY $[HAVE_AUDIO]
#begin lib_target
#define TARGET audio

View File

@ -1,9 +1,9 @@
#define OTHER_LIBS dtoolconfig dtool
#define DIRECTORY_IF_AUDIO yes
#define BUILD_DIRECTORY $[HAVE_AUDIO]
#begin lib_target
#define TARGET miles_audio
#define TARGET_IF_RAD_MSS yes
#define BUILD_TARGET $[HAVE_RAD_MSS]
#define USE_RAD_MSS yes
#define BUILDING_DLL BUILDING_MILES_AUDIO
#define LOCAL_LIBS audio

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_CHROMIUM yes
#define BUILD_DIRECTORY $[HAVE_CHROMIUM]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -2,11 +2,11 @@
dtoolutil:c dtoolbase:c dtool:m pystub
#define LOCAL_LIBS downloader express event ipc
#define USE_IPC yes
#define DIRECTORY_IF_IPC yes
#define BUILD_DIRECTORY $[HAVE_IPC]
#begin bin_target
#define TARGET apply_patch
#define TARGET_IF_CRYPTO yes
#define BUILD_TARGET $[HAVE_CRYPTO]
#define SOURCES \
apply_patch.cxx
@ -17,7 +17,7 @@
#begin bin_target
#define TARGET build_patch
#define TARGET_IF_CRYPTO yes
#define BUILD_TARGET $[HAVE_CRYPTO]
#define SOURCES \
build_patch.cxx
@ -26,7 +26,7 @@
#begin bin_target
#define TARGET check_adler
#define TARGET_IF_ZLIB yes
#define BUILD_TARGET $[HAVE_ZLIB]
#define USE_ZLIB yes
#define SOURCES \
@ -36,7 +36,7 @@
#begin bin_target
#define TARGET check_crc
#define TARGET_IF_ZLIB yes
#define BUILD_TARGET $[HAVE_ZLIB]
#define USE_ZLIB yes
#define SOURCES \
@ -46,7 +46,7 @@
#begin bin_target
#define TARGET check_md5
#define TARGET_IF_CRYPTO yes
#define BUILD_TARGET $[HAVE_CRYPTO]
#define USE_CRYPTO yes
#define SOURCES \
@ -64,7 +64,7 @@
#begin bin_target
#define TARGET pcompress
#define TARGET_IF_ZLIB yes
#define BUILD_TARGET $[HAVE_ZLIB]
#define USE_ZLIB yes
#define SOURCES \
@ -74,7 +74,7 @@
#begin bin_target
#define TARGET pdecompress
#define TARGET_IF_ZLIB yes
#define BUILD_TARGET $[HAVE_ZLIB]
#define USE_ZLIB yes
#define SOURCES \
@ -84,7 +84,7 @@
#begin bin_target
#define TARGET test_downloader
#define TARGET_IF_ZLIB yes
#define BUILD_TARGET $[HAVE_ZLIB]
#define USE_ZLIB yes
#define SOURCES \

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_DX yes
#define BUILD_DIRECTORY $[HAVE_DX]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_DX yes
#define BUILD_DIRECTORY $[HAVE_DX]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_GL yes
#define BUILD_DIRECTORY $[HAVE_GL]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_GL yes
#define DIRECTORY_IF_GLUT yes
#define BUILD_DIRECTORY $[HAVE_GLUT]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_GL yes
#define DIRECTORY_IF_GLX yes
#define BUILD_DIRECTORY $[HAVE_GLX]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -3,7 +3,7 @@
dtoolutil:c dtoolbase:c dtool:m
#define USE_NSPR yes
#define USE_IPC yes
#define DIRECTORY_IF_IPC yes
#define BUILD_DIRECTORY $[HAVE_IPC]
#begin lib_target
#define TARGET ipc

View File

@ -1,7 +1,6 @@
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m
#define DIRECTORY_IF_NET yes
#define DIRECTORY_IF_NSPR yes
#define BUILD_DIRECTORY $[and $[HAVE_NET],$[HAVE_NSPR]]
#define USE_NET yes
#define USE_NSPR yes

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_PS2 yes
#define BUILD_DIRECTORY $[HAVE_PS2]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_PS2 yes
#define BUILD_DIRECTORY $[HAVE_PS2]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_RIB yes
#define BUILD_DIRECTORY $[HAVE_RIB]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_RIB yes
#define BUILD_DIRECTORY $[HAVE_RIB]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_SGIGL yes
#define BUILD_DIRECTORY $[HAVE_SGIGL]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_SGIGL yes
#define DIRECTORY_IF_GLUT yes
#define BUILD_DIRECTORY $[and $[HAVE_SGIGL],$[HAVE_GLUT]]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_SGIGL yes
#define DIRECTORY_IF_GLX yes
#define BUILD_DIRECTORY $[and $[HAVE_SGIGL],$[HAVE_GLX]]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_VRPN yes
#define BUILD_DIRECTORY $[HAVE_VRPN]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_WCR yes
#define DIRECTORY_IF_CHROMIUM yes
#define BUILD_DIRECTORY $[HAVE_WCR]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_DX yes
#define BUILD_DIRECTORY $[HAVE_DX]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_DX yes
#define BUILD_DIRECTORY $[HAVE_DX]
#define OTHER_LIBS interrogatedb:c dconfig:c dtoolconfig:m \
dtoolutil:c dtoolbase:c dtool:m

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_GL yes
#define DIRECTORY_IF_WGL yes
#define BUILD_DIRECTORY $[HAVE_WGL]
#define USE_GL yes

View File

@ -1,6 +1,5 @@
#define DIRECTORY_IF_GTKMM yes
#define BUILD_DIRECTORY $[and $[HAVE_GTKMM],$[HAVE_NET]]
#define USE_GTKMM yes
#define DIRECTORY_IF_NET yes
#define USE_NET yes
#begin bin_target

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_GTKMM yes
#define BUILD_DIRECTORY $[HAVE_GTKMM]
#define USE_GTKMM yes
#begin ss_lib_target

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_MAYA yes
#define BUILD_DIRECTORY $[HAVE_MAYA]
#begin ss_lib_target
#define USE_MAYA yes

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_MAYA yes
#define BUILD_DIRECTORY $[HAVE_MAYA]
#begin ss_lib_target
#define USE_MAYA yes

View File

@ -1,4 +1,4 @@
#define DIRECTORY_IF_MAYA yes
#define BUILD_DIRECTORY $[HAVE_MAYA]
#define binary_name maya2egg

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_NET yes
#define USE_NET yes
#define BUILD_DIRECTORY $[HAVE_NET]
#begin ss_lib_target
#define TARGET pstatserver

View File

@ -1,5 +1,4 @@
#define DIRECTORY_IF_NET yes
#define USE_NET yes
#define BUILD_DIRECTORY $[HAVE_NET]
#begin bin_target
#define TARGET text-stats

View File

@ -1,4 +1,7 @@
#define DIRECTORY_IF_DX yes
// This package is temporarily disabled.
#define BUILD_DIRECTORY
//#define BUILD_DIRECTORY $[HAVE_DX]
#define USE_DX yes
#begin ss_lib_target

View File

@ -1,4 +1,7 @@
#define DIRECTORY_IF_DX yes
// This package is temporarily disabled.
#define BUILD_DIRECTORY
//#define BUILD_DIRECTORY $[HAVE_DX]
#define USE_DX yes
#begin bin_target