From f85ede6104cccc5ef40c6f8a657e059facccdbad Mon Sep 17 00:00:00 2001 From: cxgeorge <> Date: Wed, 10 Oct 2001 21:06:36 +0000 Subject: [PATCH] interrogate barfs on platform-sdk dir, hack around by filtering out that dir --- dtool/Config.Win32.pp | 4 +++- dtool/pptempl/Global.pp | 9 ++------- dtool/pptempl/Template.gmsvc.pp | 10 ++++++++-- dtool/pptempl/Template.msvc.pp | 7 +++++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/dtool/Config.Win32.pp b/dtool/Config.Win32.pp index 522f39c8b6..ab4904f52b 100644 --- a/dtool/Config.Win32.pp +++ b/dtool/Config.Win32.pp @@ -6,8 +6,10 @@ // compiler features, etc. // +// -D__stdcall seems dangerous, interrogate will assume c-calling convention for WINAPI fns + // What additional flags should we pass to interrogate? -#define SYSTEM_IGATE_FLAGS -longlong __int64 -D_X86_ -DWIN32_VC -D"_declspec(param)=" +#define SYSTEM_IGATE_FLAGS -longlong __int64 -D_X86_ -DWIN32_VC -D"_declspec(param)=" -D_near -D_far -D__near -D__far // Is the platform big-endian (like an SGI workstation) or // little-endian (like a PC)? Define this to the empty string to diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index cd382d2916..bcd118d97c 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -437,10 +437,6 @@ #defun get_ipath #define alt_ipath $[stl_ipath] $[nspr_ipath] $[python_ipath] - #if $[eq $[PLATFORM],Win32] - // all win32 files need path to latest windows.h and libs, which are in plat-sdk dirs, not the deflt vc ones - #set alt_ipath $[WIN32_PLATFORMSDK_INCPATH] $[alt_ipath] - #endif #if $[ne $[USE_CRYPTO] $[components $[USE_CRYPTO],$[active_component_libs]],] #set alt_ipath $[alt_ipath] $[crypto_ipath] #endif @@ -745,13 +741,12 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set! #define install_parser_inc_dir $[install_headers_dir]/parser-inc #endif - // Set up the correct interrogate options. #defer interrogate_ipath $[target_ipath:%=-I%] #defer interrogate_spath $[install_parser_inc_dir:%=-S%] -#defer interrogate_options \ +#defer interrogate_options $[interrogate_ipath] \ -DCPPPARSER -D__cplusplus $[SYSTEM_IGATE_FLAGS] \ - $[interrogate_spath] $[interrogate_ipath] \ + $[interrogate_spath] \ $[CDEFINES_OPT$[OPTIMIZE]:%=-D%] \ $[filter -D%,$[C++FLAGS]] \ $[INTERROGATE_OPTIONS] \ diff --git a/dtool/pptempl/Template.gmsvc.pp b/dtool/pptempl/Template.gmsvc.pp index eb10a93215..54673b17c7 100644 --- a/dtool/pptempl/Template.gmsvc.pp +++ b/dtool/pptempl/Template.gmsvc.pp @@ -144,7 +144,9 @@ // $[target_ipath] is the proper ipath to put on the command line, // from the context of a particular target. -#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%/include] $[get_ipath] + +// platsdk must be on end since it has filename collisions with panda stuff (buffer.h) +#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%\include] $[get_ipath] $[WIN32_PLATFORMSDK_INCPATH] // $[file_ipath] is the ipath from the context of a particular source // file, given in $[file]. It uses the all_sources map to look up @@ -490,9 +492,12 @@ $[TAB] cp -f $[so_dir]/$[local] $[dest] // parallel make. $[so_dir]/$[igatedb] : $[so_dir]/$[igateoutput] +// have to filter out plat-sdk inc dir, since interrogate is currently too buggy to parse stuff there +#define filtered_interrogate_options $[filter-out -I"C:\Program Files\Microsoft Platform Sdk\Include", $[interrogate_options]] + lib$[TARGET]_igatescan = $[igatescan] $[so_dir]/$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]] $[so_dir]/stamp -$[TAB] interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) +$[TAB] interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[filtered_interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) #define target $[igateoutput:%.cxx=$[so_dir]/%.obj] #define source $[so_dir]/$[igateoutput] @@ -513,6 +518,7 @@ $[TAB] $[COMPILE_C++] lib$[TARGET]_igatemscan = $[igatemscan] #define target $[so_dir]/$[igatemout] #define sources $(lib$[TARGET]_igatemscan) + $[target] : $[sources] $[so_dir]/stamp $[TAB] interrogate_module -oc $[target] -module "$[igatemod]" -library "$[igatelib]" $[interrogate_module_options] $[sources] diff --git a/dtool/pptempl/Template.msvc.pp b/dtool/pptempl/Template.msvc.pp index e86db8af67..bd1a399559 100644 --- a/dtool/pptempl/Template.msvc.pp +++ b/dtool/pptempl/Template.msvc.pp @@ -150,7 +150,8 @@ // $[target_ipath] is the proper ipath to put on the command line, // from the context of a particular target. -#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%\include] $[get_ipath] +// (Note: platform sdk must be on end since it has filename collisions with panda stuff (buffer.h)) +#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%\include] $[get_ipath] $[WIN32_PLATFORMSDK_INCPATH] // $[file_ipath] is the ipath from the context of a particular source // file, given in $[file]. It uses the all_sources map to look up @@ -458,12 +459,14 @@ $[TAB] $[NT_COPYCMD] $[so_dir]\$[local] $[dest] $[install_igatedb_dir]\$[igatedb] : $[so_dir]\$[igatedb] #define local $[igatedb] #define dest $[install_igatedb_dir] +// have to filter out plat-sdk inc dir, since interrogate is currently too buggy to parse stuff there +#define filtered_interrogate_options $[filter-out -I"C:\Program Files\Microsoft Platform Sdk\Include", $[interrogate_options]] $[TAB] $[NT_COPYCMD] $[so_dir]\$[local] $[dest] lib$[TARGET]_igatescan = $[osfilename $[igatescan]] $[so_dir]\$[igatedb] $[so_dir]\$[igateoutput] : $[sort $[patsubst %.h,%.h,%.I,%.I,%.T,%.T,%,,$[dependencies $[igatescan]] $[igatescan:%=./%]]] // We use forward slash for interrogate because it prefers those. -$[TAB] interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) +$[TAB] interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[filtered_interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) #define target $[igateoutput:%.cxx=$[so_dir]\%.obj] #define source $[so_dir]\$[igateoutput]