On Sun, Oct 16, 2016 at 11:52:45AM +0200, Martin Natano wrote:
> We don't need to re-run 'make obj' when obj exists. Ok?
>
> natano
>
>
> Index: main.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/config/main.c,v
> retrieving revision 1.55
> diff -u -p -r1.55 main.c
> --- main.c 16 Oct 2016 09:36:46 -0000 1.55
> +++ main.c 16 Oct 2016 09:46:55 -0000
> @@ -703,9 +703,9 @@ setupdirs(void)
> }
> fclose(fp);
>
> -reconfig:
> if (system("make obj") != 0)
> exit(2);
> +reconfig:
> if (system("make config") != 0)
> exit(2);
> exit(0);
You could even tail-recurse directly ?
execlp("make", "make", "config", NULL);
exit(2);
will do the same thing with less processes (unless you care about "2"
as an error code).