Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Apr 2004 15:03:48 -0800 (PST)
From:      Robert Millan <rmh@debian.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/65142: fix bootstrap target in usr.bin/lex
Message-ID:  <200404032303.i33N3mng023031@www.freebsd.org>
Resent-Message-ID: <200404032310.i33NAJkG068955@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         65142
>Category:       misc
>Synopsis:       fix bootstrap target in usr.bin/lex
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 03 15:10:19 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Robert Millan
>Release:        5.2.1+20040403
>Organization:
Debian
>Environment:
>Description:
The bootstrap target in src/usr.bin/lex/Makefile (meant to build lex on a lex-less system) is broken. It generates scan.c but not parse.h which is also needed.
>How-To-Repeat:
Remove (or rename) /usr/bin/lex and, in src/usr.bin/lex, try:
  make bootstrap ; make

>Fix:

Copy the dynamicaly generated parse.h into initparse.h, then apply this to Makefile:

diff -Nur src/usr.bin/lex.old/Makefile src/usr.bin/lex/Makefile
--- src/usr.bin/lex.old/Makefile        2002-05-12 18:00:44.000000000 +0200
+++ src/usr.bin/lex/Makefile    2004-02-17 21:14:26.000000000 +0100
@@ -31,11 +31,13 @@
 skel.c: mkskel.sh flex.skl
        sh ${.CURDIR}/mkskel.sh ${.CURDIR}/flex.skl > skel.c
                                                                                
-bootstrap: initscan.c
+bootstrap: initscan.c initparse.h
        @cmp -s ${.CURDIR}/initscan.c scan.c || { \
                echo "Bootstrapping flex" ; \
                rm -f scan.c ; \
                cp -f ${.CURDIR}/initscan.c scan.c ; \
+               rm -f parse.h ; \
+               cp -f ${.CURDIR}/initparse.h parse.h ; \
        }
                                                                                
 test: check

>Release-Note:
>Audit-Trail:
>Unformatted:



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