From 69f796cc44893d51ea56e2ad80057533c665c80b Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 1 Apr 2002 01:48:08 +0000 Subject: [PATCH] A couple of minor changes for backward compatibility. [SVN r13324] --- historic/jam/src/jambase.c | 70 +++++++++++++++++++++++++++++++++----- jam_src/jambase.c | 70 +++++++++++++++++++++++++++++++++----- 2 files changed, 124 insertions(+), 16 deletions(-) diff --git a/historic/jam/src/jambase.c b/historic/jam/src/jambase.c index 30b6de83d..dbdf926f9 100644 --- a/historic/jam/src/jambase.c +++ b/historic/jam/src/jambase.c @@ -1,19 +1,73 @@ /* Generated by mkjambase from Jambase */ char *jambase[] = { /* Jambase */ -"if $(BOOST_ROOT)\n", +"if $(NT)\n", +"{\n", +"SLASH ?= \\\\ ;\n", +"}\n", +"SLASH ?= / ;\n", +"rule glob ( dirs * : patterns * )\n", +"{\n", +"return [ GLOB $(dirs:T) : $(dirs:T)\\\\$(SLASH)$(patterns) ] ;\n", +"}\n", +"rule find-to-root ( dir : patterns + )\n", +"{\n", +"local globs = [ glob $(dir) : $(patterns) ] ;\n", +"while ! $(globs) && $(dir:P) != $(dir)\n", +"{\n", +"dir = $(dir:P) ;\n", +"globs = [ glob $(dir) : $(patterns) ] ;\n", +"}\n", +"return $(globs) ;\n", +"}\n", +"rule boost-build ( dir ? )\n", +"{\n", +"if $(dir)\n", +"{\n", +"BOOST_BUILD_PATH = $(dir:R=$(file-location.boost-build.jam)) $(BOOST_BUILD_PATH) ;\n", +"}\n", +"local bootstrap-file =\n", +"[ glob $(BOOST_BUILD_PATH) : boost-build.jam ] ;\n", +"if ! $(bootstrap-file)\n", +"{\n", +"EXIT\n", +"\"Unable to load Boost.Build, could not find build system files.\"\n", +"\"Attempted search in these directories from BOOST_BUILD_PATH: \"$(BOOST_BUILD_PATH:J=\", \")\".\"\n", +"\"Please consult the documentation at 'http://www.boost.org'.\" ;\n", +"}\n", +"include $(bootstrap-file[1]) ;\n", +"}\n", +"rule record-file-location ( file : location )\n", +"{\n", +"file-location.$(file:G=) = $(location) ;\n", +"}\n", +"if [ MATCH .*(bjam).* : $(ARGV[1]:B:L) ]\n", +"|| $(BOOST_ROOT) # A temporary measure so Jam works with Boost.Build v1\n", "{\n", "BOOST_BUILD_PATH ?= $(BOOST_ROOT)/tools/build ;\n", -"}\n", -"if $(BOOST_BUILD_PATH)\n", +"local boost-build-file =\n", +"[ find-to-root [ PWD ] : boost-build.jam ]\n", +"[ glob $(BOOST_BUILD_PATH) : boost-build.jam ] ;\n", +"if ! $(boost-build-file)\n", "{\n", -"JAMBASE ?= boost-build.jam ;\n", +"EXIT\n", +"\"Unable to load Boost.Build, could not find 'boost-build.jam'.\"\n", +"\"Attempted search from\" [ PWD ] \"up to the root.\"\n", +"\"And in these directories from BOOST_BUILD_PATH: \"$(BOOST_BUILD_PATH:J=\", \")\".\"\n", +"\"Please consult the documentation at 'http://www.boost.org'.\" ;\n", "}\n", -"if $(JAMBASE)\n", +"BINDRULE on boost-base.jam = record-file-location ;\n", +"file-location.boost-build.jam = $(boost-build-file[1]:D) ;\n", +"include $(boost-build-file[1]) ;\n", +"if ! [ RULENAMES build-system ] && ! $(file-location.boost-base.jam)\n", "{\n", -"JAMBASE = $(JAMBASE:G=jam-module) ; # puts the Jambase target in a different\n", -"SEARCH on $(JAMBASE) = $(JAMBASE_PATH) $(BOOST_BUILD_PATH) ;\n", -"include $(JAMBASE) ;\n", +"EXIT\n", +"\"Unable to load Boost.Build, it seems that the build system files\"\n", +"\"where located, but the build system is not defined.\"\n", +"\"Attempted to use, as the bootstrap, this file:\"\n", +"$(file-location.boost-build.jam)$(SLASH)boost-build.jam.\n", +"\"Please consult the documentation at 'http://www.boost.org'.\" ;\n", +"}\n", "}\n", "else\n", "{\n", diff --git a/jam_src/jambase.c b/jam_src/jambase.c index 30b6de83d..dbdf926f9 100644 --- a/jam_src/jambase.c +++ b/jam_src/jambase.c @@ -1,19 +1,73 @@ /* Generated by mkjambase from Jambase */ char *jambase[] = { /* Jambase */ -"if $(BOOST_ROOT)\n", +"if $(NT)\n", +"{\n", +"SLASH ?= \\\\ ;\n", +"}\n", +"SLASH ?= / ;\n", +"rule glob ( dirs * : patterns * )\n", +"{\n", +"return [ GLOB $(dirs:T) : $(dirs:T)\\\\$(SLASH)$(patterns) ] ;\n", +"}\n", +"rule find-to-root ( dir : patterns + )\n", +"{\n", +"local globs = [ glob $(dir) : $(patterns) ] ;\n", +"while ! $(globs) && $(dir:P) != $(dir)\n", +"{\n", +"dir = $(dir:P) ;\n", +"globs = [ glob $(dir) : $(patterns) ] ;\n", +"}\n", +"return $(globs) ;\n", +"}\n", +"rule boost-build ( dir ? )\n", +"{\n", +"if $(dir)\n", +"{\n", +"BOOST_BUILD_PATH = $(dir:R=$(file-location.boost-build.jam)) $(BOOST_BUILD_PATH) ;\n", +"}\n", +"local bootstrap-file =\n", +"[ glob $(BOOST_BUILD_PATH) : boost-build.jam ] ;\n", +"if ! $(bootstrap-file)\n", +"{\n", +"EXIT\n", +"\"Unable to load Boost.Build, could not find build system files.\"\n", +"\"Attempted search in these directories from BOOST_BUILD_PATH: \"$(BOOST_BUILD_PATH:J=\", \")\".\"\n", +"\"Please consult the documentation at 'http://www.boost.org'.\" ;\n", +"}\n", +"include $(bootstrap-file[1]) ;\n", +"}\n", +"rule record-file-location ( file : location )\n", +"{\n", +"file-location.$(file:G=) = $(location) ;\n", +"}\n", +"if [ MATCH .*(bjam).* : $(ARGV[1]:B:L) ]\n", +"|| $(BOOST_ROOT) # A temporary measure so Jam works with Boost.Build v1\n", "{\n", "BOOST_BUILD_PATH ?= $(BOOST_ROOT)/tools/build ;\n", -"}\n", -"if $(BOOST_BUILD_PATH)\n", +"local boost-build-file =\n", +"[ find-to-root [ PWD ] : boost-build.jam ]\n", +"[ glob $(BOOST_BUILD_PATH) : boost-build.jam ] ;\n", +"if ! $(boost-build-file)\n", "{\n", -"JAMBASE ?= boost-build.jam ;\n", +"EXIT\n", +"\"Unable to load Boost.Build, could not find 'boost-build.jam'.\"\n", +"\"Attempted search from\" [ PWD ] \"up to the root.\"\n", +"\"And in these directories from BOOST_BUILD_PATH: \"$(BOOST_BUILD_PATH:J=\", \")\".\"\n", +"\"Please consult the documentation at 'http://www.boost.org'.\" ;\n", "}\n", -"if $(JAMBASE)\n", +"BINDRULE on boost-base.jam = record-file-location ;\n", +"file-location.boost-build.jam = $(boost-build-file[1]:D) ;\n", +"include $(boost-build-file[1]) ;\n", +"if ! [ RULENAMES build-system ] && ! $(file-location.boost-base.jam)\n", "{\n", -"JAMBASE = $(JAMBASE:G=jam-module) ; # puts the Jambase target in a different\n", -"SEARCH on $(JAMBASE) = $(JAMBASE_PATH) $(BOOST_BUILD_PATH) ;\n", -"include $(JAMBASE) ;\n", +"EXIT\n", +"\"Unable to load Boost.Build, it seems that the build system files\"\n", +"\"where located, but the build system is not defined.\"\n", +"\"Attempted to use, as the bootstrap, this file:\"\n", +"$(file-location.boost-build.jam)$(SLASH)boost-build.jam.\n", +"\"Please consult the documentation at 'http://www.boost.org'.\" ;\n", +"}\n", "}\n", "else\n", "{\n",