Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2002 14:19:54 -0400 (EDT)
From:      Chaskiel Grundman <cg2v@andrew.cmu.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/41908: make: $? not always set
Message-ID:  <200208221819.g7MIJsxH021252@yeltsin.andrew.cmu.edu>

next in thread | raw e-mail | index | archive | help

>Number:         41908
>Category:       bin
>Synopsis:       make: $? not always set
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 22 11:30:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Chaskiel Grundman
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:
System: FreeBSD yeltsin.andrew.cmu.edu 4.6-STABLE FreeBSD 4.6-STABLE #0: Tue Aug 20 09:48:10 EDT 2002 cg2v@yeltsin.andrew.cmu.edu:/usr/obj/usr/src/sys/MODERN2940 i386


	
>Description:
	if an archive's internal timestamp and file modtime are different
	make considers targets dependent on the archive to be out of date,
	but does not put the archive in $?
>How-To-Repeat:
	
with this makefile in an empty directory:
all: test2.a
test2.a: test.a
        install -c $? $@

test.a: t1.o 
        ar crv $@ t1.o 
        ranlib $@

t1.c: Makefile
        touch t1.c

breakit:
        touch test.a

run the following sequence:
make; make breakit; make; make

The last command (and any successive make invocations) will fail, and make -dm
produces output like the following:

Examining Makefile...modified 13:58:35 Aug 22, 2002...up-to-date.
Examining t1.c...modified 13:58:37 Aug 22, 2002...up-to-date.
Examining t1.o...modified 13:58:37 Aug 22, 2002...up-to-date.
Examining test.a...modified 13:58:41 Aug 22, 2002...library.../ modified 13:58:37 Aug 22, 2002...up-to-date.
Examining test2.a...modified 13:58:43 Aug 22, 2002...library.../ modified 13:58:37 Aug 22, 2002...out-of-date.
install -c  test2.a
usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 file2
       install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode]
               [-o owner] file1 ... fileN directory
       install -d [-v] [-g group] [-m mode] [-o owner] directory ...

In the peice of software I actually encountered this in, there is no "touch" 
involved, but somehow the 2 timestamps are a second apart.
>Fix:

	


>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208221819.g7MIJsxH021252>