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

Makefiles don't track file changes properly #2

Open
johnousterhout opened this issue Jul 7, 2017 · 0 comments
Open

Makefiles don't track file changes properly #2

johnousterhout opened this issue Jul 7, 2017 · 0 comments

Comments

@johnousterhout
Copy link
Member

The Makefile for ArachnePerfTest doesn't have enough dependencies to properly track changes to files. The problem is that it builds directly from a source file such as ArachneCreateTest.cc to the binary, such as ArachneCreateTest; there is no mention of the .o file in the Makefile. This causes a problem in the following scenario:

  • I modify a file in the Arachne library, and rebuild ArachnePerfTest.
  • I then copy in a replacement for ArachnePerfTest.cc, which has a modification time between that of the old version of the file and ArachnePerfTest (e.g., I made the change on a different machine, but forgot to sync the file over to my build machine before I did the first rebuild above).
  • Make won't rebuild ArachnePerfTest, because it has a creation time later than the new ArachnePerfTest.cc.

However, if you fleshed out the Makefile, so that ArachnePerfTest depends on ArachnePerfTest.o, which in turn depends on ArachnePerfTest.cc, then updating ArachnePerfTest.cc will result in a proper rebuild, since ArachnePerfTest.o will be out of date.

It's probably worth taking time to make "real" Makefiles for all of the modules, which have the proper Makefile structure.

-John-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant