Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 May 2014 16:09:20 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Glen Barber <gjb@freebsd.org>
Cc:        svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org, David C Somayajulu <davidcs@freebsd.org>
Subject:   Re: svn commit: r265917 - in stable/10: share/man/man4 sys/dev/bce sys/dev/bxe sys/modules/bce
Message-ID:  <20140513153541.S3047@besplex.bde.org>
In-Reply-To: <20140512161817.GK1258@hub.FreeBSD.org>
References:  <201405121552.s4CFqnbX009177@svn.freebsd.org> <20140512161817.GK1258@hub.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 12 May 2014, Glen Barber wrote:

> On Mon, May 12, 2014 at 03:52:49PM +0000, David C Somayajulu wrote:
>> Log:
>>   MFC r265703
>>   Modify Copyright information and other strings to reflect
>>   Qlogic Corporation's purchase of Broadcom's NetXtreme business.
>>   Added clean option to Makefile
>>
>
>> Modified: stable/10/sys/modules/bce/Makefile
>> ==============================================================================
>> --- stable/10/sys/modules/bce/Makefile	Mon May 12 14:46:32 2014	(r265916)
>> +++ stable/10/sys/modules/bce/Makefile	Mon May 12 15:52:49 2014	(r265917)
>> @@ -5,4 +5,9 @@ SRCS=	opt_bce.h if_bce.c miibus_if.h mii
>>
>>  #CFLAGS += -DBCE_DEBUG=0
>>
>> +clean:
>> +	rm -f opt_bdg.h device_if.h bus_if.h pci_if.h export_syms
>> +	rm -f *.o *.kld *.ko
>> +	rm -f @ machine x86 miibus_if.h miidevs.h opt_bce.h
>> +
>>  .include <bsd.kmod.mk>
>
> Shouldn't these be listed in CLEANFILES ?

Most of them already do.  Most of them are automatically generated, and
a small part of this is to put automatically generated files in CLEANFILES.

The existence of the clean target is a larger bug.  It defeats the default
clean target which handles CLEANFILES and other things, but not all of
the above.  Some of them belong in the cleandir target.  That is not
defeated.

Before this commit, the clean target did:

% rm -f export_syms if_bce.ko if_bce.kld if_bce.o opt_bce.h miibus_if.h pci_if.h bus_if.h device_if.h miidevs.h

and the cleandir target did this plus:

% rm -f @ machine x86
% rm -f .depend GPATH GRTAGS GSYMS GTAGS
% if [ -L /usr/src/sys/modules/bce/obj ]; then rm -f /usr/src/sys/modules/bce/obj; fi

The new clean target does exactly the same as the old one plus a strict
subset of the cleandir target, except:
- it adds opt_budgerigar.h (sic), which apparently still is neither
   generated nor used by bce.
- it removes *.o, *.kld and *.ko instead of if_bce.ko if_bce.kld if_bce.o.
   The default rule is careful to avoid using wildcards so as to not remove
   anything not generated by the makefile.

Removing @, machine and x86 in clean instead of in cleandir is minor
breakage.  .depend and obj are still not removed in clean.  Handling
obj in a home made rule would be very difficult, since the obj dir
can be almost anywhere (and not named obj) and it might be a directory
instead of a symlink.

Bruce



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