Subject: misc/12832: Can't debug: cd /usr/src && make build
To: None <>
From: None <>
List: netbsd-bugs
Date: 05/04/2001 11:06:55
>Number:         12832
>Category:       misc
>Synopsis:       Can't debug: cd /usr/src && make build
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri May 04 11:07:00 PDT 2001
>Originator:     Andrew Cagney
>Release:        1.5 branch
NetBSD localhost 1.5U NetBSD 1.5U (NETLUX) #0: Tue Apr 24 10:56:24 EDT 2001     boor@localhost:/usr/src/trunk/sys/arch/macppc/compile/NETLUX macppc

Make build is barfing somewhere (things get sigseg's, files are being created in complete, ...) so I'm trying to track down the exact stage that things go wrong.

Unfortunatly, the /usr/src/Makefile:build: target looks like:

build: buildmsg beforeinstall
.if defined(FORCE_DOMESTIC)
        @echo '*** CAPUTE!'
        @echo '    The FORCE_DOMESTIC flag is not compatible with "make build".'
        @echo '    Please correct the problem and try again.'
.if ${MKSHARE} != "no"
        (cd ${.CURDIR}/share/mk && ${MAKE} install)
.if !defined(UPDATE) && !defined(NOCLEANDIR)
        ${MAKE} ${_J} ${_M} cleandir

and so on.  This makes it very difficult for someone to perform the build incrementally.

In left xterm, less /usr/src/Makefile

In right xterm, cut/past from left xterm to step through build.

No patch.

build: should be defined as a sequence of sub rules vis:

build: buildmsg beforeinstall do-force-domestic do-mkshare do-mkobjdirs ....

so that each can be run individually from the top level.