[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Moving Target in the Makefile
From: |
Chen, Shihong |
Subject: |
RE: Moving Target in the Makefile |
Date: |
Tue, 7 Nov 2000 19:10:42 -0500 |
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:address@hidden
Sent: Tuesday, November 07, 2000 5:28 PM
To: Chen, Shihong
Cc: address@hidden
Subject: Re: Moving Target in the Makefile
%% "Chen, Shihong" <address@hidden> 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 <address@hidden> 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