DragonFly BSD
DragonFly commits List (threaded) for 2004-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/gnu/usr.bin/gdb/gdb


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Fri, 19 Nov 2004 02:00:45 +0900

On Thu, Nov 18, 2004 at 05:26:25PM +0100, Simon 'corecode' Schubert wrote:
> On 18.11.2004, at 17:19, YONETANI Tomokazu wrote:
> >>>The question is, whether we can change .y.c rule in sys.mk to make 
> >>>it -jN
> >>>(as pointed out by Brad).
> >>We can't if YFLAGS include -d. Because our yacc has a slightly 
> >>surprising
> >>meaning of the -o option. It does set the name of the c-file and ALSO 
> >>alters
> >>the prefix for the headre file.
> >Ah.. yuck. What about this, then?
> >
> >-# XXX not -j safe
> >+# XXX hopefully -j safe..
> >.y.c:
> >-	${YACC} ${YFLAGS} ${.IMPSRC}
> >-	mv y.tab.c ${.TARGET}
> >+	${YACC} ${YFLAGS} -b $$$$ ${.IMPSRC}
> >+	mv $$$$.tab.c ${.TARGET}
> >+.if !empty(${YFLAGS:M-d})
> >+	mv $$$$.tab.h y.tab.h
> >+.endif
 
This didn't actually work, but the below should(still need tweaking):
. y.c:
	@echo "WARNING: using messy implicit rule..." 1>&2
. if !empty(YFLAGS:M-d)
	{ pid=$$$$; ${YACC} ${YFLAGS} -b $$pid ${.IMPSRC} && \
	mv $$pid.tab.c ${.TARGET} && \
	mv $$pid.tab.h ${.TARGET:S/.c/.h/}; }
. else
        ${YACC} ${YFLAGS} ${.IMPSRC}
. endif

> This is really evil. Don't we want to just kick this questionable 
> "portability"? We already broke much more legacy things...

Do we need to add a magic word to compile 3rd party codes that depend
on this rule?



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]