Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make clean to just remove generated directories #269

Closed
mikebentley15 opened this issue May 28, 2019 · 0 comments · Fixed by #270
Closed

Make clean to just remove generated directories #269

mikebentley15 opened this issue May 28, 2019 · 0 comments · Fixed by #270
Assignees
Labels
documentation Involves touching documentation enhancement make Involves touching GNU Makefiles python Involves touching python code tests Involves touching tests

Comments

@mikebentley15
Copy link
Collaborator

Feature Request

Describe the new feature:
Right now, the generated Makefile will attempt to clean all object files and dependency files from the generated obj directory with the make clean target. However, when there are a lot of source files (e.g., more than 1,000), then this takes quite a long time, certainly longer than if we just deleted the directory along with all of its contents (i.e., rm -rf obj).

Suggested change:
Change the make clean target to remove the obj directory entirely instead of each object file individually.

We could potentially do the same for the results directory, but

  1. The size of the results directory is dependent on the compilation search space, not the size of the project. Therefore, it is unlikely to get unwieldy
  2. We also place results in that directory, not just the executables

We could, however, split out the executables into a separate directory, say runbuild and the results would still go into results. While we're at it, I think it would be good to remove the intermediate results that exist before being compared with the ground-truth. Suppose we put the runbuild executables in the runbuild/ directory, then when executed, they generate an output file in the results/ directory with suffix -out. Then when compared using gtrun, they would add the suffix _comparison.csv (or something like that). The clean target would then remove the runbuild/ directory and also any files ending in -out in results/.

Similar changes could be made to the clean targets of the bisect makefile.

Alternative approaches:
For the obj dir, we could instead delete all object files and dependency files with a find command

find obj -name \*.o -or -name \*.d -delete

but, this would add one more dependency on the system (not that find is uncommon). My guess is that rm -rf obj is much faster, and the user should probably not be putting anything in this directory anyway.

@mikebentley15 mikebentley15 self-assigned this May 29, 2019
@mikebentley15 mikebentley15 added documentation Involves touching documentation enhancement make Involves touching GNU Makefiles python Involves touching python code tests Involves touching tests labels May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Involves touching documentation enhancement make Involves touching GNU Makefiles python Involves touching python code tests Involves touching tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant