diff --git a/historic/jam/src/build.bat b/historic/jam/src/build.bat index 8579cf50f..17d6a7bab 100644 --- a/historic/jam/src/build.bat +++ b/historic/jam/src/build.bat @@ -319,7 +319,8 @@ set BJAM_SOURCES=%BJAM_SOURCES% hdrmacro.c headers.c jam.c jambase.c jamgram.c l set BJAM_SOURCES=%BJAM_SOURCES% newstr.c option.c parse.c pathunix.c pathvms.c regexp.c set BJAM_SOURCES=%BJAM_SOURCES% rules.c scan.c search.c subst.c timestamp.c variable.c modules.c set BJAM_SOURCES=%BJAM_SOURCES% strings.c filesys.c builtins.c pwd.c class.c w32_getreg.c native.c -set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c +set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c +set BJAM_SOURCES=%BJAM_SOURCES% modules/property-set.c @echo ON rd /S /Q bootstrap.%BOOST_JAM_TOOLSET% diff --git a/historic/jam/src/build.jam b/historic/jam/src/build.jam index 8176c5500..29e70c470 100644 --- a/historic/jam/src/build.jam +++ b/historic/jam/src/build.jam @@ -276,7 +276,7 @@ jam.source = scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c modules/set.c - modules/path.c modules/regex.c + modules/path.c modules/regex.c modules/property-set.c ; if $(NT) { diff --git a/historic/jam/src/build.sh b/historic/jam/src/build.sh index 78f6ca0e8..dcd4a20ba 100644 --- a/historic/jam/src/build.sh +++ b/historic/jam/src/build.sh @@ -192,7 +192,7 @@ BJAM_SOURCES="\ newstr.c option.c parse.c pathunix.c pathvms.c regexp.c\ rules.c scan.c search.c subst.c timestamp.c variable.c modules.c\ strings.c filesys.c builtins.c pwd.c class.c native.c modules/set.c\ - modules/path.c modules/regex.c" + modules/path.c modules/regex.c modules/property-set.c" echo_run rm -rf bootstrap.$BOOST_JAM_TOOLSET echo_run mkdir bootstrap.$BOOST_JAM_TOOLSET diff --git a/historic/jam/src/builtins.c b/historic/jam/src/builtins.c index e269b0647..cc5c05c4e 100644 --- a/historic/jam/src/builtins.c +++ b/historic/jam/src/builtins.c @@ -275,6 +275,7 @@ load_builtins() init_set(); init_path(); init_regex(); + init_property_set(); } /* diff --git a/historic/jam/src/lists.c b/historic/jam/src/lists.c index cc22da7e3..2b527c396 100644 --- a/historic/jam/src/lists.c +++ b/historic/jam/src/lists.c @@ -283,6 +283,23 @@ list_in(LIST* l, char* value) return 0; } +LIST * +list_unique( LIST *sorted_list) +{ + LIST* result = 0; + LIST* last_added = 0; + + for(; sorted_list; sorted_list = sorted_list->next) + { + if (!last_added || strcmp(sorted_list->string, last_added->string) != 0) + { + result = list_new(result, sorted_list->string); + last_added = sorted_list; + } + } + return result; +} + /* * lol_init() - initialize a LOL (list of lists) diff --git a/historic/jam/src/lists.h b/historic/jam/src/lists.h index fb1d9752c..1d75426be 100644 --- a/historic/jam/src/lists.h +++ b/historic/jam/src/lists.h @@ -81,6 +81,7 @@ int list_length( LIST *l ); LIST * list_sublist( LIST *l, int start, int count ); LIST * list_pop_front( LIST *l ); LIST * list_sort( LIST *l); +LIST * list_unique( LIST *sorted_list); int list_in(LIST* l, char* value); # define list_next( l ) ((l)->next) diff --git a/jam_src/build.bat b/jam_src/build.bat index 8579cf50f..17d6a7bab 100644 --- a/jam_src/build.bat +++ b/jam_src/build.bat @@ -319,7 +319,8 @@ set BJAM_SOURCES=%BJAM_SOURCES% hdrmacro.c headers.c jam.c jambase.c jamgram.c l set BJAM_SOURCES=%BJAM_SOURCES% newstr.c option.c parse.c pathunix.c pathvms.c regexp.c set BJAM_SOURCES=%BJAM_SOURCES% rules.c scan.c search.c subst.c timestamp.c variable.c modules.c set BJAM_SOURCES=%BJAM_SOURCES% strings.c filesys.c builtins.c pwd.c class.c w32_getreg.c native.c -set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c +set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c +set BJAM_SOURCES=%BJAM_SOURCES% modules/property-set.c @echo ON rd /S /Q bootstrap.%BOOST_JAM_TOOLSET% diff --git a/jam_src/build.jam b/jam_src/build.jam index 8176c5500..29e70c470 100644 --- a/jam_src/build.jam +++ b/jam_src/build.jam @@ -276,7 +276,7 @@ jam.source = scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c modules/set.c - modules/path.c modules/regex.c + modules/path.c modules/regex.c modules/property-set.c ; if $(NT) { diff --git a/jam_src/build.sh b/jam_src/build.sh index 78f6ca0e8..dcd4a20ba 100644 --- a/jam_src/build.sh +++ b/jam_src/build.sh @@ -192,7 +192,7 @@ BJAM_SOURCES="\ newstr.c option.c parse.c pathunix.c pathvms.c regexp.c\ rules.c scan.c search.c subst.c timestamp.c variable.c modules.c\ strings.c filesys.c builtins.c pwd.c class.c native.c modules/set.c\ - modules/path.c modules/regex.c" + modules/path.c modules/regex.c modules/property-set.c" echo_run rm -rf bootstrap.$BOOST_JAM_TOOLSET echo_run mkdir bootstrap.$BOOST_JAM_TOOLSET diff --git a/jam_src/builtins.c b/jam_src/builtins.c index e269b0647..cc5c05c4e 100644 --- a/jam_src/builtins.c +++ b/jam_src/builtins.c @@ -275,6 +275,7 @@ load_builtins() init_set(); init_path(); init_regex(); + init_property_set(); } /* diff --git a/jam_src/lists.c b/jam_src/lists.c index cc22da7e3..2b527c396 100644 --- a/jam_src/lists.c +++ b/jam_src/lists.c @@ -283,6 +283,23 @@ list_in(LIST* l, char* value) return 0; } +LIST * +list_unique( LIST *sorted_list) +{ + LIST* result = 0; + LIST* last_added = 0; + + for(; sorted_list; sorted_list = sorted_list->next) + { + if (!last_added || strcmp(sorted_list->string, last_added->string) != 0) + { + result = list_new(result, sorted_list->string); + last_added = sorted_list; + } + } + return result; +} + /* * lol_init() - initialize a LOL (list of lists) diff --git a/jam_src/lists.h b/jam_src/lists.h index fb1d9752c..1d75426be 100644 --- a/jam_src/lists.h +++ b/jam_src/lists.h @@ -81,6 +81,7 @@ int list_length( LIST *l ); LIST * list_sublist( LIST *l, int start, int count ); LIST * list_pop_front( LIST *l ); LIST * list_sort( LIST *l); +LIST * list_unique( LIST *sorted_list); int list_in(LIST* l, char* value); # define list_next( l ) ((l)->next) diff --git a/v2/build/property-set.jam b/v2/build/property-set.jam index 09f80d316..58440534f 100644 --- a/v2/build/property-set.jam +++ b/v2/build/property-set.jam @@ -248,6 +248,7 @@ rule create ( raw-properties * ) } return $(.ps.$(key)) ; } +NATIVE_RULE property-set : create ; # Creates new 'property-set' instances after checking # that all properties are valid and converting incidental