Paul,
Thanks for your information.
But we have twenty files separated in ten source directories needed to be
copied to export include directory. And it is very hard to write all those
files in the dependency rules. Is that possible not having the condition
testing for the file comparison, only having single command to compare it
first then override?
Thanks,
Shihong
-----Original Message-----
From: Paul D. Smith [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 07, 2000 5:28 PM
To: Chen, Shihong
Cc: [EMAIL PROTECTED]
Subject: Re: Moving Target in the Makefile
%% "Chen, Shihong" <[EMAIL PROTECTED]> writes:
cs> The final action of our makefile is to have the executables and
cs> header files moved to the build directory using INSTALL, which
cs> will always override the previous one even there is no change. Is
cs> that a single command to do it more intelligently? Basically, the
cs> file difference will be checked first before the copying, so the
cs> previous timestamp will be kept if there is no change with the
cs> former build.
If what you're describing here is what you _want_ to happen, you can
easily do this with a command something like this:
cmp -s $@ $< && $(INSTALL) $@ ...
Is that what you're looking for?
--
----------------------------------------------------------------------------
---
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make