bug-make
[Top][All Lists]
Advanced

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

variable $? not correctly set in double-colon rule


From: Unruh, Erwin
Subject: variable $? not correctly set in double-colon rule
Date: Mon, 23 Mar 2009 11:23:59 +0100

The following makefile does not work as expected.

# put this file into an empty directory, then run 
#       make prepare
#       make error
#
# I expected an
#       echo b
# but got a simple
#       echo
#
# I suspect the variable $? is not correctly expanded in a double-colon rule

.SUFFIXES:

dumnmy: 

error: double

double:: a
        echo $?

double:: b
        echo $?

a:

b:

prepare:
        rm -f b
        touch a
        sleep 1
        touch double

# "make -v" gives the following text:

GNU Make 3.81
Copyright (C) 2006  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.

This program built for x86_64-unknown-linux-gnu

--
Erwin Unruh
IP SW LP AD 2
Fujitsu Siemens Computers GmbH
Domagkstrasse 28
D-80807 M√ľnchen

Telefon:                +49 (0)89 3222 3825
Telefax:                +49 (0)89 3222 3802
Email:          mailto:address@hidden
Internet:               http://www.fujitsu-siemens.de
Firmenangaben:  http://www.fujitsu-siemens.de/imprint.html





reply via email to

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