mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Trivial initial version of makefile dependency info generation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17293 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5d254c2de8
commit
047138c485
1 changed files with 30 additions and 0 deletions
|
@ -360,6 +360,9 @@
|
||||||
element (or if that does not exist, immediately before the end
|
element (or if that does not exist, immediately before the end
|
||||||
of the <em>body</em> element) in the template.
|
of the <em>body</em> element) in the template.
|
||||||
</item>
|
</item>
|
||||||
|
<item><strong>MakeDependencies</strong>
|
||||||
|
A filename to be used to output dependency information for make
|
||||||
|
</item>
|
||||||
<item><strong>Project</strong>
|
<item><strong>Project</strong>
|
||||||
May be used to specify the name of this project ... determines the
|
May be used to specify the name of this project ... determines the
|
||||||
name of the index reference file produced as part of the documentation
|
name of the index reference file produced as part of the documentation
|
||||||
|
@ -1726,6 +1729,33 @@ main(int argc, char **argv, char **env)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ([defs stringForKey: @"MakeDependencies"] != nil)
|
||||||
|
{
|
||||||
|
NSString *stamp = [defs stringForKey: @"MakeDependencies"];
|
||||||
|
NSMutableSet *mset = [NSMutableSet setWithCapacity: 128];
|
||||||
|
NSDictionary *files = [[projectRefs refs] objectForKey: @"source"];
|
||||||
|
NSEnumerator *enumerator = [files keyEnumerator];
|
||||||
|
NSString *file;
|
||||||
|
NSMutableString *depend;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Build set of all header and source files used in project.
|
||||||
|
*/
|
||||||
|
while ((file = [enumerator nextObject]) != nil)
|
||||||
|
{
|
||||||
|
[mset addObject: file];
|
||||||
|
[mset addObjectsFromArray: [files objectForKey: file]];
|
||||||
|
}
|
||||||
|
|
||||||
|
enumerator = [mset objectEnumerator];
|
||||||
|
depend = [NSMutableString stringWithFormat: @"%@:", stamp];
|
||||||
|
while ((file = [enumerator nextObject]) != nil)
|
||||||
|
{
|
||||||
|
[depend appendFormat: @" \\\n\t%@", file];
|
||||||
|
}
|
||||||
|
|
||||||
|
[depend writeToFile: stamp atomically: YES];
|
||||||
|
}
|
||||||
RELEASE(outer);
|
RELEASE(outer);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue