Right now, config doesn't work when either -b or -s is specified. It does work
when both or none are specified. Does anyone know what the correct behaviour
should be?
Here is a diff that would at least make this behaviour explicit (if correct,
OK?).
--
Cheers,
Jasper
"Capable, generous men do not create victims, they nurture them."
Index: config.8
===================================================================
RCS file: /cvs/src/usr.sbin/config/config.8,v
retrieving revision 1.54
diff -p -u -r1.54 config.8
--- config.8 10 Dec 2009 22:07:19 -0000 1.54
+++ config.8 5 Jan 2011 13:33:28 -0000
@@ -39,8 +39,7 @@
.Sh SYNOPSIS
.Nm config
.Op Fl p
-.Op Fl b Ar builddir
-.Op Fl s Ar srcdir
+.Op Fl b Ar builddir Fl s Ar srcdir
.Op Ar config-file
.Nm config
.Op Fl u
Index: main.c
===================================================================
RCS file: /cvs/src/usr.sbin/config/main.c,v
retrieving revision 1.41
diff -p -u -r1.41 main.c
--- main.c 27 Oct 2009 23:59:51 -0000 1.41
+++ main.c 5 Jan 2011 13:33:29 -0000
@@ -84,7 +84,7 @@ usage(void)
extern char *__progname;
fprintf(stderr,
- "usage: %s [-p] [-b builddir] [-s srcdir] [config-file]\n"
+ "usage: %s [-p] [-b builddir -s srcdir] [config-file]\n"
" %s [-u] [-f | -o outfile] -e infile\n",
__progname, __progname);
@@ -162,6 +162,12 @@ main(int argc, char *argv[])
argv += optind;
if (argc > 1 || (eflag && argv[0] == NULL))
usage();
+
+ if ((builddir && !srcdir) || (!builddir && srcdir)) {
+ fprintf(stderr, "config: both -b (builddir) and -s
(sourcedir)");
+ fprintf(stderr, " need to be specified\n");
+ usage();
+ }
if (eflag) {
#ifdef MAKE_BOOTSTRAP