Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37533406
en ru br
Репозитории ALT
S:4.4.0-alt2
5.1: 3.81-alt5
4.1: 3.81-alt2
4.0: 3.81-alt2
3.0: 3.81beta3-alt4
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: make

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: make-3.82-cvs-01.patch
Скачать


2010-11-28  Paul Smith  <psmith@gnu.org>
	* read.c (record_target_var): Don't reset v if it's the same as
	the global version.  Fixes Savannah bug #31743.
--- a/doc/make.texi
+++ b/doc/make.texi
@@ -4295,10 +4295,10 @@ recipes, is propagated to the subsystem.@refill
 
 Variable values of the top-level @code{make} can be passed to the
 sub-@code{make} through the environment by explicit request.  These
-variables are defined in the sub-@code{make} as defaults, but do not
-override what is specified in the makefile used by the sub-@code{make}
-makefile unless you use the @samp{-e} switch (@pxref{Options Summary,
-,Summary of Options}).@refill
+variables are defined in the sub-@code{make} as defaults, but they do
+not override variables defined in the makefile used by
+the sub-@code{make} unless you use the @samp{-e} switch (@pxref{Options
+Summary, ,Summary of Options}).@refill
 
 To pass down, or @dfn{export}, a variable, @code{make} adds the
 variable and its value to the environment for running each line of the
--- a/read.c
+++ b/read.c
@@ -1802,7 +1802,8 @@ record_target_var (struct nameseq *filenames, char *defn,
           int len = strlen(v->name);
 
           gv = lookup_variable (v->name, len);
-          if (gv && (gv->origin == o_env_override || gv->origin == o_command))
+          if (gv && v != gv
+              && (gv->origin == o_env_override || gv->origin == o_command))
             {
               if (v->value != 0)
                 free (v->value);
--- a/tests/scripts/features/targetvars
+++ b/tests/scripts/features/targetvars
@@ -237,6 +237,16 @@ a: ; @echo "$(FOO)"
 
 run_make_test(undef, 'FOO=C', "C f1\n");
 
+# TEST #19: Conditional variables with command-line settings
+
+run_make_test('
+a: FOO ?= f1
+a: ; @echo "$(FOO)"
+',
+              '', "f1\n");
+
+run_make_test(undef, 'FOO=C', "C\n");
+
 # TEST #20: Check for continuation after semicolons
 
 run_make_test(q!
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin