misc/65142: fix bootstrap target in usr.bin/lex

Robert Millan rmh at debian.org
Sat Apr 3 15:10:20 PST 2004


>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:


More information about the freebsd-bugs mailing list