Bug 35568 - make(1) declares target out of date, but $? is empty
Summary: make(1) declares target out of date, but $? is empty
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.5-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-05 21:50 UTC by Chaskiel Grundman
Modified: 2018-11-06 14:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chaskiel Grundman 2002-03-05 21:50:01 UTC
A makefile containing the following (this is not the complete makefile...)

all: ${TOP_LIBDIR}/libafsrpc.a

libafsrpc.a: ${LIBOBJS}
        $(RM) -f $@
        $(AR) crv $@ ${LIBOBJS}
        $(RANLIB) $@
        case "${SYS_NAME}" in \
            rs_aix*) \
                $(AR) crv $@ ../sys/afsl.exp;; \
        esac

${TOP_LIBDIR}/libafsrpc.a: libafsrpc.a
        ${INSTALL} $? $@

has the following behaavior if make is invoked when the library is up to date
(this is a subset of the make -d lmv output):

Examining libafsrpc.a...modified 15:22:39 Mar 05, 2002...library.../ modified 15:22:38 Mar 05, 2002...up-to-date.
Examining /usr/home/cg2v/openafs/lib/libafsrpc.a...modified 15:22:39 Mar 05, 2002...library.../ modified 15:22:38 Mar 05, 2002...out-of-date.
/usr/home/cg2v/openafs/lib/libafsrpc.a:> = libafsrpc.a
/usr/home/cg2v/openafs/lib/libafsrpc.a:? = 
/usr/home/cg2v/openafs/src/pinstall/pinstall  /usr/home/cg2v/openafs/lib/libafsrpc.a
Not enough file names
*** Error code 1

The obvious work around is to use $< or $> in the rule instead of $?, but that
isn't workable in this case since some older makes don't impliment those.

I can't be sure that nothing else changed, but I believe that this problem did
not affect my FreeBSD 4.4 system

How-To-Repeat:         I tried to produce a minimal makefile that triggered the problem, but
I was unable to come up with something simple that did not work. The actual
makefile that triggers the problem comes from openafs. A version that otherwise
compiles on freebsd is available here:

http://grand.central.org/dl/openafs/1.3.1/openafs-1.3.1-src.tar.bz2
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:45 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2018-02-02 21:18:44 UTC
Is this PR still relevant to modern make(1) utility?