Browse Source

fix my screwups that broke non-precomp dirs

cxgeorge 24 years ago
parent
commit
21933936d5

+ 1 - 1
dtool/pptempl/Global.gmsvc.pp

@@ -90,7 +90,7 @@
 #defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]"
 #defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]"
 #elif $[eq $[NUMBER_OF_PROCESSORS],1]
 #elif $[eq $[NUMBER_OF_PROCESSORS],1]
 // no multi-proc, so can use same .pdb file for each compile
 // no multi-proc, so can use same .pdb file for each compile
-#defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[target_dirname].pdb]"
+#defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[pdb_filename].pdb]"
 #else
 #else
 // puts dbg info inside first .obj
 // puts dbg info inside first .obj
 #defer DEBUG_TYPE_FLAGS /Z7 
 #defer DEBUG_TYPE_FLAGS /Z7 

+ 1 - 1
dtool/pptempl/Global.msvc.pp

@@ -87,7 +87,7 @@
 #defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]"
 #defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[target:%.obj=%.pdb]]"
 #else
 #else
 // for pch, .pdb file name must be the same for obj and pch header obj
 // for pch, .pdb file name must be the same for obj and pch header obj
-#defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[target_dirname].pdb]"
+#defer DEBUG_TYPE_FLAGS /Zi /Fd"$[osfilename $[pdb_filename].pdb]"
 #endif
 #endif
 
 
 #include $[THISDIRPREFIX]compilerSettings.pp
 #include $[THISDIRPREFIX]compilerSettings.pp

+ 4 - 3
dtool/pptempl/Template.gmsvc.pp

@@ -772,12 +772,12 @@ $[TAB] $[COMPILE_C++]
 #define source $[file]
 #define source $[file]
 #define ipath $[file_ipath]
 #define ipath $[file_ipath]
 
 
+#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
+
 #if $[DO_PCH]
 #if $[DO_PCH]
 // best way to find out if file use pch (and needs /Yu) is to check dependencies
 // best way to find out if file use pch (and needs /Yu) is to check dependencies
 // these must be defined before flags (or could defer them)
 // these must be defined before flags (or could defer them)
-
 #define target_pch $[subst /./,/,$[patsubst %.h,$[st_dir]/%.pch,$[filter %_headers.h, $[dependencies $[file]]]]]
 #define target_pch $[subst /./,/,$[patsubst %.h,$[st_dir]/%.pch,$[filter %_headers.h, $[dependencies $[file]]]]]
-#define target_dirname $[patsubst %_headers.pch,%,$[target_pch]] 
 #endif
 #endif
 
 
 #define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
 #define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
@@ -798,12 +798,13 @@ $[TAB] $[COMPILE_LINE]
 #foreach file $[pch_header_source]
 #foreach file $[pch_header_source]
 #define target_pch $[patsubst %.h,$[st_dir]/%.pch,$[file]]
 #define target_pch $[patsubst %.h,$[st_dir]/%.pch,$[file]]
 #define target_obj $[patsubst %.h,$[st_dir]/%.obj,$[file]]
 #define target_obj $[patsubst %.h,$[st_dir]/%.obj,$[file]]
-#define target_dirname $[patsubst %_headers.pch,%,$[target_pch]] 
+#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
 
 
 #define target $[target_obj]
 #define target $[target_obj]
 #define source $[file]
 #define source $[file]
 #define ipath $[file_ipath]
 #define ipath $[file_ipath]
 #define flags $[c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
 #define flags $[c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
+
 // Yacc must run before some files can be compiled, so all files
 // Yacc must run before some files can be compiled, so all files
 // depend on yacc having run.
 // depend on yacc having run.
 $[target_obj] : $[source] $[dependencies $[file]] $[st_dir]/stamp
 $[target_obj] : $[source] $[dependencies $[file]] $[st_dir]/stamp

+ 6 - 3
dtool/pptempl/Template.msvc.pp

@@ -728,11 +728,12 @@ $[TAB] $[COMPILE_C]
 #define source $[file]
 #define source $[file]
 #define ipath $[file_ipath]
 #define ipath $[file_ipath]
 
 
+#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
+
 #if $[DO_PCH]
 #if $[DO_PCH]
 // best way to find out if file use pch (and needs /Yu) is to check dependencies
 // best way to find out if file use pch (and needs /Yu) is to check dependencies
 // these must be defined before flags (or could defer them)
 // these must be defined before flags (or could defer them)
 #define target_pch $[subst \./,\,$[patsubst %.h,$[so_dir]\%.pch,$[filter %_headers.h, $[dependencies $[file]]]]]
 #define target_pch $[subst \./,\,$[patsubst %.h,$[so_dir]\%.pch,$[filter %_headers.h, $[dependencies $[file]]]]]
-#define target_dirname $[patsubst %_headers.pch,%,$[target_pch]] 
 #endif
 #endif
 
 
 #define flags $[c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
 #define flags $[c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]]
@@ -753,15 +754,17 @@ $[TAB] $[COMPILE_LINE]
 // Rules to compile C++ files that appear on a static library or in an
 // Rules to compile C++ files that appear on a static library or in an
 // executable.
 // executable.
 #foreach file $[sort $[cxx_st_sources]]
 #foreach file $[sort $[cxx_st_sources]]
+
 #define target $[patsubst %.cxx,$[st_dir]\%.obj,$[file]]
 #define target $[patsubst %.cxx,$[st_dir]\%.obj,$[file]]
 #define source $[file]
 #define source $[file]
 #define ipath $[file_ipath]
 #define ipath $[file_ipath]
 
 
+#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
+
 #if $[DO_PCH]
 #if $[DO_PCH]
 // best way to find out if file use pch (and needs /Yu) is to check dependencies
 // best way to find out if file use pch (and needs /Yu) is to check dependencies
 // these must be defined before flags (or could defer them)
 // these must be defined before flags (or could defer them)
 #define target_pch $[subst \./,\,$[patsubst %.h,$[st_dir]\%.pch,$[filter %_headers.h, $[dependencies $[file]]]]]
 #define target_pch $[subst \./,\,$[patsubst %.h,$[st_dir]\%.pch,$[filter %_headers.h, $[dependencies $[file]]]]]
-#define target_dirname $[patsubst %_headers.pch,%,$[target_pch]] 
 #endif
 #endif
 
 
 #define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
 #define flags $[c++flags] $[all_sources $[building_var:%=/D%],$[file]]
@@ -784,7 +787,7 @@ $[TAB] $[COMPILE_LINE]
 #foreach file $[pch_header_source]
 #foreach file $[pch_header_source]
 #define target_pch $[patsubst %.h,$[st_dir]\%.pch,$[file]]
 #define target_pch $[patsubst %.h,$[st_dir]\%.pch,$[file]]
 #define target_obj $[patsubst %.h,$[st_dir]\%.obj,$[file]]
 #define target_obj $[patsubst %.h,$[st_dir]\%.obj,$[file]]
-#define target_dirname $[patsubst %_headers.pch,%,$[target_pch]] 
+#define pdb_filename $[st_dir]/$[TARGET(lib_target)]
 #define target $[target_obj]
 #define target $[target_obj]
 #define source $[file]
 #define source $[file]
 #define ipath $[file_ipath]
 #define ipath $[file_ipath]