On Wed, Jun 12, 2019 at 05:07:41PM -0400, anonymous wrote:
> 
> Problem: if a project has 300 C files and a single header that's included
> everywhere, and then someone changes 2 files: the header and any C file, most
> likely one wants to know whether the changes caused build errors. However,
> after executing `make`, in the worst case, the changed C file may get built
> after the 299 others, and fail the build.
...
>    $ touch empty1.c empty2.c header.h && echo "int main() {}" > main.c
...


Tell make which target you are interested in.

$ echo '#include "header.h"' |tee -a  *.c
$ touch header.h
$ make empty1.o
gcc -c empty1.c -o empty1.o
$


regards, Dmitry

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to