bin/50981: make -C option does not work on 4.8-RELEASE

Yasufumi Susuki yasufumi at else.k.u-tokyo.ac.jp
Tue Apr 15 06:10:07 PDT 2003


>Number:         50981
>Category:       bin
>Synopsis:       make -C option does not work on 4.8-RELEASE
>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:   Tue Apr 15 06:10:04 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Yasufumi Susuki
>Release:        FreeBSD 4.8-RELEASE i386
>Organization:
The University of Tokyo
>Environment:
System: FreeBSD piano.else.k.u-tokyo.ac.jp 4.8-RELEASE FreeBSD 4.8-RELEASE #2: Sun Apr 6 19:53:33 JST 2003 root at piano.else.k.u-tokyo.ac.jp:/usr/obj/usr/src/sys/PIANO i386

>Description:
make -C option does not work on 4.8-RELEASE because the optstrings
argument of getopt(3) does not caontain `C:'.

>How-To-Repeat:
% make -C foo
make: illegal option -- C
usage: make [-Beiknqrstv] [-D variable] [-d flags] [-E variable] [-f makefile]
            [-I directory] [-j max_jobs] [-m directory] [-V variable]
            [variable=value] [target ...]

>Fix:

diff -ruN src.orig/usr.bin/make/main.c src/usr.bin/make/main.c
--- src.orig/usr.bin/make/main.c	Sun Apr  6 19:05:31 2003
+++ src/usr.bin/make/main.c	Tue Apr 15 21:32:21 2003
@@ -176,9 +176,9 @@
 
 	optind = 1;	/* since we're called more than once */
 #ifdef REMOTE
-# define OPTFLAGS "BD:E:I:L:PSV:Xd:ef:ij:km:nqrstv"
+# define OPTFLAGS "BC:D:E:I:L:PSV:Xd:ef:ij:km:nqrstv"
 #else
-# define OPTFLAGS "BD:E:I:PSV:Xd:ef:ij:km:nqrstv"
+# define OPTFLAGS "BC:D:E:I:PSV:Xd:ef:ij:km:nqrstv"
 #endif
 rearg:	while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
 		switch(c) {
@@ -1385,9 +1385,9 @@
 usage()
 {
 	(void)fprintf(stderr, "%s\n%s\n%s\n",
-"usage: make [-Beiknqrstv] [-D variable] [-d flags] [-E variable] [-f makefile]",
-"            [-I directory] [-j max_jobs] [-m directory] [-V variable]",
-"            [variable=value] [target ...]");
+"usage: make [-Beiknqrstv] [-C directory] [-D variable] [-d flags] [-E variable]",
+"            [-f makefile] [-I directory] [-j max_jobs] [-m directory]",
+"            [-V variable] [variable=value] [target ...]");
 	exit(2);
 }
 
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list