summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2005-04-03 13:07:33 (UTC)
committer Michael Krelin <hacker@klever.net>2005-04-03 13:07:33 (UTC)
commit197174ead5e273bd0c8684d92752e1e8599d6656 (patch) (unidiff)
tree7f464c0fd17593e723b13766307c54ceb0ee326f
parentf2ddc6833252f106cf9aa589bc13216ba25ee4e6 (diff)
downloadsitecing-197174ead5e273bd0c8684d92752e1e8599d6656.zip
sitecing-197174ead5e273bd0c8684d92752e1e8599d6656.tar.gz
sitecing-197174ead5e273bd0c8684d92752e1e8599d6656.tar.bz2
yet another fix to handling dependencies
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--include/sitecing/component_factory.h4
-rw-r--r--lib/component_factory.cc25
2 files changed, 25 insertions, 4 deletions
diff --git a/include/sitecing/component_factory.h b/include/sitecing/component_factory.h
index a208ed1..9ddf70d 100644
--- a/include/sitecing/component_factory.h
+++ b/include/sitecing/component_factory.h
@@ -56,2 +56,6 @@ namespace sitecing {
56 virtual void build(const string& dst); 56 virtual void build(const string& dst);
57 /**
58 * @overload file_factory::make()
59 */
60 virtual void make(const string& dst);
57 61
diff --git a/lib/component_factory.cc b/lib/component_factory.cc
index 5c18bb7..b5e95af 100644
--- a/lib/component_factory.cc
+++ b/lib/component_factory.cc
@@ -117,3 +117,2 @@ namespace sitecing {
117 string dp = normalize_path(dst,strip_trailing_slash); 117 string dp = normalize_path(dst,strip_trailing_slash);
118 // XXX: or just compare it off, instead of throwing things around.
119 try { 118 try {
@@ -129,2 +128,3 @@ namespace sitecing {
129 }catch(utility_no_prefix& unp) { } 128 }catch(utility_no_prefix& unp) { }
129 // XXX: or just compare it off, instead of throwing things around.
130 try { 130 try {
@@ -149,2 +149,3 @@ namespace sitecing {
149 string o = root_intermediate+noro+".o"; 149 string o = root_intermediate+noro+".o";
150 cerr << "Linking " << noro << endl;
150 if(access(o.c_str(),R_OK)) 151 if(access(o.c_str(),R_OK))
@@ -193,2 +194,3 @@ namespace sitecing {
193 string o = root_intermediate+nos+".o"; 194 string o = root_intermediate+nos+".o";
195 cerr << "Compiling " << nos << endl;
194 if(access(cc.c_str(),R_OK)) 196 if(access(cc.c_str(),R_OK))
@@ -232,2 +234,3 @@ namespace sitecing {
232 string src = root_source+nos; 234 string src = root_source+nos;
235 cerr << "Preprocessing " << nos << endl;
233 if(access(src.c_str(),R_OK)) 236 if(access(src.c_str(),R_OK))
@@ -266,5 +269,19 @@ namespace sitecing {
266 269
270 void component_factory::make(const string& dst) {
271 string dp = normalize_path(dst,strip_trailing_slash);
272 try {
273 string noso = strip_suffix(dp,".so");
274 string noro = strip_prefix(noso,root_so);
275 file_list_t a;
276 get_ancestors(noro,a);
277 for(file_list_t::const_iterator i=a.begin();i!=a.end();++i) {
278 make(root_so+*i+".so");
279 }
280 }catch(utility_no_affix& una) { }
281 file_factory::make(dst);
282 }
283
267 int component_factory::execute(const string& cmd, const list<string>& args,int stdo,int stde) { 284 int component_factory::execute(const string& cmd, const list<string>& args,int stdo,int stde) {
268 // XXX: is it right that we do stdio/stderr tricks outside of the function? 285 // XXX: is it right that we do stdio/stderr tricks outside of the function?
269 cerr << "executing: " << cmd; 286 // cerr << "executing: " << cmd;
270 vector<const char*> argv(args.size()+2); 287 vector<const char*> argv(args.size()+2);
@@ -273,6 +290,6 @@ namespace sitecing {
273 for(list<string>::const_iterator i=args.begin();i!=args.end();i++) { 290 for(list<string>::const_iterator i=args.begin();i!=args.end();i++) {
274 cerr << " " << *i ; 291 // cerr << " " << *i ;
275 argv[an++] = i->c_str(); 292 argv[an++] = i->c_str();
276 } 293 }
277 cerr << endl; 294 // cerr << endl;
278 argv[an++]=NULL; 295 argv[an++]=NULL;