Here are a list of the improvements done to the Makefile.
allow tests to be built and run individually from the command-line:
Examples of building individual tests:
make bin/test1
make bin/test2
...
Running individual tests:
make test1
make test2
make test_compile
make test_rand
make test_rand_neg
# note: you can still run all the tests with
make test
Because building and running the tests are now in their own rules, the user can run them in parallel:
Build everything in parallel with 5 threads:
make -j5
Build and run everything with 5 threads:
make -j5 test
Moved all outputs to the "bin" directory
This simplifies the code in the "clean" target to 1 command. It also simplifies the .gitignore file and makes it easy for developers to distinguish between output files and source files.
This also means we don't need an odd rule in .gitignore that means new files in test will be ignored by default, which means if a new file is added to test then the programmer must run git add -f test/file and git status also doesn't notify them if they forgot to do this.
Added re.c as a dependency to all the tests
Now if the user modifies re.c, all the tests will see that they need to be rebuilt.
Here are a list of the improvements done to the Makefile.
Examples of building individual tests:
Running individual tests:
Build everything in parallel with 5 threads:
Build and run everything with 5 threads:
This simplifies the code in the "clean" target to 1 command. It also simplifies the .gitignore file and makes it easy for developers to distinguish between output files and source files.
This also means we don't need an odd rule in .gitignore that means new files in
test
will be ignored by default, which means if a new file is added to test then the programmer must rungit add -f test/file
and git status also doesn't notify them if they forgot to do this.Now if the user modifies re.c, all the tests will see that they need to be rebuilt.