Date: Thu, 11 Jun 1998 19:30:06 +1000 (EST) From: Ian Holland <ianh@tortuga.com.au> To: bde@zeta.org.au (Bruce Evans) Cc: current@FreeBSD.ORG Subject: Re: src Makefile fix Message-ID: <199806110930.TAA13726@frabjous.tortuga.com.au> In-Reply-To: <199806110824.SAA27517@godzilla.zeta.org.au> from Bruce Evans at "Jun 11, 98 06:24:25 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
As Bruce Evans enscribed:
>
> It would be better to make lex not depend on yacc -o (as it used to).
>
Perhaps a conditional dependence on "yacc -o". I'd like to be able to
build -current of 2.2.5, or whatever release I have installed on my main
machine. The included patch will require users of older systems to modify
/etc/make.conf, while letting the the newer system continue as now.
The problem is that it is ugly, and as time goes on, will become a barnacle
that needs to be removed.
All this assumes that
o being able to build -current from released versions is A Good Thing
o "yacc -o" is here to stay
ndex: bsd.dep.mk
===================================================================
RCS file: /home/freebsd/cvs/src/share/mk/bsd.dep.mk,v
retrieving revision 1.25
diff -c -r1.25 bsd.dep.mk
*** bsd.dep.mk 1998/06/05 18:38:54 1.25
--- bsd.dep.mk 1998/06/11 09:16:34
***************
*** 55,70 ****
SRCS:= ${SRCS} y.tab.h
CLEANFILES:= ${CLEANFILES} y.tab.c y.tab.h
.elif ${YFLAGS:M-d} != ""
.for _YH in ${_YC:S/.c/.h/}
.ORDER: ${_YC} ${_YH}
${_YC} ${_YH}: ${_YSRC}
! ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
SRCS:= ${SRCS} ${_YH}
CLEANFILES:= ${CLEANFILES} ${_YH}
.endfor
.else
${_YC}: ${_YSRC}
! ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
.endif
.endfor
.endfor
--- 55,78 ----
SRCS:= ${SRCS} y.tab.h
CLEANFILES:= ${CLEANFILES} y.tab.c y.tab.h
.elif ${YFLAGS:M-d} != ""
+ YACCOPY ?= no
+ .if ${YACCOPY} == no
+ _YO_OPT = -o ${_YC}
+ _YO_MV =
+ .else
+ _YO_OPT =
+ _YO_MV = mv y.tab.c ${_YC}
+ .endif
.for _YH in ${_YC:S/.c/.h/}
.ORDER: ${_YC} ${_YH}
${_YC} ${_YH}: ${_YSRC}
! ${YACC} ${YFLAGS} ${_YO_OPT} ${.ALLSRC}; ${_YO_MV}
SRCS:= ${SRCS} ${_YH}
CLEANFILES:= ${CLEANFILES} ${_YH}
.endfor
.else
${_YC}: ${_YSRC}
! ${YACC} ${YFLAGS} ${_YO_OPT} ${.ALLSRC}; ${_YO_MV}
.endif
.endfor
.endfor
--
Ian Holland In a world without fences,
ianh@tortuga.com.au Who needs Gates?
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806110930.TAA13726>
