From andre.albsmeier@mchp.siemens.de  Mon Feb  5 06:06:33 2001
Return-Path: <andre.albsmeier@mchp.siemens.de>
Received: from david.siemens.de (david.siemens.de [192.35.17.14])
	by hub.freebsd.org (Postfix) with ESMTP id C8C2E37B491
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  5 Feb 2001 06:06:32 -0800 (PST)
Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14])
	by david.siemens.de (8.11.0/8.11.0) with ESMTP id f15E6Uu23748
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 5 Feb 2001 15:06:31 +0100 (MET)
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7])
	by mail3.siemens.de (8.11.1/8.11.1) with ESMTP id f15E6U723214420
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 5 Feb 2001 15:06:30 +0100 (MET)
Received: (from localhost)
	by curry.mchp.siemens.de (8.11.1/8.11.1) id f15E6U894328
	for FreeBSD-gnats-submit@freebsd.org; Mon, 5 Feb 2001 15:06:30 +0100 (CET)
Message-Id: <200102051406.f15E6UU02816@curry.mchp.siemens.de>
Date: Mon, 5 Feb 2001 15:06:30 +0100 (CET)
From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: PATCH to fix kernel build if path to sources contain a dash
X-Send-Pr-Version: 3.2

>Number:         24868
>Category:       kern
>Synopsis:       PATCH to fix kernel build if path to sources contain a dash
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 05 06:10:00 PST 2001
>Closed-Date:    Mon Feb 5 15:06:28 PST 2001
>Last-Modified:  Mon Feb 05 15:07:12 PST 2001
>Originator:     Andre Albsmeier
>Release:        FreeBSD 4.2-STABLE i386
>Organization:
>Environment:

4.2-STABLE since the import of Cameron's new sound code.

>Description:

When building a kernel the /sys/kern/makeops.pl script is called to
build .c and .h files from .m files. This fails if the path to
the source tree contains a dash (-).
The makeops.pl fails since it thinks that all input files are options
because the regex matches the dash:

andre@bali:/tmp/bla>perl5 /src/src-4/sys/kern/makeops.pl -h /src/src-4/sys/kern/device_if.m
andre@bali:/tmp/bla>ls -l
andre@bali:/tmp/bla>

>How-To-Repeat:

Put your sources into /src/src-4 and make /usr/src a symlink to it.
Build a kernel.

>Fix:

IMHO it is sufficient to change the regex to match only dashes
that are at the beginning of the argument:

--- sys/kern/makeops.pl.ORI	Mon Feb  5 14:55:51 2001
+++ sys/kern/makeops.pl	Mon Feb  5 14:55:59 2001
@@ -36,7 +36,7 @@
 # Process the command line
 #
 while ( $arg = shift @ARGV ) {
-   if ( $arg =~ m/-.*/ ) {
+   if ( $arg =~ m/^-.*/ ) {
       push @args, $arg;
    } elsif ( $arg =~ m/\.m$/ ) {
       push @filenames, $arg;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dirk 
State-Changed-When: Mon Feb 5 15:06:28 PST 2001 
State-Changed-Why:  
Patch committed. Thanks! 

(Dankeschoen 8-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24868 
>Unformatted:
