diff --git a/dtool/pptempl/Global.gmsvc.pp b/dtool/pptempl/Global.gmsvc.pp index 1600a8c83c..a931e73aad 100644 --- a/dtool/pptempl/Global.gmsvc.pp +++ b/dtool/pptempl/Global.gmsvc.pp @@ -160,7 +160,7 @@ #defer extra_cflags /EHsc /Zm250 /DWIN32_VC /DWIN32 $[WARNING_LEVEL_FLAG] $[END_CFLAGS] -#defer MAIN_C_COMPILE_ARGS /nologo /c $[decygwin %,/I"%",$[EXTRA_INCPATH] $[ipath]] $[flags] $[extra_cflags] $[source] +#defer MAIN_C_COMPILE_ARGS /nologo /c $[decygwin %,/I"%",$[EXTRA_INCPATH] $[ipath] $[WIN32_PLATFORMSDK_INCPATH]] $[flags] $[extra_cflags] $[source] #defer COMPILE_C $[COMPILER] /Fo"$[osfilename $[target]]" $[MAIN_C_COMPILE_ARGS] #defer COMPILE_C++ $[COMPILE_C] diff --git a/dtool/pptempl/Global.msvc.pp b/dtool/pptempl/Global.msvc.pp index 3790ab584d..346774ebcd 100644 --- a/dtool/pptempl/Global.msvc.pp +++ b/dtool/pptempl/Global.msvc.pp @@ -136,7 +136,7 @@ #defer extra_cflags /EHsc /Zm250 /DWIN32_VC /DWIN32 $[WARNING_LEVEL_FLAG] $[END_CFLAGS] -#defer MAIN_C_COMPILE_ARGS /nologo /c $[decygwin %,/I"%",$[EXTRA_INCPATH] $[ipath]] $[flags] $[extra_cflags] $[source] +#defer MAIN_C_COMPILE_ARGS /nologo /c $[decygwin %,/I"%",$[EXTRA_INCPATH] $[ipath] $[WIN32_PLATFORMSDK_INCPATH]] $[flags] $[extra_cflags] $[source] #defer COMPILE_C $[COMPILER] /Fo"$[osfilename $[target]]" $[MAIN_C_COMPILE_ARGS] #defer COMPILE_C++ $[COMPILE_C] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index bcd118d97c..35da0e1b50 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -742,11 +742,15 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set! #endif // Set up the correct interrogate options. + +// Caution! interrogate_ipath might be redefined in the +// Global.platform.pp file. #defer interrogate_ipath $[target_ipath:%=-I%] #defer interrogate_spath $[install_parser_inc_dir:%=-S%] -#defer interrogate_options $[interrogate_ipath] \ + +#defer interrogate_options \ -DCPPPARSER -D__cplusplus $[SYSTEM_IGATE_FLAGS] \ - $[interrogate_spath] \ + $[interrogate_spath] $[interrogate_ipath] \ $[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 54673b17c7..c308e315a9 100644 --- a/dtool/pptempl/Template.gmsvc.pp +++ b/dtool/pptempl/Template.gmsvc.pp @@ -145,8 +145,7 @@ // $[target_ipath] is the proper ipath to put on the command line, // from the context of a particular target. -// 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] +#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%\include] $[get_ipath] // $[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 @@ -492,12 +491,9 @@ $[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] $[filtered_interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) +$[TAB] interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) #define target $[igateoutput:%.cxx=$[so_dir]/%.obj] #define source $[so_dir]/$[igateoutput] diff --git a/dtool/pptempl/Template.msvc.pp b/dtool/pptempl/Template.msvc.pp index bd1a399559..e86db8af67 100644 --- a/dtool/pptempl/Template.msvc.pp +++ b/dtool/pptempl/Template.msvc.pp @@ -150,8 +150,7 @@ // $[target_ipath] is the proper ipath to put on the command line, // from the context of a particular target. -// (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] +#defer target_ipath $[TOPDIR] $[sort $[complete_ipath]] $[other_trees:%=%\include] $[get_ipath] // $[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 @@ -459,14 +458,12 @@ $[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] $[filtered_interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) +$[TAB] interrogate -od $[so_dir]/$[igatedb] -oc $[so_dir]/$[igateoutput] $[interrogate_options] -module "$[igatemod]" -library "$[igatelib]" $(lib$[TARGET]_igatescan) #define target $[igateoutput:%.cxx=$[so_dir]\%.obj] #define source $[so_dir]\$[igateoutput] diff --git a/dtool/pptempl/compilerSettings.pp b/dtool/pptempl/compilerSettings.pp index bb7e0ddaeb..959ba13c91 100644 --- a/dtool/pptempl/compilerSettings.pp +++ b/dtool/pptempl/compilerSettings.pp @@ -88,5 +88,3 @@ #if $[PREPROCESSOR_OUTPUT] #define END_CFLAGS $[END_CFLAGS] /E #endif - -