summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
committerPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
commite4da30858037b431880263676e8f90b1f8412a38 (patch)
tree2605109d089f52e373bd976391dca85774ae3b21 /remake.c
parent7595f38f62afa7ac3451018d865fb251e3ce91c3 (diff)
downloadgunmake-e4da30858037b431880263676e8f90b1f8412a38.tar.gz
Fix from Eli for incorrect value of $(MAKE) on Cygwin.
A few changes from char* to void* where appropriate, and removing of unnecessary casts. Much more work on const-ifying the codebase. This round involves some code changes to make it correct. NOTE!! There will almost certainly be problems on the non-POSIX ports that will need to be addressed after the const changes are finished: they will need to be const-ified properly and there may need to be some changes to allocate memory, etc. as well. The next (last?) big push for this, still to come, is const-ifying the filenames in struct file, struct dep, etc. This will allow us to store file names in the string cache and finally resolve Savannah bug #15182 (make uses too much memory), among other advantages.
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/remake.c b/remake.c
index 8d17ce7..ea6e555 100644
--- a/remake.c
+++ b/remake.c
@@ -921,12 +921,11 @@ notice_finished_file (struct file *file)
file->update_status = 0;
}
-/* Check whether another file (whose mtime is THIS_MTIME)
- needs updating on account of a dependency which is file FILE.
- If it does, store 1 in *MUST_MAKE_PTR.
- In the process, update any non-intermediate files
- that FILE depends on (including FILE itself).
- Return nonzero if any updating failed. */
+/* Check whether another file (whose mtime is THIS_MTIME) needs updating on
+ account of a dependency which is file FILE. If it does, store 1 in
+ *MUST_MAKE_PTR. In the process, update any non-intermediate files that
+ FILE depends on (including FILE itself). Return nonzero if any updating
+ failed. */
static int
check_dep (struct file *file, unsigned int depth,
@@ -940,8 +939,8 @@ check_dep (struct file *file, unsigned int depth,
if (file->phony || !file->intermediate)
{
- /* If this is a non-intermediate file, update it and record
- whether it is newer than THIS_MTIME. */
+ /* If this is a non-intermediate file, update it and record whether it
+ is newer than THIS_MTIME. */
FILE_TIMESTAMP mtime;
dep_status = update_file (file, depth);
check_renamed (file);
@@ -970,18 +969,18 @@ check_dep (struct file *file, unsigned int depth,
file->cmds = default_file->cmds;
}
- /* If the intermediate file actually exists
- and is newer, then we should remake from it. */
check_renamed (file);
mtime = file_mtime (file);
check_renamed (file);
if (mtime != NONEXISTENT_MTIME && mtime > this_mtime)
+ /* If the intermediate file actually exists and is newer, then we
+ should remake from it. */
*must_make_ptr = 1;
- /* Otherwise, update all non-intermediate files we depend on,
- if necessary, and see whether any of them is more
- recent than the file on whose behalf we are checking. */
else
{
+ /* Otherwise, update all non-intermediate files we depend on, if
+ necessary, and see whether any of them is more recent than the
+ file on whose behalf we are checking. */
struct dep *lastd;
lastd = 0;