-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fixed 47 missing dependencies and 51 excessive dependencies in Makefile #1522
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
Conversation
|
@vemakereporter After doing a make and make clean, there are still |
|
For tracking purposes, this is a follow-up to PR #1521 to the |
test and suite/fuzz have their separate Makefiles. I include a removal command in their clean targets too. |
suite/fuzz/Makefile
Outdated
|
|
||
| clean: | ||
| rm -rf fuzz_harness $(OBJS) $(PLATFORMDECODE) $(REPRODUCERMC) $(REPRODUCERBIN) $(FUZZERBIN) $(OBJDIR)/lib$(LIBNAME).* $(OBJDIR)/$(LIBNAME).* | ||
| rm -rf *.d $(OBJDIR)/*.d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you want the '-r' day here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right
tests/Makefile
Outdated
|
|
||
| clean: | ||
| rm -rf $(OBJS) $(BINARY) $(TESTDIR)/*.exe $(TESTDIR)/*.static $(OBJDIR)/lib$(LIBNAME).* $(OBJDIR)/$(LIBNAME).* | ||
| rm -rf *.d $(TESTDIR)/*.d $(OBJDIR)/*.d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right.
cstool/Makefile
Outdated
|
|
||
| clean: | ||
| ${RM} -rf *.o $(TARGET) | ||
| ${RM} -rf *.d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no more .o files?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it just creates .d files aside to the .o files.
|
cool, just 1 minor issue now: we have a conflict in Makefile, so i cannot merge. could you please fix it? |
Conflict resolved. |
|
merged, thanks! |
Hi, I've fixed 47 missing dependencies and 51 excessive dependencies reported.
Those issues can cause incorrect results or unnecessary rebuilds when capstone is incrementally built.
For example, any changes in "arch/AArch64/AArch64BaseInfo.h" will not cause "arch/AArch64/AArch64BaseInfo.o" to be rebuilt, which is incorrect.
"MCInstrDesc.h" is specified as the prerequisite of "arch/Mips/MipsDisassembler.o". However, this header file is not read by the process when "arch/Mips/MipsDisassembler.o" is built. Hence, the changes in "MCInstrDesc.h" can cause an unnecessary rebuild of "arch/Mips/MipsDisassembler.o", which slow down the build of the whole project.
A useful tool is the -M class of flags that we can pass to clang/gcc to generate "dependency files". Even if we don't use the flag directly in the Makefile, a script that we use could take advantage of the feature.
I modify the Makefile to read dependencies from compiler-generated files. I've checked. The dependences generate from the new Makefile are correct.
Looking forward to your confirmation.
Thanks
Vemake