From 945f7dfe92537c81518004bef63f2b128eedd9ee Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 29 May 2002 17:13:50 +0000 Subject: [PATCH] eliminate IF_*_SOURCES, etc. --- dtool/metalibs/dtoolconfig/Sources.pp | 4 +-- dtool/pptempl/Global.pp | 14 ++-------- panda/src/downloader/Sources.pp | 35 ++++++++----------------- panda/src/express/Sources.pp | 11 ++++---- panda/src/parametrics/Sources.pp | 7 +++-- panda/src/pnmimagetypes/Sources.pp | 37 ++++++++------------------- 6 files changed, 33 insertions(+), 75 deletions(-) diff --git a/dtool/metalibs/dtoolconfig/Sources.pp b/dtool/metalibs/dtoolconfig/Sources.pp index 7ad2c1aaec..6e5ac4063a 100644 --- a/dtool/metalibs/dtoolconfig/Sources.pp +++ b/dtool/metalibs/dtoolconfig/Sources.pp @@ -13,6 +13,6 @@ #begin metalib_target #define TARGET dtoolconfig - #define SOURCES dtoolconfig.cxx - #define IF_PYTHON_SOURCES pydtool.cxx + #define SOURCES dtoolconfig.cxx \ + $[if $[HAVE_PYTHON], pydtool.cxx] #end metalib_target diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 56e8161fef..7c6ce5eff6 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -296,19 +296,9 @@ #defer get_sources \ $[SOURCES] \ $[PRECOMPILED_HEADER] \ - $[if $[ne $[NO_COMBINED_SOURCES],], $[INCLUDED_SOURCES], $[get_combined_sources]] \ - $[if $[HAVE_CRYPTO],$[IF_CRYPTO_SOURCES]] \ - $[if $[HAVE_TIFF],$[IF_TIFF_SOURCES]] \ - $[if $[HAVE_FFTW],$[IF_FFTW_SOURCES]] \ - $[if $[HAVE_NURBSPP],$[IF_NURBSPP_SOURCES]] \ - $[if $[HAVE_JPEG], $[IF_JPEG_SOURCES] $[if $[ne $[NO_COMBINED_SOURCES],], $[IF_JPEG_INCLUDED_SOURCES], $[IF_JPEG_COMBINED_SOURCES]]] \ - $[if $[HAVE_JPEG2000], $[IF_JPEG2000_SOURCES] $[if $[ne $[NO_COMBINED_SOURCES],], $[IF_JPEG2000_INCLUDED_SOURCES], $[IF_JPEG2000_COMBINED_SOURCES]]] \ - $[if $[HAVE_ZLIB], $[IF_ZLIB_SOURCES] $[if $[ne $[NO_COMBINED_SOURCES],], $[IF_ZLIB_INCLUDED_SOURCES], $[IF_ZLIB_COMBINED_SOURCES]]] \ - $[if $[HAVE_NET], $[IF_NET_SOURCES] $[if $[ne $[NO_COMBINED_SOURCES],], $[IF_NET_INCLUDED_SOURCES], $[IF_NET_COMBINED_SOURCES]]] \ - $[if $[HAVE_IPC],$[IF_IPC_SOURCES]] \ - $[if $[HAVE_PYTHON],$[IF_PYTHON_SOURCES]] + $[if $[ne $[NO_COMBINED_SOURCES],], $[INCLUDED_SOURCES], $[get_combined_sources]] -#defer included_sources $[INCLUDED_SOURCES] $[if $[HAVE_ZLIB],$[IF_ZLIB_INCLUDED_SOURCES]] $[if $[HAVE_NET],$[IF_NET_INCLUDED_SOURCES]] $[if $[USE_SINGLE_COMPOSITE_SOURCEFILE], $[COMBINED_SOURCES]] $[if $[HAVE_JPEG],$[IF_JPEG_INCLUDED_SOURCES]] +#defer included_sources $[INCLUDED_SOURCES] // This variable returns the set of sources that are to be // interrogated for the current target. diff --git a/panda/src/downloader/Sources.pp b/panda/src/downloader/Sources.pp index 678905baf6..5eadaefc0d 100644 --- a/panda/src/downloader/Sources.pp +++ b/panda/src/downloader/Sources.pp @@ -8,38 +8,23 @@ #begin lib_target #define TARGET downloader - #define COMBINED_SOURCES $[TARGET]_composite1.cxx + #define COMBINED_SOURCES $[TARGET]_composite1.cxx \ + $[if $[HAVE_NET], $[TARGET]_composite3.cxx] \ + $[if $[HAVE_ZLIB], $[TARGET]_composite4.cxx] \ #define SOURCES \ config_downloader.h asyncUtility.I asyncUtility.h \ extractor.h multiplexStream.I multiplexStream.h \ - multiplexStreamBuf.I multiplexStreamBuf.h + multiplexStreamBuf.I multiplexStreamBuf.h \ + $[if $[HAVE_NET], downloadDb.I downloadDb.h downloader.I downloader.h] \ + $[if $[HAVE_ZLIB], decompressor.h zcompressor.I zcompressor.h download_utils.h] \ + $[if $[HAVE_CRYPTO], patcher.cxx patcher.h patcher.I] #define INCLUDED_SOURCES \ config_downloader.cxx asyncUtility.cxx \ - extractor.cxx multiplexStream.cxx multiplexStreamBuf.cxx - - #define IF_NET_SOURCES \ - downloadDb.I downloadDb.h downloader.I downloader.h - - #define IF_NET_INCLUDED_SOURCES \ - downloadDb.cxx downloader.cxx - - #define IF_NET_COMBINED_SOURCES \ - $[TARGET]_composite3.cxx - - #define IF_ZLIB_SOURCES \ - decompressor.h zcompressor.I zcompressor.h download_utils.h - - #define IF_ZLIB_COMBINED_SOURCES \ - $[TARGET]_composite4.cxx - - #define IF_ZLIB_INCLUDED_SOURCES \ - decompressor.cxx zcompressor.cxx download_utils.cxx - - #define IF_CRYPTO_SOURCES \ - patcher.cxx \ - patcher.h patcher.I + extractor.cxx multiplexStream.cxx multiplexStreamBuf.cxx \ + $[if $[HAVE_NET], downloadDb.cxx downloader.cxx] \ + $[if $[HAVE_ZLIB], decompressor.cxx zcompressor.cxx download_utils.cxx] #define INSTALL_HEADERS \ asyncUtility.h asyncUtility.I \ diff --git a/panda/src/express/Sources.pp b/panda/src/express/Sources.pp index b87a2aa164..095d10796f 100644 --- a/panda/src/express/Sources.pp +++ b/panda/src/express/Sources.pp @@ -39,8 +39,11 @@ typedReferenceCount.I typedReferenceCount.h typedef.h \ typeRegistry.I typeRegistry.h \ typeRegistryNode.I typeRegistryNode.h \ - vector_uchar.h - + vector_uchar.h \ + $[if $[HAVE_CRYPTO], \ + crypto_utils.cxx crypto_utils.h patchfile.I \ + patchfile.cxx patchfile.h ] + #define INCLUDED_SOURCES \ buffer.cxx checksumHashGenerator.cxx clockObject.cxx \ config_express.cxx datagram.cxx datagramGenerator.cxx \ @@ -56,10 +59,6 @@ typedObject.cxx typedReferenceCount.cxx \ typeRegistry.cxx typeRegistryNode.cxx vector_uchar.cxx - #define IF_CRYPTO_SOURCES \ - crypto_utils.cxx crypto_utils.h \ - patchfile.I patchfile.cxx patchfile.h - #define INSTALL_HEADERS \ bigEndian.h buffer.I buffer.h checksumHashGenerator.I \ checksumHashGenerator.h circBuffer.I circBuffer.h clockObject.I \ diff --git a/panda/src/parametrics/Sources.pp b/panda/src/parametrics/Sources.pp index 491f2d4951..e45d216aa1 100644 --- a/panda/src/parametrics/Sources.pp +++ b/panda/src/parametrics/Sources.pp @@ -18,7 +18,9 @@ nurbsCurveDrawer.h nurbsCurveInterface.I \ nurbsCurveInterface.h parametricCurve.h \ parametricCurveCollection.I parametricCurveCollection.h \ - piecewiseCurve.h + piecewiseCurve.h \ + $[if $[HAVE_NURBSPP], nurbsPPCurve.cxx nurbsPPCurve.h] + #define INCLUDED_SOURCES \ classicNurbsCurve.cxx config_parametrics.cxx cubicCurveseg.cxx \ @@ -27,9 +29,6 @@ parametricCurve.cxx parametricCurveCollection.cxx \ piecewiseCurve.cxx - #define IF_NURBSPP_SOURCES \ - nurbsPPCurve.cxx nurbsPPCurve.h - #define INSTALL_HEADERS \ classicNurbsCurve.I classicNurbsCurve.h \ config_parametrics.h \ diff --git a/panda/src/pnmimagetypes/Sources.pp b/panda/src/pnmimagetypes/Sources.pp index 085734a402..69e852dec0 100644 --- a/panda/src/pnmimagetypes/Sources.pp +++ b/panda/src/pnmimagetypes/Sources.pp @@ -10,14 +10,20 @@ #define LOCAL_LIBS \ pnm pnmimage - #define COMBINED_SOURCES $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx + #define COMBINED_SOURCES \ + $[TARGET]_composite1.cxx $[TARGET]_composite2.cxx \ + $[if $[HAVE_JPEG], $[TARGET]_composite3.cxx] \ + $[if $[HAVE_JPEG2000], $[TARGET]_composite4.cxx] #define SOURCES \ config_pnmimagetypes.h pnmFileTypeAlias.h pnmFileTypeBMP.h \ pnmFileTypeIMG.h pnmFileTypePNM.h pnmFileTypeRadiance.h \ pnmFileTypeSGI.h pnmFileTypeSoftImage.h \ pnmFileTypeTGA.h pnmFileTypeYUV.h color.c colrops.c resolu.c \ - header.c + header.c \ + $[if $[HAVE_TIFF], pnmFileTypeTIFF.cxx pnmFileTypeTIFF.h] \ + $[if $[HAVE_JPEG], pnmFileTypeJPG.h] \ + $[if $[HAVE_JPEG2000], pnmFileTypeJPG2000.h] #define INCLUDED_SOURCES \ config_pnmimagetypes.cxx pnmFileTypeAlias.cxx \ @@ -26,30 +32,9 @@ pnmFileTypeRadiance.cxx pnmFileTypeSGI.cxx \ pnmFileTypeSGIReader.cxx pnmFileTypeSGIWriter.cxx \ pnmFileTypeSoftImage.cxx \ - pnmFileTypeTGA.cxx pnmFileTypeYUV.cxx - - #define IF_TIFF_SOURCES \ - pnmFileTypeTIFF.cxx pnmFileTypeTIFF.h - - #define IF_JPEG_INCLUDED_SOURCES \ - pnmFileTypeJPG.cxx \ - pnmFileTypeJPGReader.cxx pnmFileTypeJPGWriter.cxx - - #define IF_JPEG_SOURCES \ - pnmFileTypeJPG.h - - #define IF_JPEG_COMBINED_SOURCES \ - $[TARGET]_composite3.cxx - - #define IF_JPEG2000_INCLUDED_SOURCES \ - pnmFileTypeJPG2000.cxx \ - pnmFileTypeJPG2000Reader.cxx pnmFileTypeJPG2000Writer.cxx - - #define IF_JPEG2000_SOURCES \ - pnmFileTypeJPG2000.h - - #define IF_JPEG2000_COMBINED_SOURCES \ - $[TARGET]_composite4.cxx + pnmFileTypeTGA.cxx pnmFileTypeYUV.cxx \ + $[if $[HAVE_JPEG], pnmFileTypeJPG.cxx pnmFileTypeJPGReader.cxx pnmFileTypeJPGWriter.cxx] \ + $[if $[HAVE_JPEG2000], pnmFileTypeJPG2000.cxx pnmFileTypeJPG2000Reader.cxx pnmFileTypeJPG2000Writer.cxx] #define INSTALL_HEADERS \ config_pnmimagetypes.h