From 904209b277c7e69f332fba86466d4ee11ea82b25 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 24 May 2017 13:44:52 +0200 Subject: [PATCH] Split out interrogate jobs for dtool directories from express --- dtool/src/dtoolbase/dtool_platform.h | 4 +- dtool/src/dtoolbase/typeHandle.N | 1 + .../src/dtoolbase}/typeHandle_ext.cxx | 0 .../src/dtoolbase}/typeHandle_ext.h | 0 dtool/src/dtoolutil/config_dtoolutil.N | 9 +++ dtool/src/dtoolutil/config_dtoolutil.h | 3 + .../src/dtoolutil}/filename_ext.cxx | 0 .../src/dtoolutil}/filename_ext.h | 0 .../src/dtoolutil}/globPattern_ext.cxx | 0 .../src/dtoolutil}/globPattern_ext.h | 0 .../dtoolutil/p3dtoolutil_ext_composite.cxx | 2 + dtool/src/dtoolutil/pfstream.h | 4 +- dtool/src/prc/p3prc_ext_composite.cxx | 2 + .../src/prc}/streamReader_ext.cxx | 0 .../src/prc}/streamReader_ext.h | 0 .../src/prc}/streamWriter_ext.cxx | 0 .../src/prc}/streamWriter_ext.h | 0 makepanda/makepanda.py | 64 +++++++++++++++++++ makepanda/makepandacore.py | 7 ++ panda/src/express/config_express.N | 56 ---------------- panda/src/express/p3express_ext_composite.cxx | 5 -- 21 files changed, 91 insertions(+), 66 deletions(-) create mode 100644 dtool/src/dtoolbase/typeHandle.N rename {panda/src/express => dtool/src/dtoolbase}/typeHandle_ext.cxx (100%) rename {panda/src/express => dtool/src/dtoolbase}/typeHandle_ext.h (100%) create mode 100644 dtool/src/dtoolutil/config_dtoolutil.N rename {panda/src/express => dtool/src/dtoolutil}/filename_ext.cxx (100%) rename {panda/src/express => dtool/src/dtoolutil}/filename_ext.h (100%) rename {panda/src/express => dtool/src/dtoolutil}/globPattern_ext.cxx (100%) rename {panda/src/express => dtool/src/dtoolutil}/globPattern_ext.h (100%) create mode 100644 dtool/src/dtoolutil/p3dtoolutil_ext_composite.cxx create mode 100644 dtool/src/prc/p3prc_ext_composite.cxx rename {panda/src/express => dtool/src/prc}/streamReader_ext.cxx (100%) rename {panda/src/express => dtool/src/prc}/streamReader_ext.h (100%) rename {panda/src/express => dtool/src/prc}/streamWriter_ext.cxx (100%) rename {panda/src/express => dtool/src/prc}/streamWriter_ext.h (100%) diff --git a/dtool/src/dtoolbase/dtool_platform.h b/dtool/src/dtoolbase/dtool_platform.h index 7955c7a941..4cb25abc3a 100644 --- a/dtool/src/dtoolbase/dtool_platform.h +++ b/dtool/src/dtoolbase/dtool_platform.h @@ -72,10 +72,8 @@ #define DTOOL_PLATFORM "linux_ppc" #endif -#ifndef DTOOL_PLATFORM +#if !defined(DTOOL_PLATFORM) && !defined(CPPPARSER) #error "Can't determine platform; please define DTOOL_PLATFORM in Config.pp file." #endif - - #endif diff --git a/dtool/src/dtoolbase/typeHandle.N b/dtool/src/dtoolbase/typeHandle.N new file mode 100644 index 0000000000..9cd1d579b0 --- /dev/null +++ b/dtool/src/dtoolbase/typeHandle.N @@ -0,0 +1 @@ +defconstruct TypeHandle TypeHandle(TypeHandle::none()) diff --git a/panda/src/express/typeHandle_ext.cxx b/dtool/src/dtoolbase/typeHandle_ext.cxx similarity index 100% rename from panda/src/express/typeHandle_ext.cxx rename to dtool/src/dtoolbase/typeHandle_ext.cxx diff --git a/panda/src/express/typeHandle_ext.h b/dtool/src/dtoolbase/typeHandle_ext.h similarity index 100% rename from panda/src/express/typeHandle_ext.h rename to dtool/src/dtoolbase/typeHandle_ext.h diff --git a/dtool/src/dtoolutil/config_dtoolutil.N b/dtool/src/dtoolutil/config_dtoolutil.N new file mode 100644 index 0000000000..2577aa3b24 --- /dev/null +++ b/dtool/src/dtoolutil/config_dtoolutil.N @@ -0,0 +1,9 @@ +forcetype ofstream +forcetype ifstream +forcetype fstream + +forcetype ios_base +forcetype ios +forcetype istream +forcetype ostream +forcetype iostream diff --git a/dtool/src/dtoolutil/config_dtoolutil.h b/dtool/src/dtoolutil/config_dtoolutil.h index 1563b0250f..20e9784c55 100644 --- a/dtool/src/dtoolutil/config_dtoolutil.h +++ b/dtool/src/dtoolutil/config_dtoolutil.h @@ -16,4 +16,7 @@ #include "dtoolbase.h" +// Include this so interrogate can find it. +#include + #endif diff --git a/panda/src/express/filename_ext.cxx b/dtool/src/dtoolutil/filename_ext.cxx similarity index 100% rename from panda/src/express/filename_ext.cxx rename to dtool/src/dtoolutil/filename_ext.cxx diff --git a/panda/src/express/filename_ext.h b/dtool/src/dtoolutil/filename_ext.h similarity index 100% rename from panda/src/express/filename_ext.h rename to dtool/src/dtoolutil/filename_ext.h diff --git a/panda/src/express/globPattern_ext.cxx b/dtool/src/dtoolutil/globPattern_ext.cxx similarity index 100% rename from panda/src/express/globPattern_ext.cxx rename to dtool/src/dtoolutil/globPattern_ext.cxx diff --git a/panda/src/express/globPattern_ext.h b/dtool/src/dtoolutil/globPattern_ext.h similarity index 100% rename from panda/src/express/globPattern_ext.h rename to dtool/src/dtoolutil/globPattern_ext.h diff --git a/dtool/src/dtoolutil/p3dtoolutil_ext_composite.cxx b/dtool/src/dtoolutil/p3dtoolutil_ext_composite.cxx new file mode 100644 index 0000000000..89a0ebcc30 --- /dev/null +++ b/dtool/src/dtoolutil/p3dtoolutil_ext_composite.cxx @@ -0,0 +1,2 @@ +#include "filename_ext.cxx" +#include "globPattern_ext.cxx" diff --git a/dtool/src/dtoolutil/pfstream.h b/dtool/src/dtoolutil/pfstream.h index b7565c1c64..c26456bbe6 100644 --- a/dtool/src/dtoolutil/pfstream.h +++ b/dtool/src/dtoolutil/pfstream.h @@ -17,7 +17,7 @@ #include "pfstreamBuf.h" class EXPCL_DTOOL IPipeStream : public istream { -PUBLISHED: +public: INLINE IPipeStream(const std::string); #if _MSC_VER >= 1800 @@ -33,7 +33,7 @@ private: }; class EXPCL_DTOOL OPipeStream : public ostream { -PUBLISHED: +public: INLINE OPipeStream(const std::string); #if _MSC_VER >= 1800 diff --git a/dtool/src/prc/p3prc_ext_composite.cxx b/dtool/src/prc/p3prc_ext_composite.cxx new file mode 100644 index 0000000000..223ef504cd --- /dev/null +++ b/dtool/src/prc/p3prc_ext_composite.cxx @@ -0,0 +1,2 @@ +#include "streamReader_ext.cxx" +#include "streamWriter_ext.cxx" diff --git a/panda/src/express/streamReader_ext.cxx b/dtool/src/prc/streamReader_ext.cxx similarity index 100% rename from panda/src/express/streamReader_ext.cxx rename to dtool/src/prc/streamReader_ext.cxx diff --git a/panda/src/express/streamReader_ext.h b/dtool/src/prc/streamReader_ext.h similarity index 100% rename from panda/src/express/streamReader_ext.h rename to dtool/src/prc/streamReader_ext.h diff --git a/panda/src/express/streamWriter_ext.cxx b/dtool/src/prc/streamWriter_ext.cxx similarity index 100% rename from panda/src/express/streamWriter_ext.cxx rename to dtool/src/prc/streamWriter_ext.cxx diff --git a/panda/src/express/streamWriter_ext.h b/dtool/src/prc/streamWriter_ext.h similarity index 100% rename from panda/src/express/streamWriter_ext.h rename to dtool/src/prc/streamWriter_ext.h diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 69b4265801..d2a8127fc4 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -3407,6 +3407,59 @@ if (not RTDIST and not RUNTIME): TargetAdd('test_interrogate.exe', input='libp3pystub.lib') TargetAdd('test_interrogate.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL', 'WINGDI', 'WINUSER']) +# +# DIRECTORY: dtool/src/dtoolbase/ +# + +OPTS=['DIR:dtool/src/dtoolbase', 'PYTHON'] +IGATEFILES=GetDirectoryContents('dtool/src/dtoolbase', ["*_composite*.cxx"]) +IGATEFILES += [ + "typeHandle.h", + "typeHandle_ext.h", + "typeRegistry.h", + "typedObject.h", + "neverFreeMemory.h", +] +TargetAdd('libp3dtoolbase.in', opts=OPTS, input=IGATEFILES) +TargetAdd('libp3dtoolbase.in', opts=['IMOD:panda3d.core', 'ILIB:libp3dtoolbase', 'SRCDIR:dtool/src/dtoolbase']) +TargetAdd('libp3dtoolbase_igate.obj', input='libp3dtoolbase.in', opts=["DEPENDENCYONLY"]) +TargetAdd('p3dtoolbase_typeHandle_ext.obj', opts=OPTS, input='typeHandle_ext.cxx') + +# +# DIRECTORY: dtool/src/dtoolutil/ +# + +OPTS=['DIR:dtool/src/dtoolutil', 'PYTHON'] +IGATEFILES=GetDirectoryContents('dtool/src/dtoolutil', ["*_composite*.cxx"]) +IGATEFILES += [ + "config_dtoolutil.h", + "pandaSystem.h", + "dSearchPath.h", + "executionEnvironment.h", + "textEncoder.h", + "filename.h", + "filename_ext.h", + "globPattern.h", + "globPattern_ext.h", + "pandaFileStream.h", + "lineStream.h", +] +TargetAdd('libp3dtoolutil.in', opts=OPTS, input=IGATEFILES) +TargetAdd('libp3dtoolutil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3dtoolutil', 'SRCDIR:dtool/src/dtoolutil']) +TargetAdd('libp3dtoolutil_igate.obj', input='libp3dtoolutil.in', opts=["DEPENDENCYONLY"]) +TargetAdd('p3dtoolutil_ext_composite.obj', opts=OPTS, input='p3dtoolutil_ext_composite.cxx') + +# +# DIRECTORY: dtool/src/prc/ +# + +OPTS=['DIR:dtool/src/prc', 'PYTHON'] +IGATEFILES=GetDirectoryContents('dtool/src/prc', ["*.h", "*_composite*.cxx"]) +TargetAdd('libp3prc.in', opts=OPTS, input=IGATEFILES) +TargetAdd('libp3prc.in', opts=['IMOD:panda3d.core', 'ILIB:libp3prc', 'SRCDIR:dtool/src/prc']) +TargetAdd('libp3prc_igate.obj', input='libp3prc.in', opts=["DEPENDENCYONLY"]) +TargetAdd('p3prc_ext_composite.obj', opts=OPTS, input='p3prc_ext_composite.cxx') + # # DIRECTORY: panda/src/pandabase/ # @@ -4041,6 +4094,10 @@ if (not RUNTIME): TargetAdd('libpanda.dll', dep='dtool_have_freetype.dat') TargetAdd('libpanda.dll', opts=OPTS) + TargetAdd('core_module.obj', input='libp3dtoolbase.in') + TargetAdd('core_module.obj', input='libp3dtoolutil.in') + TargetAdd('core_module.obj', input='libp3prc.in') + TargetAdd('core_module.obj', input='libp3downloader.in') TargetAdd('core_module.obj', input='libp3express.in') @@ -4080,6 +4137,13 @@ if (not RUNTIME): TargetAdd('core_module.obj', opts=['PYTHON']) TargetAdd('core_module.obj', opts=['IMOD:panda3d.core', 'ILIB:core']) + TargetAdd('core.pyd', input='libp3dtoolbase_igate.obj') + TargetAdd('core.pyd', input='p3dtoolbase_typeHandle_ext.obj') + TargetAdd('core.pyd', input='libp3dtoolutil_igate.obj') + TargetAdd('core.pyd', input='p3dtoolutil_ext_composite.obj') + TargetAdd('core.pyd', input='libp3prc_igate.obj') + TargetAdd('core.pyd', input='p3prc_ext_composite.obj') + TargetAdd('core.pyd', input='libp3downloader_igate.obj') TargetAdd('core.pyd', input='p3downloader_stringStream_ext.obj') TargetAdd('core.pyd', input='p3express_ext_composite.obj') diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index feab23e98a..7d86accc07 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -3163,6 +3163,13 @@ def TargetAdd(target, dummy=0, opts=[], input=[], dep=[], ipath=None, winrc=None woutc = GetOutputDir()+"/tmp/"+outbase+"_igate.cxx" t.deps[woutc] = 1 + if target.endswith(".in"): + # Add any .N files. + base, ext = os.path.splitext(fullinput) + fulln = base + ".N" + if os.path.isfile(fulln): + t.deps[fulln] = 1 + for x in dep: fulldep = FindLocation(x, ipath) t.deps[fulldep] = 1 diff --git a/panda/src/express/config_express.N b/panda/src/express/config_express.N index 454c630ed2..e68b43fbfd 100644 --- a/panda/src/express/config_express.N +++ b/panda/src/express/config_express.N @@ -1,60 +1,4 @@ -defconstruct TypeHandle TypeHandle(TypeHandle::none()) - -forcetype PandaSystem -forcetype DSearchPath -forcetype DSearchPath::Results -forcetype ExecutionEnvironment -forcetype TextEncoder -forcetype Filename -forcetype GlobPattern -forcetype Notify -forcetype NotifyCategory -forcetype NotifySeverity -forcetype TypedObject -forcetype TypeHandle -forcetype TypeRegistry -forcetype StreamReader -forcetype StreamWriter -forcetype NeverFreeMemory -forcetype IFileStream -forcetype OFileStream -forcetype FileStream -forcetype IDecryptStream -forcetype OEncryptStream -forcetype LineStream - -forcetype ofstream -forcetype ifstream -forcetype fstream - forcetype DConfig -forcetype ConfigFlags -forcetype ConfigPage -forcetype ConfigPageManager -forcetype ConfigDeclaration -forcetype ConfigVariableCore -forcetype ConfigVariable -forcetype ConfigVariableBase -forcetype ConfigVariableBool -forcetype ConfigVariableDouble -forcetype ConfigVariableFilename -forcetype ConfigVariableInt -forcetype ConfigVariableInt64 -forcetype ConfigVariableList -forcetype ConfigVariableManager -forcetype ConfigVariableSearchPath -forcetype ConfigVariableString - -forcetype ios_base -forcetype ios -forcetype istream -forcetype ostream -forcetype iostream - -forcetype StreamWrapperBase -forcetype IStreamWrapper -forcetype OStreamWrapper -forcetype StreamWrapper forcetype PTA_uchar forcetype CPTA_uchar diff --git a/panda/src/express/p3express_ext_composite.cxx b/panda/src/express/p3express_ext_composite.cxx index e034261ae3..ee104077cb 100644 --- a/panda/src/express/p3express_ext_composite.cxx +++ b/panda/src/express/p3express_ext_composite.cxx @@ -1,9 +1,4 @@ -#include "filename_ext.cxx" -#include "globPattern_ext.cxx" #include "memoryUsagePointers_ext.cxx" #include "ramfile_ext.cxx" -#include "streamReader_ext.cxx" -#include "streamWriter_ext.cxx" -#include "typeHandle_ext.cxx" #include "virtualFileSystem_ext.cxx" #include "virtualFile_ext.cxx"