diff options
-rw-r--r-- | usr.bin/make/Makefile | 2 | ||||
-rw-r--r-- | usr.bin/make/main.c | 7 | ||||
-rw-r--r-- | usr.bin/make/make.1 | 5 |
3 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/make/Makefile b/usr.bin/make/Makefile index 208c2cc..4f46cae 100644 --- a/usr.bin/make/Makefile +++ b/usr.bin/make/Makefile @@ -15,7 +15,7 @@ SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \ NOSHARED?= YES -CFLAGS+=-DMAKE_VERSION=\"5200205240\" +CFLAGS+=-DMAKE_VERSION=\"5200208240\" main.o: ${MAKEFILE} diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 0028e15..f143975 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -167,12 +167,15 @@ MainParseArgs(argc, argv) 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) { + case 'C': + chdir(optarg); + break; case 'D': Var_Set(optarg, "1", VAR_GLOBAL); Var_Append(MAKEFLAGS, "-D", VAR_GLOBAL); diff --git a/usr.bin/make/make.1 b/usr.bin/make/make.1 index 85f83e1..b35649e 100644 --- a/usr.bin/make/make.1 +++ b/usr.bin/make/make.1 @@ -41,6 +41,7 @@ .Sh SYNOPSIS .Nm .Op Fl BPSXeiknqrstv +.Op Fl C Ar directory .Op Fl D Ar variable .Op Fl d Ar flags .Op Fl E Ar variable @@ -88,6 +89,10 @@ by executing the commands to make the sources of a dependency line in sequence. This is turned on by default unless .Fl j is used. +.It Fl C Ar directory +Change to +.Ar directory +while running. .It Fl D Ar variable Define .Ar variable |