bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make bug related to backquotes


From: Pierre B
Subject: Make bug related to backquotes
Date: Tue, 31 Aug 2004 17:01:09 -0400
User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)

The problem is with the backquote AND/OR addprefix.
The following makefile illustrates the bug.

Notice the doubled ././ in the test output.
Version information is in the output.

#
# Make file illustrates a problem with back quote
# by juxtaposing results with back quote and shell
#
#
nice_string:=$(shell ls *.tst)#

buggy_string:=`ls *.tst`#

cat_buggy:=foo ${buggy_string}#

cat_nice:=foo ${nice_string}#

test:
        -rm *.tst
        @ echo
        echo test1 >test1.tst
        echo test2 >test2.tst
        echo test3 >test3.tst
        @ echo
        @ echo xbeginx ${buggy_string} xendx string looks fine
        @ echo xbeginx ${nice_string} xendx string looks fine
        @ echo
        @ echo xbeginx $(addprefix ./,${buggy_string}) xendx mucked up
        @ echo xbeginx $(addprefix ./,${nice_string}) xendx NOT mucked
        @ echo
        @ echo xbeginx $(addprefix ./,${cat_buggy}) xendx mucked up
        @ echo xbeginx $(addprefix ./,${cat_nice}) xendx NOT mucked up
        @ echo
        @ date
        @ echo
        @ make --version
        @ echo
        @ uname -a
        @ echo
        @ sh --version
        @ echo
#
# End Makefile
#
# Results begin below
#####################

rm *.tst

echo test1 >test1.tst
echo test2 >test2.tst
echo test3 >test3.tst

xbeginx test1.tst test2.tst test3.tst xendx string looks fine
xbeginx test1.tst test2.tst test3.tst xendx string looks fine

xbeginx ././test1.tst ./test2.tst ./test3.tst xendx mucked it up
xbeginx ./test1.tst ./test2.tst ./test3.tst xendx NOT mucked up

xbeginx ./foo ././test1.tst ./test2.tst ./test3.tst xendx mucked up
xbeginx ./foo ./test1.tst ./test2.tst ./test3.tst xendx NOT mucked up

Tue Aug 31 15:50:37 EDT 2004

GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Linux alfalfa 2.6.3-1-386 #2 Tue Feb 24 20:20:23 EST 2004 i686 GNU/Linux

GNU bash, version 2.05b.0(1)-release (i386-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

##################
# end test results
##################




reply via email to

[Prev in Thread] Current Thread [Next in Thread]