[Assorted-commits] SF.net SVN: assorted: [497] simple-build/trunk/src
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-24 20:47:52
|
Revision: 497 http://assorted.svn.sourceforge.net/assorted/?rev=497&view=rev Author: yangzhang Date: 2008-02-24 12:47:57 -0800 (Sun, 24 Feb 2008) Log Message: ----------- fixed some out-of-place build bugs Modified Paths: -------------- simple-build/trunk/src/SimpleBuild.scala simple-build/trunk/src/build-templates/cpp Modified: simple-build/trunk/src/SimpleBuild.scala =================================================================== --- simple-build/trunk/src/SimpleBuild.scala 2008-02-24 07:17:57 UTC (rev 496) +++ simple-build/trunk/src/SimpleBuild.scala 2008-02-24 20:47:57 UTC (rev 497) @@ -31,6 +31,8 @@ */ val basedir = System getenv "SIMPLEBUILD" + var srcdir: String = _ + /** * Mapping from file extensions to language IDs. */ @@ -119,7 +121,7 @@ object NativeEmitter extends MakeEmitter { def emitMake(target: YamlStr, attrs: YamlMap, aggs: MultiMap[String,String]) = { val srcs = attrs.m(YamlStr("srcs")).xs - val autolibs = autoscan(Set(srcs map (_.s):_*)) + val autolibs = autoscan(Set(srcs map (srcdir/_.s):_*)) val lang = ext2lang(srcs(0).s.extension) val template = loadTemplate("cpp") val struct = structs(lang) @@ -270,7 +272,7 @@ val rawfname = if (args.length > 0) args(0) else "build" val infile = new File(rawfname).getCanonicalFile val fname = infile.getPath - val srcdir = infile.getParent + srcdir = infile.getParent // Read build file. val contents = doOrDie { using (TextReader(fname)) (_.read) Modified: simple-build/trunk/src/build-templates/cpp =================================================================== --- simple-build/trunk/src/build-templates/cpp 2008-02-24 07:17:57 UTC (rev 496) +++ simple-build/trunk/src/build-templates/cpp 2008-02-24 20:47:57 UTC (rev 497) @@ -22,19 +22,19 @@ $(EXE): $(OBJS) $(COMPILER) $(LDFLAGS) -o $@ $^ -$(OBJDIR)/%.o: %.c +$(OBJDIR)/%.o: $(SRCDIR)/%.c mkdir -p $(@D) $(CC) $(CPPFLAGS) $(CFLAGS) -MD -c -o $@ $< -$(OBJDIR)/%.o: %.cc +$(OBJDIR)/%.o: $(SRCDIR)/%.cc mkdir -p $(@D) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c -o $@ $< -$(OBJDIR)/%.o: %.cpp +$(OBJDIR)/%.o: $(SRCDIR)/%.cpp mkdir -p $(@D) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c -o $@ $< -$(OBJDIR)/%.o: %.cxx +$(OBJDIR)/%.o: $(SRCDIR)/%.cxx mkdir -p $(@D) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -c -o $@ $< This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |