Re: Make find(1) standalone - commit candidate

Bruce Evans <[email protected]>
Newsgroups gmane.os.freebsd.devel.audit
Message-ID <[email protected]>
On Wed, 20 Mar 2002 [email protected] wrote:

OK, except there are now (surprisingly, only) 3 clones of getdate.y
(the others are in tar and cvs), and the yacc stuff in the Makefile
is as bogus as before.

> Index: Makefile
> ===================================================================
> RCS file: /home/ncvs/src/usr.bin/find/Makefile,v
> retrieving revision 1.12
> diff -u -d -r1.12 Makefile
> --- Makefile	27 Feb 2002 17:57:00 -0000	1.12
> +++ Makefile	20 Mar 2002 09:36:58 -0000
> @@ -2,9 +2,7 @@
>  # $FreeBSD: src/usr.bin/find/Makefile,v 1.12 2002/02/27 17:57:00 dwmalone Exp $
>
>  PROG=	find
> -SRCS=	find.c function.c ls.c main.c misc.c operator.c option.c getdate.y
> -CLEANFILES+= getdate.c y.tab.h
> -CFLAGS+= -I${.CURDIR}/../../gnu/usr.bin/cvs/lib -DHAVE_CONFIG_H
> -.PATH:	${.CURDIR}/../../contrib/cvs/lib
> +SRCS=	find.c function.c ls.c main.c misc.c operator.c option.c parsedate.y
> +CLEANFILES+= parsedate.c y.tab.h
>
>  .include <bsd.prog.mk>

The CLEANFILES lines have many style bugs:
- use of "+=" for the first initialization of a variable.
- duplicate getdate.c/parsedate.c.  It is added automatically by bsd.prog.mk.
- bogus y.tab.h.  y.tab.h is not created, since it is not in SRCS.  getdate.h
  is created instead (and automatically put in CLEANFILES).

The (missing) YFLAGS line has a style bug.  The default YFLAGS is -d.  This
causes getdate.h to be created and removed, but getdate.h is not used.
YFLAGS should be set to <nothing> to prevent this garbage.

See tar/Makefile and cvs/lib/Makefile for correct handling of getdate.y.

Bruce


To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-audit" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.