ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scotte Zinn" <>
Subject [PATCH] Replace task only touches file if there is a change to be made
Date Mon, 11 Sep 2000 10:22:27 GMT
I currently have two projects, one stable (but uses the replace task to
alter the source code in one of the files) and the second is work in
progress and depends on the stable library.

Whenever I build the second project, the first one always gets built too
since the replace task touches one of the source files, even though there
were no actual changes to be made to the source file for the replace task.

Here is a patch to the replace task.  It only replaces the source file with
the new file if the token was actually found in the source file.  That is,
if it can't find the file, it doesn't alter the file, and therefore, doesn't
touch the timestamp and force a needless re-compile of the stable library.

-- Scotte

View raw message