From owner-freebsd-bugs@FreeBSD.ORG Sun Jun 15 07:56:41 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0896E3B5 for ; Sun, 15 Jun 2014 07:56:41 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDD2C2BDB for ; Sun, 15 Jun 2014 07:56:40 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5F7ueha043881 for ; Sun, 15 Jun 2014 08:56:40 +0100 (BST) (envelope-from bz-noreply@freebsd.org) From: bz-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 191054] New: make clean/cleanobj does not clean as expected with bsd.progs.mk Date: Sun, 15 Jun 2014 07:56:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yaneurabeya@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 07:56:41 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191054 Bug ID: 191054 Summary: make clean/cleanobj does not clean as expected with bsd.progs.mk Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: misc Assignee: freebsd-bugs@FreeBSD.org Reporter: yaneurabeya@gmail.com When trying to isolate some issues with bsd.test.mk, I noticed that make clean/cleanobj was not cleaning as expected, in particular make clean does not clean any of the compiled programs, and make cleanobj only cleans out the last compiled program. If I run make cleandir, it napalms the heck out of the directory by deleting the bsd.dep.mk files 6 times (twice for cleandir, twice for cleanobj, twice for cleandepend) and the generated objects 2 times each (once each for cleanobj, once each for cleandir). I've provided an example below: % uname -a FreeBSD isilon-fuji-current.local 11.0-CURRENT FreeBSD 11.0-CURRENT #5 0d2be6b(isilon-atf): Sun Jun 8 21:34:32 PDT 2014 root@fuji-current.local:/usr/obj/usr/src/sys/FUJI i386 % cat * # Makefile FILESDIR=/tmp/share FILES= c BINDIR= /tmp/bin PROGS= a b MAN= .include /* a.c */ #include int main(void) { printf("hello world!\n"); return (0); } /* b.c */ #include int main(void) { printf("hello world!\n"); return (0); } /* c */ This directory contains a simple C app that says, "hello world!" % make obj /usr/obj/root/make_clean_broken_with_progs_dot_mk created for /root/make_clean_broken_with_progs_dot_mk % make depend (cd /root/make_clean_broken_with_progs_dot_mk && make -f /root/make_clean_broken_with_progs_dot_mk/Makefile _RECURSING_PROGS= SUBDIR= PROG=a depend) rm -f .depend.a mkdep -f .depend.a -a -std=gnu99 /root/make_clean_broken_with_progs_dot_mk/a.c echo a: /usr/lib/libc.a >> .depend.a (cd /root/make_clean_broken_with_progs_dot_mk && make -f /root/make_clean_broken_with_progs_dot_mk/Makefile _RECURSING_PROGS= SUBDIR= PROG=b depend) rm -f .depend.b mkdep -f .depend.b -a -std=gnu99 /root/make_clean_broken_with_progs_dot_mk/b.c echo b: /usr/lib/libc.a >> .depend.b % make all (cd /root/make_clean_broken_with_progs_dot_mk && make -f /root/make_clean_broken_with_progs_dot_mk/Makefile _RECURSING_PROGS= SUBDIR= PROG=a ) cc -O2 -pipe -std=gnu99 -fstack-protector -Qunused-arguments -c /root/make_clean_broken_with_progs_dot_mk/a.c cc -O2 -pipe -std=gnu99 -fstack-protector -Qunused-arguments -o a a.o (cd /root/make_clean_broken_with_progs_dot_mk && make -f /root/make_clean_broken_with_progs_dot_mk/Makefile _RECURSING_PROGS= SUBDIR= PROG=b ) cc -O2 -pipe -std=gnu99 -fstack-protector -Qunused-arguments -c /root/make_clean_broken_with_progs_dot_mk/b.c cc -O2 -pipe -std=gnu99 -fstack-protector -Qunused-arguments -o b b.o % make clean % make cleanobj (cd /root/make_clean_broken_with_progs_dot_mk && make -f /root/make_clean_broken_with_progs_dot_mk/Makefile _RECURSING_PROGS= SUBDIR= PROG=a cleanobj) (cd /root/make_clean_broken_with_progs_dot_mk && make -f /root/make_clean_broken_with_progs_dot_mk/Makefile _RECURSING_PROGS= SUBDIR= PROG=b cleanobj) rm -f b b.o rm -f .depend.b GPATH GRTAGS GSYMS GTAGS % make cleandir (cd /root/make_clean_broken_with_progs_dot_mk && make -f Makefile _RECURSING_PROGS= SUBDIR= PROG=a cleandepend) rm -f .depend.a GPATH GRTAGS GSYMS GTAGS (cd /root/make_clean_broken_with_progs_dot_mk && make -f Makefile _RECURSING_PROGS= SUBDIR= PROG=b cleandepend) rm -f .depend.b GPATH GRTAGS GSYMS GTAGS (cd /root/make_clean_broken_with_progs_dot_mk && make -f Makefile _RECURSING_PROGS= SUBDIR= PROG=a cleanobj) rm -f a a.o rm -f .depend.a GPATH GRTAGS GSYMS GTAGS (cd /root/make_clean_broken_with_progs_dot_mk && make -f Makefile _RECURSING_PROGS= SUBDIR= PROG=b cleanobj) rm -f b b.o rm -f .depend.b GPATH GRTAGS GSYMS GTAGS (cd /root/make_clean_broken_with_progs_dot_mk && make -f Makefile _RECURSING_PROGS= SUBDIR= PROG=a cleandir) rm -f a a.o rm -f .depend.a GPATH GRTAGS GSYMS GTAGS (cd /root/make_clean_broken_with_progs_dot_mk && make -f Makefile _RECURSING_PROGS= SUBDIR= PROG=b cleandir) rm -f b b.o rm -f .depend.b GPATH GRTAGS GSYMS GTAGS % Expected behavior: - make clean should clean all apps and generated files. - make cleanobj should just nuke ${.OBJDIR}; it shouldn't have to nuke the files under ${.OBJDIR} (bsd.obj.mk ensures that requirement is met for cleanobj). - make cleandir should does the same thing as cleanobj (why they're separate targets, I have no idea, but cleanobj isn't advertised in the docs though...). -- You are receiving this mail because: You are the assignee for the bug.