From owner-freebsd-bugs Mon Oct 14 6:40: 6 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AC2337B401 for ; Mon, 14 Oct 2002 06:40:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9CE6C43EAC for ; Mon, 14 Oct 2002 06:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g9EDe2Co046534 for ; Mon, 14 Oct 2002 06:40:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g9EDe2Y5046533; Mon, 14 Oct 2002 06:40:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47BBA37B401 for ; Mon, 14 Oct 2002 06:37:49 -0700 (PDT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC22343EAC for ; Mon, 14 Oct 2002 06:37:48 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.6/8.12.6) with ESMTP id g9EDbm7R048852 for ; Mon, 14 Oct 2002 06:37:48 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.6/8.12.6/Submit) id g9EDbmwM048851; Mon, 14 Oct 2002 06:37:48 -0700 (PDT) Message-Id: <200210141337.g9EDbmwM048851@www.freebsd.org> Date: Mon, 14 Oct 2002 06:37:48 -0700 (PDT) From: Liu Kang To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/44053: make clean and make world or kernel should not be performanced concurrently. Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 44053 >Category: misc >Synopsis: make clean and make world or kernel should not be performanced concurrently. >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 14 06:40:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Liu Kang >Release: 4.7 >Organization: Beijing Polytechnic University >Environment: FreeBSD ftp.bjpu.edu.cn 4.7-STABLE FreeBSD 4.7-STABLE #13: Thu Oct 10 02:24:10 CST 2002 lazy@ftp.bjpu.edu.cn:/usr/obj/usr/src/sys/FTP i386 >Description: make clean and make world(kernel) should not be performanced at the same time. if so , make world would stop immediately. >How-To-Repeat: just run "make world" and "make clean" at the same time. >Fix: I changed the Makefile in /usr/src as follow: --- Makefile.orig Mon Oct 14 21:04:12 2002 +++ Makefile Mon Oct 14 21:05:37 2002 @@ -116,7 +116,7 @@ # # Handle the user-driven targets, using the source relative mk files. # -${TGTS} ${BITGTS}: upgrade_checks +${TGTS} ${BITGTS}: ifmaking upgrade_checks @cd ${.CURDIR}; \ ${MAKE} ${.TARGET} @@ -130,7 +130,7 @@ # Attempt to rebuild and reinstall *everything*, with reasonable chance of # success, regardless of how old your existing system is. # -world: upgrade_checks +world: ifmaking upgrade_checks @echo "--------------------------------------------------------------" @echo ">>> ${OBJFORMAT} make world started on ${STARTTIME}" @echo "--------------------------------------------------------------" @@ -154,6 +154,7 @@ @echo "--------------------------------------------------------------" @printf ">>> ${OBJFORMAT} make world completed on `LC_ALL=C date`\n (started ${STARTTIME})\n" @echo "--------------------------------------------------------------" + @rm /var/spool/lock/makeworld.lock # # kernel @@ -180,6 +181,20 @@ grep -q "Unknown modifier 'C'"; then \ make make; \ fi +# +# Perform a test to determine whether someone is running "make" in the source directory +# in order to prevent run "make " and "make clean" at the same time. +# +ifmaking: + @ if [ -f /var/spool/lock/makeworld.lock ]; then \ + echo "Please make sure you are the only one who run make at the time!"; \ + echo "If you think you get this message by mistake , delete /var/spool/lock/makeworld.lock manualy and run make again."; \ + kill $$PPID ;\ + else\ + touch /var/spool/lock/makeworld.lock;\ + fi + + # # A simple test target used as part of the test to see if make supports @@ -219,6 +234,6 @@ upgrade: aout-to-elf -${UPGRADE} : upgrade_checks +${UPGRADE} : ifmaking upgrade_checks @cd ${.CURDIR}; \ ${MAKE} -f Makefile.upgrade -m ${.CURDIR}/share/mk ${.TARGET} >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message