From 564c89328648471aa32be5e39a73716e985e24ae Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 24 May 2002 22:58:25 +0000 Subject: [PATCH] attempted fix for bison dependencies. maybe broken still. --- dtool/pptempl/Template.gmsvc.pp | 9 +++++---- dtool/pptempl/Template.msvc.pp | 9 +++++---- dtool/pptempl/Template.unix.pp | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/dtool/pptempl/Template.gmsvc.pp b/dtool/pptempl/Template.gmsvc.pp index e84974b03e..694f83f2f4 100644 --- a/dtool/pptempl/Template.gmsvc.pp +++ b/dtool/pptempl/Template.gmsvc.pp @@ -750,6 +750,7 @@ $[target] : $[source] $[TAB] $[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source] $[TAB] mv y.tab.c $[target] $[TAB] mv y.tab.h $[patsubst %.yxx,%.h,$[source]] +$[target_header] : $[target] $[target].prebuilt : $[target] $[TAB] cp $[target] $[target].prebuilt $[target_header].prebuilt : $[target_header] @@ -817,7 +818,7 @@ $[TAB] $[COMPILE_C] // Yacc must run before some files can be compiled, so all files // depend on yacc having run. -$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp +$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.h] $[so_dir]/stamp $[TAB] $[COMPILE_C++] #end file @@ -849,7 +850,7 @@ $[TAB] $[COMPILE_C++] #define COMPILE_LINE $[COMPILE_C++] #endif -$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[target_pch] $[st_dir]/stamp +$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.h] $[target_pch] $[st_dir]/stamp $[TAB] $[COMPILE_LINE] #end file @@ -886,7 +887,7 @@ $[target_pch] : $[target_obj] #define flags $[noopt_c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]] // Yacc must run before some files can be compiled, so all files // depend on yacc having run. -$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] $[so_dir]/stamp +$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.h] $[so_dir]/stamp $[TAB] $[COMPILE_C++] #end file @@ -898,7 +899,7 @@ $[TAB] $[COMPILE_C++] #define source $[patsubst %.lxx %.yxx,%.cxx,$[file]] #define ipath $[file_ipath] #define flags $[noopt_c++flags] $[all_sources $[building_var:%=/D%],$[file]] -$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[st_dir]/stamp +$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.h] $[st_dir]/stamp $[TAB] $[COMPILE_C++] #end file diff --git a/dtool/pptempl/Template.msvc.pp b/dtool/pptempl/Template.msvc.pp index 91b441310d..a6f617dc06 100644 --- a/dtool/pptempl/Template.msvc.pp +++ b/dtool/pptempl/Template.msvc.pp @@ -724,6 +724,7 @@ $[target] : $[source] $[TAB] $[BISON] $[YFLAGS] -y $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source] $[TAB] move y.tab.c $[target] $[TAB] move y.tab.h $[patsubst %.yxx,%.h,$[source]] +$[target_header] : $[target] $[target].prebuilt : $[target] $[TAB] copy $[target] $[target].prebuilt $[target_header].prebuilt : $[target_header] @@ -809,7 +810,7 @@ $[TAB] $[COMPILE_C] // Yacc must run before some files can be compiled, so all files // depend on yacc having run. -$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[target_pch] +$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.h] $[target_pch] $[TAB] $[COMPILE_LINE] #end file @@ -842,7 +843,7 @@ $[TAB] $[COMPILE_LINE] // Yacc must run before some files can be compiled, so all files // depend on yacc having run. -$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] $[target_pch] +$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.h] $[target_pch] $[TAB] $[COMPILE_LINE] #end file @@ -878,7 +879,7 @@ $[target_pch] : $[target_obj] #define flags $[noopt_c++flags] $[CFLAGS_SHARED] $[all_sources $[building_var:%=/D%],$[file]] // Yacc must run before some files can be compiled, so all files // depend on yacc having run. -$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] +$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.h] $[TAB] $[COMPILE_C++] #end file @@ -890,7 +891,7 @@ $[TAB] $[COMPILE_C++] #define source $[patsubst %.lxx %.yxx,%.cxx,$[file]] #define ipath $[file_ipath] #define flags $[noopt_c++flags] $[all_sources $[building_var:%=/D%],$[file]] -$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] +$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.h] $[TAB] $[COMPILE_C++] #end file diff --git a/dtool/pptempl/Template.unix.pp b/dtool/pptempl/Template.unix.pp index a5651fa8ab..95343c7869 100644 --- a/dtool/pptempl/Template.unix.pp +++ b/dtool/pptempl/Template.unix.pp @@ -599,6 +599,7 @@ $[target] : $[source] $[TAB]$[BISON] -y $[YFLAGS] $[if $[YACC_PREFIX],-d --name-prefix=$[YACC_PREFIX]] $[source] $[TAB]mv y.tab.c $[target] $[TAB]mv y.tab.h $[target_header] +$[target_header] : $[target] $[target].prebuilt : $[target] $[TAB]cp $[target] $[target].prebuilt $[target_header].prebuilt : $[target_header] @@ -666,7 +667,7 @@ $[TAB]$[COMPILE_C] #define flags $[c++flags] $[CFLAGS_SHARED] // Yacc must run before some files can be compiled, so all files // depend on yacc having run. -$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] +$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.h] $[TAB]$[COMPILE_C++] #end file @@ -678,7 +679,7 @@ $[TAB]$[COMPILE_C++] #define source $[file] #define ipath $[file_ipath] #define flags $[c++flags] -$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] +$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.h] $[TAB]$[COMPILE_C++] #end file @@ -691,7 +692,7 @@ $[TAB]$[COMPILE_C++] #define flags $[noopt_c++flags] $[CFLAGS_SHARED] // Yacc must run before some files can be compiled, so all files // depend on yacc having run. -$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.cxx] +$[target] : $[source] $[dependencies $[file]] $[yxx_so_sources:%.yxx=%.h] $[TAB]$[COMPILE_C++] #end file @@ -703,7 +704,7 @@ $[TAB]$[COMPILE_C++] #define source $[patsubst %.lxx %.yxx,%.cxx,$[file]] #define ipath $[file_ipath] #define flags $[noopt_c++flags] -$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.cxx] +$[target] : $[source] $[dependencies $[file]] $[yxx_st_sources:%.yxx=%.h] $[TAB]$[COMPILE_C++] #end file