Hiding the removal of intermediate files using Make
I use intermediate files in my Makefile, however make prints out the 开发者_开发百科rm command that it uses to delete them all afterwards. How do I hide this print statement?
The make manual says that targets marked .SECONDARY will behave as .INTERMEDIATE but won't be automatically deleted. You could mark all the intermediate targets as secondary, and then remove the files yourself, something like
OBJECTS=foo.o bar.o
all:foo bar
@rm -f $(OBJECTS)
.SECONDARY: $(OBJECTS)
should do.
加载中,请稍侯......
精彩评论