fix bison rules

This commit is contained in:
David Rose 2002-06-03 21:55:13 +00:00
parent 9a29c92ab6
commit c9114127b1
2 changed files with 12 additions and 4 deletions

View File

@ -86,7 +86,11 @@
// Add the bison- and flex-generated .cxx files to the compile
// list, too. These never get added to composite files, though,
// mainly because they tend to be very large files themselves.
#set cxx_sources $[cxx_sources] $[patsubst %.yxx,%.cxx,$[yxx_sources]] $[patsubst %.lxx,%.cxx,$[lxx_sources]]
#foreach source_file $[yxx_sources] $[lxx_sources]
#define generated_file $[patsubst %.yxx %.lxx,%.cxx,$[source_file]]
#define $[generated_file]_sources $[source_file]
#set cxx_sources $[cxx_sources] $[generated_file]
#end source_file
#define compile_sources $[c_sources] $[cxx_sources] $[yxx_sources] $[lxx_sources]
#end metalib_target lib_target noinst_lib_target static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target

View File

@ -89,6 +89,8 @@
// static or dynamic targets, let's eliminate so_sources and just
// use st_sources for simplicity.
#define st_sources $[compile_sources(metalib_target lib_target noinst_lib_target static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)]
#define yxx_st_sources $[yxx_sources(metalib_target lib_target noinst_lib_target static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)]
#define lxx_st_sources $[lxx_sources(metalib_target lib_target noinst_lib_target static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)]
#define dep_sources_1 $[get_sources(metalib_target lib_target noinst_lib_target static_lib_target ss_lib_target bin_target noinst_bin_target test_bin_target)]
// These are the source files that our dependency cache file will
@ -135,7 +137,7 @@
// This is the set of files we might copy into *.prebuilt, if we have
// bison and flex (or copy from *.prebuilt if we don't have them).
#define bison_prebuilt $[patsubst %.yxx,%.h,$[yxx_sources]] $[patsubst %.yxx,%.cxx,$[yxx_sources]] $[patsubst %.lxx,%.cxx,$[lxx_sources]]
#define bison_prebuilt $[patsubst %.yxx,%.h,$[yxx_st_sources]] $[patsubst %.yxx,%.cxx,$[yxx_st_sources]] $[patsubst %.lxx,%.cxx,$[lxx_st_sources]]
// Pre-compiled headers are one way to speed the compilation of many
// C++ source files that include similar headers, but it turns out a
@ -198,8 +200,8 @@ $[TAB] rm -f *.pyc *.pyo // Also scrub out old generated Python code.
// it also cleans up the bison and flex output, as well as the
// dependency cache file.
cleanall : clean
#if $[yxx_sources] $[lxx_sources]
$[TAB] rm -f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_sources] $[lxx_sources]]
#if $[yxx_st_sources] $[lxx_st_sources]
$[TAB] rm -f $[patsubst %.yxx %.lxx,%.cxx,$[yxx_st_sources] $[lxx_st_sources]]
#endif
#if $[ne $[DEPENDENCY_CACHE_FILENAME],]
$[TAB] rm -f $[DEPENDENCY_CACHE_FILENAME]
@ -269,8 +271,10 @@ $[TAB] rm -f $[sort $[installed_igate_files]]
#if $[HAVE_BISON]
prebuild-bison : $[patsubst %,%.prebuilt,$[bison_prebuilt]]
clean-prebuild-bison :
#if $[bison_prebuilt]
$[TAB] rm -f $[sort $[patsubst %,%.prebuilt,$[bison_prebuilt]]]
#endif
#endif
// We need a rule for each directory we might need to make. This
// loops through the full set of directories and creates a rule to