Changeset 654
- Timestamp:
- 06/30/07 19:56:25 (1 year ago)
- Files:
-
- branches/tango/docs/ChangeLog (modified) (2 diffs)
- branches/tango/docs/NEWS (modified) (1 diff)
- branches/tango/docs/README.overview (modified) (1 diff)
- branches/tango/docs/README.release (modified) (1 diff)
- branches/tango/docs/README.software_engineers (modified) (1 diff)
- branches/tango/docs/README.use (modified) (1 diff)
- branches/tango/dsss.conf (modified) (1 diff)
- branches/tango/hcf/path.d (modified) (1 diff)
- branches/tango/hcf/process.d (modified) (4 diffs)
- branches/tango/rebuild/InstallMe.command (modified) (1 diff)
- branches/tango/rebuild/Makefile (modified) (5 diffs)
- branches/tango/rebuild/attrib.c (modified) (2 diffs)
- branches/tango/rebuild/choosedc.c (modified) (5 diffs)
- branches/tango/rebuild/compile.c (modified) (1 diff)
- branches/tango/rebuild/config.c (modified) (2 diffs)
- branches/tango/rebuild/config.h (modified) (1 diff)
- branches/tango/rebuild/constfold.c (modified) (2 diffs)
- branches/tango/rebuild/dsss.conf (modified) (2 diffs)
- branches/tango/rebuild/import.c (modified) (5 diffs)
- branches/tango/rebuild/import.h (modified) (1 diff)
- branches/tango/rebuild/link.c (modified) (3 diffs)
- branches/tango/rebuild/mars.c (modified) (16 diffs)
- branches/tango/rebuild/mars.h (modified) (1 diff)
- branches/tango/rebuild/module.c (modified) (2 diffs)
- branches/tango/rebuild/rebuild.conf/dmd-posix (modified) (1 diff)
- branches/tango/rebuild/rebuild.conf/dmd-posix-tango (modified) (1 diff)
- branches/tango/rebuild/rebuild.exe (modified) (previous)
- branches/tango/rebuild/rebuild_choosedc.exe (copied) (copied from trunk/rebuild/rebuild_choosedc.exe)
- branches/tango/rebuild/response.c (modified) (2 diffs)
- branches/tango/rebuild/response.h (modified) (1 diff)
- branches/tango/rebuild/testtango.d (copied) (copied from trunk/rebuild/testtango.d)
- branches/tango/sss/build.d (modified) (5 diffs)
- branches/tango/sss/clean.d (modified) (1 diff)
- branches/tango/sss/conf.d (modified) (8 diffs)
- branches/tango/sss/main.d (modified) (6 diffs)
- branches/tango/sss/net.d (modified) (7 diffs)
- branches/tango/sss/uninstall.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/tango/docs/ChangeLog
r589 r654 1 SVN from 0.64: 1 SVN from 0.67: 2 - Rebuild: -of<name> now converts / to \ on Windows (see ticket #85). 3 - `dsss uninstall` now removes (empty) directories as well as files 4 (see ticket #84). 5 6 0.67 from 0.66: 7 - Rebuild: Fixed generation of libraries with DMD+GNU/Linux (see ticket 8 #75). 9 - Rebuild: Should now compile on FreeBSD (see ticket #82). 10 - Added an option (--keep-response-files for DSSS and -keeprfiles for 11 Rebuild) to not delete response files (see ticket #62). 12 - Added the dsss.conf option 'defaultTargets' (see ticket #64). 13 - Added an option to DSSS to manually specify the URL to receive the 14 source list from (see ticket #77). 15 16 0.66 from 0.65: 17 - Rebuild: Fixed a bug with -listnffiles and -of conflicting (see 18 ticket #66). 19 - Some dsss-net-installs which failed due to the above bug should 20 now work (see ticket #66). 21 - Rebuild: Now (again) converts all paths to backslash-delimited paths 22 on Windows. Apparently DMD only does this conversion internally in 23 some scenarios (see ticket #70). 24 - Rebuild: Fixed a bug with documentation generation causing a segfault 25 in some situations (see ticket #74). 26 - Rebuild: Again moved documentation into the compiler, to fix a bug 27 causing docs to be generated without candydoc. 28 29 0.65 from 0.64: 2 30 - Now exits with the proper exit code when a subcommand fails (see 3 31 ticket #58). … … 14 42 - Rebuild: Moved document generation back into rebuild. 15 43 - Rebuild: Support for pragma(nolink) (see ticket #57). 44 - Future versions should be upgradeable with `dsss net install dsss` 45 (see ticket #26). 46 - Rebuild: Made rebuild choose a D compiler at runtime when possible. 47 - The 'sss' package now installs as a sourcelibrary, so it should be 48 compilable during X-compilation, etc. 49 - Rebuild: Fixed import timestamping. 16 50 17 51 0.64 from 0.63: branches/tango/docs/NEWS
r589 r654 1 2006-06-29: DSSS and Rebuild 0.67 released. 2 3 2007-06-25: DSSS and Rebuild 0.66 released. 4 5 2007-05-18: DSSS and Rebuild 0.65 released. 6 1 7 2007-04-22: DSSS and Rebuild 0.64 released. 2 8 branches/tango/docs/README.overview
r409 r654 20 20 * DSSS automatically generates .di (D import) files for libraries which cause 21 21 code using the library to link it in automatically. 22 * Since DSSS uses bud, DSSS has all of bud's features as well. 22 * DSSS is based on the build tool 'rebuild', which, like bud, has a suite 23 of its own features which DSSS can employ. 23 24 * DSSS can automatically choose names for libraries generated from D packages 24 25 which will not conflict with libraries from other sources, or incompatible branches/tango/docs/README.release
r589 r654 3 3 instructions on how to make a release of the current version of DSSS. 4 4 5 1) sss/main.d, docs/ChangeLog, docs/NEWS and rebuild/mars.c all need to be6 updated.5 1) sss/main.d, docs/ChangeLog, docs/NEWS, rebuild/mars.c, rebuild/rebuild.exe 6 and rebuild/rebuild_choosedc.exe all need to be updated. 7 7 8 8 2) svn export to dsss-<version> branches/tango/docs/README.software_engineers
r589 r654 207 207 208 208 At build time, sections will be handled in the order that they appear in the 209 dsss.conf file, with the exception that binaries are always built last. 209 dsss.conf file, with the exception that binaries are always built last. By 210 default, every section will be built. This can be overridden with the global 211 option 'defaulttargets', which allows you to specify a list of targets to build 212 by default. All targets will be built if 'all' is explicitly specified on the 213 command line. branches/tango/docs/README.use
r589 r654 32 32 Finally, you can cause DSSS to remove /all/ compiled files, essentially leaving 33 33 the source directory as it was before DSSS was used at all, with the command: 34 $ dsss dist build34 $ dsss distclean 35 35 36 36 branches/tango/dsss.conf
r589 r654 27 27 28 28 [sss] 29 # these are not useful in the library 30 exclude = sss/main.d sss/dsssdll.d sss/stub.d 31 32 # this has bootstrapping issues if included it (depends on Mango) 33 exclude += sss/net.d 34 35 # sss depends on rebuild/util 36 buildflags = -g -Irebuild 37 38 # Install sss/net.d as source (so that libsss won't incur dependencies) 39 version (!DSSS_Light) { 40 preinstall = install sss/net.d $INCLUDE_PREFIX/sss 41 } 29 # Install this as a sourcelibrary, so it will work on any platform/compiler combination 30 type = sourcelibrary 42 31 43 32 version (Windows) { 44 33 # Necessary on Windows, worthless elsewhere 45 34 [bcd/windows] 35 type = sourcelibrary 46 36 } 47 37 branches/tango/hcf/path.d
r589 r654 29 29 module hcf.path; 30 30 31 public import std.path;32 33 import std.stdio;34 import std.file;35 import std.string;36 37 import std.c.stdlib;38 39 31 version (Windows) { 40 32 import bcd.windows.windows; branches/tango/hcf/process.d
r589 r654 287 287 288 288 /** system + use a response file */ 289 int systemResponse(char[] cmd, char[] rflag, char[] rfile )289 int systemResponse(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile) 290 290 { 291 291 int ret; … … 299 299 ret = system(elems[0] ~ " " ~ rflag ~ rfile); 300 300 301 std.file.remove(rfile);301 if (deleteRFile) std.file.remove(rfile); 302 302 303 303 return ret; … … 305 305 306 306 /** systemResponse + guarantee success */ 307 void systemROrDie(char[] cmd, char[] rflag, char[] rfile )307 void systemROrDie(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile) 308 308 { 309 309 int res; 310 res = systemResponse(cmd, rflag, rfile );310 res = systemResponse(cmd, rflag, rfile, deleteRFile); 311 311 if (res) // CyberShadow 2007.02.22: Display a message before exiting 312 312 { … … 319 319 320 320 /** systemResponse + output */ 321 int sayAndSystemR(char[] cmd, char[] rflag, char[] rfile )321 int sayAndSystemR(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile) 322 322 { 323 323 writefln("+ %s", cmd); 324 return systemResponse(cmd, rflag, rfile );324 return systemResponse(cmd, rflag, rfile, deleteRFile); 325 325 } 326 326 327 327 /** systemROrDie + output */ 328 void saySystemRDie(char[] cmd, char[] rflag, char[] rfile )328 void saySystemRDie(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile) 329 329 { 330 330 writefln("+ %s", cmd); 331 systemROrDie(cmd, rflag, rfile );332 } 331 systemROrDie(cmd, rflag, rfile, deleteRFile); 332 } branches/tango/rebuild/InstallMe.command
r589 r654 6 6 7 7 sudo install -p -m 755 rebuild $PREFIX/bin 8 sudo install -p -m 755 rebuild_choosedc $PREFIX/bin 8 9 sudo install -p -m 644 dymoduleinit.d $PREFIX/lib 9 10 sudo install -p -m 644 rebuild.1 $PREFIX/share/man/man1 11 sudo install -p -m 644 testtango.d $PREFIX/share/rebuild 10 12 11 13 sudo install -d -m 755 $PREFIX/etc/rebuild branches/tango/rebuild/Makefile
r589 r654 10 10 PREFIX=/usr 11 11 BINDIR=$(PREFIX)/bin 12 MANDIR=$(PREFIX)/share/man 13 DOCDIR=$(PREFIX)/share/doc 12 SHAREDIR=$(PREFIX)/share 13 MANDIR=$(SHAREDIR)/man 14 DOCDIR=$(SHAREDIR)/doc 14 15 SYSCONFDIR=$(PREFIX)/etc 15 16 … … 70 71 whereami.o 71 72 72 all: rebuild$(EXEEXT) rebuild .conf/default73 all: rebuild$(EXEEXT) rebuild_choosedc$(EXEEXT) rebuild.conf/default 73 74 74 75 rebuild$(EXEEXT): id.c impcnvtab.c $(OBJS) … … 92 93 impcnvgen.o: impcnvgen.c 93 94 $(NATIVECXX) $(CXXFLAGS) -c impcnvgen.c -o impcnvgen.o 94 95 95 96 rebuild.conf/default: choosedc$(EXEEXT) 96 97 ./choosedc$(EXEEXT) 97 98 98 choosedc$(EXEEXT): choosedc.o nwhereami.o99 $(NATIVECXX) $(CXXFLAGS) $(LDFLAGS) choosedc.o nwhereami.o -o choosedc$(EXEEXT)99 choosedc$(EXEEXT): nchoosedc.o nwhereami.o 100 $(NATIVECXX) $(CXXFLAGS) $(LDFLAGS) nchoosedc.o nwhereami.o -o choosedc$(EXEEXT) 100 101 101 choosedc.o: choosedc.c 102 $(NATIVECXX) $(CXXFLAGS) -c choosedc.c -o choosedc.o 102 rebuild_choosedc$(EXEEXT): choosedc.o whereami.o 103 $(CXX) $(CXXFLAGS) $(LDFLAGS) choosedc.o whereami.o -o rebuild_choosedc$(EXEEXT) 104 105 nchoosedc.o: choosedc.c 106 $(NATIVECXX) $(CXXFLAGS) -c choosedc.c -o nchoosedc.o 103 107 104 108 nwhereami.o: whereami.c … … 115 119 mkdir -p $(DOCDIR)/rebuild 116 120 mkdir -p $(SYSCONFDIR)/rebuild 121 mkdir -p $(SHAREDIR)/rebuild 117 122 cp -pf rebuild$(EXEEXT) $(BINDIR) 123 cp -pf rebuild_choosedc$(EXEEXT) $(BINDIR) 118 124 ln -s rebuild$(EXEEXT) $(BINDIR)/rerun$(EXEEXT) 119 125 cp -rf rebuild.1 $(MANDIR)/man1 120 126 cp -pf README $(DOCDIR)/rebuild 121 127 cp -pRf rebuild.conf/* $(SYSCONFDIR)/rebuild/ 128 cp -pf testtango.d $(SHAREDIR)/rebuild 122 129 ./instdymods $(PREFIX) 123 130 … … 126 133 rm -f id.c id.h idgen$(EXEEXT) idgen.o 127 134 rm -f impcnvtab.c impcnvtab.h impcnvgen$(EXEEXT) impcnvgen.o 128 rm -f rebuild.conf/default choosedc$(EXEEXT) choosedc.o nwhereami.o 135 rm -f rebuild_choosedc$(EXEEXT) choosedc.o whereami.o 136 rm -f rebuild.conf/default choosedc$(EXEEXT) nchoosedc.o nwhereami.o branches/tango/rebuild/attrib.c
r589 r654 274 274 } else if (ds->isImport()) { 275 275 Import *im = (Import *) ds; 276 im->load( NULL);276 im->load(m, NULL); 277 277 im->mod->parsepragmas(); 278 278 … … 1085 1085 } else if (ds->isImport()) { 1086 1086 Import *im = (Import *) ds; 1087 im->load( NULL);1087 im->load(m, NULL); 1088 1088 im->mod->parsepragmas(); 1089 1089 branches/tango/rebuild/choosedc.c
r409 r654 5 5 */ 6 6 7 #include "stdio.h" 7 #include <stdio.h> 8 #include <stdlib.h> 9 #include <string.h> 10 #include <unistd.h> 11 8 12 #include "whereami.h" 9 13 10 int main( )14 int main(int argc, char **argv) 11 15 { 12 char *compiler, *os, *dir, *fil; 13 int haveDMD, haveGDC; 16 char *compiler, *os, *corelib, *testfile, *cmd, *defaultfname, *dmddir, 17 *gdcdir, *dir, *fil; 18 int haveDMD, haveGDC, inSourceDir, res; 14 19 FILE *fout; 15 20 … … 20 25 #endif 21 26 27 // figure out our own path 28 if (!whereAmI(argv[0], &dir, &fil)) { 29 // assume "." 30 dir = "."; 31 } 32 33 // check if we're running out of the sourcedir 34 testfile = (char *) malloc(strlen(dir) + 8); 35 sprintf(testfile, "%s/mars.c", dir); 36 if (access(testfile, F_OK) == 0) { 37 inSourceDir = 1; 38 } else { 39 inSourceDir = 0; 40 } 41 free(testfile); 42 22 43 // check for DMD 23 if (whereAmI("dmd", &d ir, &fil)) {44 if (whereAmI("dmd", &dmddir, &fil)) { 24 45 haveDMD = 1; 25 46 } else { … … 28 49 29 50 // check for GDC 30 if (whereAmI("gdmd", & dir, &fil)) {51 if (whereAmI("gdmd", &gdcdir, &fil)) { 31 52 haveGDC = 1; 32 53 } else { … … 39 60 #ifdef __WIN32 40 61 compiler = "dmd"; 62 haveGDC = 0; 41 63 #else 42 64 compiler = "gdc"; 65 haveDMD = 0; 43 66 #endif 44 67 } else if (haveDMD) { … … 47 70 compiler = "gdc"; 48 71 } else { 49 printf("Neither DMD nor GDC found in $PATH. Not configuring a default.\n"); 72 printf("Neither DMD nor GDC found in $PATH. Not configuring a default.\n" 73 "Please add ONE of the following lines to your rebuild.conf/default file:\n" 74 "profile=gdc-posix\n" 75 "profile=gdc-posix-tango\n" 76 "profile=gdc-win\n" 77 "profile=gdc-win-tango\n" 78 "profile=dmd-posix\n" 79 "profile=dmd-posix-tango\n" 80 "profile=dmd-win\n" 81 "profile=dmd-win-tango\n"); 50 82 return 0; 51 83 } 52 84 85 // check which corelib is available 86 if (inSourceDir) { 87 testfile = (char *) malloc(strlen(dir) + 13); 88 sprintf(testfile, "%s/testtango.d", dir); 89 } else { 90 testfile = (char *) malloc(strlen(dir) + 30); 91 sprintf(testfile, "%s/../share/rebuild/testtango.d", dir); 92 } 93 printf("Ignore any error from GDC or DMD in the following lines.\n"); 94 if (haveGDC) { 95 cmd = (char *) malloc(strlen(testfile) + 22); 96 sprintf(cmd, "gdc -c -fsyntax-only %s", testfile); 97 res = system(cmd); 98 } else if (haveDMD) { 99 cmd = (char *) malloc(strlen(testfile) + 12); 100 sprintf(cmd, "dmd -c -o- %s", testfile); 101 res = system(cmd); 102 } 103 if (res == 0) { 104 corelib = "-tango"; 105 } else { 106 corelib = ""; 107 } 108 53 109 // output the default file 54 fout = fopen("rebuild.conf/default", "w"); 110 if (inSourceDir) { 111 defaultfname = (char *) malloc(strlen(dir) + 22); 112 sprintf(defaultfname, "%s/rebuild.conf/default", dir); 113 } else { 114 defaultfname = (char *) malloc(strlen(dir) + 24); 115 sprintf(defaultfname, "%s/../etc/rebuild/default", dir); 116 } 117 118 fout = fopen(defaultfname, "w"); 55 119 if (!fout) { perror("fopen"); return 1; } 56 fprintf(fout, "profile=%s-%s \n", compiler, os);120 fprintf(fout, "profile=%s-%s%s\n", compiler, os, corelib); 57 121 fclose(fout); 58 122 branches/tango/rebuild/compile.c
r589 r654 73 73 } else { 74 74 if (useresponse) 75 res = systemResponse(cline.c_str(), response.c_str(), " rsp");75 res = systemResponse(cline.c_str(), response.c_str(), "compile.rf", !(global.params.keeprfiles)); 76 76 else 77 77 res = system(cline.c_str()); branches/tango/rebuild/config.c
r589 r654 48 48 void readConfigFile(const string &dir, const string &fname, string &versionFile); 49 49 50 void readConfig(char *argvz, const string &profile )50 void readConfig(char *argvz, const string &profile, bool generate) 51 51 { 52 52 // find where we're installed … … 90 90 string conffile = confdir + DIRSEP + profile; 91 91 if (!exists(conffile.c_str())) { 92 cerr << "Profile '" << profile << "' does not exist." << endl; 93 exit(1); 92 // perhaps generate it 93 if (generate) { 94 system("rebuild_choosedc"); 95 readConfig(argvz, profile, false); 96 return; 97 } else { 98 cerr << "Profile '" << profile << "' does not exist." << endl; 99 if (profile == "default") { 100 cerr << "You may generate it by running rebuild_choosedc"; 101 #ifndef __WIN32 102 cerr << ", as root, if necessary" << endl; 103 #else 104 cerr << ".exe" << endl; 105 #endif 106 } 107 exit(1); 108 } 94 109 } 95 110 branches/tango/rebuild/config.h
r409 r654 30 30 31 31 // Read a configuration file 32 void readConfig(char *argvz, const std::string &profile );32 void readConfig(char *argvz, const std::string &profile, bool generate); 33 33 34 34 // Read from a command branches/tango/rebuild/constfold.c
r589 r654 34 34 35 35 #define LOG 0 36 37 /* FreeBSD Workaround */ 38 #if defined(__FreeBSD__) 39 long double 40 fmodl (long double x, long double y) 41 { 42 long double ax, ay; 43 44 if (y == 0) 45 return 0; 46 47 ay = fabsl (y); 48 ax = fabsl (x); 49 50 if (ax < ay) 51 return x; 52 53 return copysignl(ax - (floorl (ax / ay)) * ay, x); 54 } 55 #endif 36 56 37 57 Expression *expType(Type *type, Expression *e) … … 487 507 c = complex_t(e1->toReal() % r2, e1->toImaginary() % r2); 488 508 #else 509 489 510 c = complex_t(fmodl(e1->toReal(), r2), fmodl(e1->toImaginary(), r2)); 490 511 #endif branches/tango/rebuild/dsss.conf
r589 r654 8 8 9 9 preinstall=install rebuild$EXE_EXT $BIN_PREFIX ; \ 10 install rebuild_choosedc$EXE_EXT $BIN_PREFIX ; \ 10 11 install rebuild.conf/default $ETC_PREFIX/rebuild ; \ 11 12 install rebuild.conf/phobos $ETC_PREFIX/rebuild ; \ … … 18 19 install rebuild.conf/dmd-posix-tango $ETC_PREFIX/rebuild ; \ 19 20 install rebuild.conf/dmd-win $ETC_PREFIX/rebuild ; \ 20 install rebuild.conf/dmd-win-tango $ETC_PREFIX/rebuild 21 install rebuild.conf/dmd-win-tango $ETC_PREFIX/rebuild ; \ 22 install testtango.d $PREFIX/share/rebuild 21 23 22 24 version (Posix) { branches/tango/rebuild/import.c
r589 r654 78 78 } 79 79 80 void Import::load( Scope *sc)80 void Import::load(Module *src, Scope *sc) 81 81 { 82 82 DsymbolTable *dst; … … 106 106 mod->importedFrom = sc ? sc->module->importedFrom : Module::rootModule; 107 107 } 108 109 // Modules need a list of each imported module 110 if (src) 111 src->aimports.push(mod); 112 108 113 if (!pkg) 109 114 pkg = mod; … … 118 123 //printf("Import::semantic('%s')\n", toChars()); 119 124 120 load( sc);125 load(NULL, sc); 121 126 122 127 if (mod) … … 142 147 } 143 148 144 // Modules need a list of each imported module145 sc->module->aimports.push(mod);146 147 149 if (mod->needmoduleinfo) 148 150 sc->module->needmoduleinfo = 1; … … 231 233 232 234 if (!pkg) 233 load(NULL );235 load(NULL, NULL); 234 236 235 237 // Forward it to the package/module branches/tango/rebuild/import.h
r589 r654 51 51 char *kind(); 52 52 Dsymbol *syntaxCopy(Dsymbol *s); // copy only syntax trees 53 void load( Scope *sc);53 void load(Module *src, Scope *sc); 54 54 void semantic(Scope *sc); 55 55 void semantic2(Scope *sc); branches/tango/rebuild/link.c
r589 r654 28 28 #if _WIN32 29 29 #include <process.h> 30 #endif 31 32 #if linux 30 #else 31 33 32 #include <sys/types.h> 34 33 #include <sys/wait.h> … … 216 215 } else { 217 216 if (useresponse) 218 res = systemResponse(cline.c_str(), response.c_str(), " rsp");217 res = systemResponse(cline.c_str(), response.c_str(), "link.rf", !(global.params.keeprfiles)); 219 218 else 220 219 res = system(cline.c_str()); … … 241 240 } else { 242 241 if (useresponse) 243 res = systemResponse(cline.c_str(), response.c_str(), " rsp");242 res = systemResponse(cline.c_str(), response.c_str(), "postlink.rf", !(global.params.keeprfiles)); 244 243 else 245 244 res = system(cline.c_str()); branches/tango/rebuild/mars.c
r589 r654 66 66 copyright = "Copyright (c) 1999-2007 by Digital Mars and Gregor Richards"; 67 67 written = "written by Walter Bright and Gregor Richards"; 68 version = "version 0.6 4(based on DMD 1.013)";68 version = "version 0.67 (based on DMD 1.013)"; 69 69 global.structalign = 8; 70 70 cmodules = NULL; … … 182 182 compile)\n\ 183 183 -objfiles list object files generated\n\ 184 -keeprfiles Keep response files (if they are used)\n\ 184 185 -full compile all source files, regardless of their age\n\ 185 186 -explicit only compile files explicitly named, not dependencies\n\ … … 266 267 global.params.listnffiles = 0; 267 268 global.params.listobjfiles = 0; 269 global.params.keeprfiles = 0; 268 270 global.params.fullqobjs = 1; 269 271 global.params.fullqdocs = 0; … … 348 350 } 349 351 350 readConfig(argv[0], chooseProfile );352 readConfig(argv[0], chooseProfile, (chooseProfile == "default")); 351 353 352 354 // if the configuration includes path=, add that path … … 522 524 if (masterConfig.find("liblink") != masterConfig.end() && 523 525 masterConfig["liblink"].find("oneatatime") != masterConfig["liblink"].end() && 524 masterConfig["liblink"]["oneatatime"] != " yes") {526 masterConfig["liblink"]["oneatatime"] != "no") { 525 527 global.params.oneatatime = 1; 526 528 } … … 531 533 if (masterConfig.find("shliblink") != masterConfig.end() && 532 534 masterConfig["shliblink"].find("oneatatime") != masterConfig["shliblink"].end() && 533 masterConfig["shliblink"]["oneatatime"] != " yes") {535 masterConfig["shliblink"]["oneatatime"] != "no") { 534 536 global.params.oneatatime = 1; 535 537 } … … 540 542 if (masterConfig.find("dyliblink") != masterConfig.end() && 541 543 masterConfig["dyliblink"].find("oneatatime") != masterConfig["dyliblink"].end() && 542 masterConfig["dyliblink"]["oneatatime"] != " yes") {544 masterConfig["dyliblink"]["oneatatime"] != "no") { 543 545 global.params.oneatatime = 1; 544 546 } … … 607 609 { 608 610 global.params.listobjfiles = 1; 611 } 612 else if (strcmp(p + 1, "keeprfiles") == 0) 613 { 614 global.params.keeprfiles = 1; 609 615 } 610 616 else if (strcmp(p + 1, "full") == 0) … … 677 683 } 678 684 } 679 else if (p[1] == 'D') 680 { global.params.doDocComments = 1; 681 switch (p[2]) 682 { 683 case 'd': 684 if (!p[3]) 685 goto Lnoarg; 686 global.params.docdir = p + 3; 687 break; 688 case 'q': 689 // a doc dir, and fullqdocs 690 if (!p[3]) 691 goto Lnoarg; 692 global.params.docdir = p + 3; 693 global.params.fullqdocs = 1; 694 break; 695 case 'f': 696 if (!p[3]) 697 goto Lnoarg; 698 global.params.docname = p + 3; 699 break; 700 701 case 0: 702 break; 703 704 default: 705 goto Lerror; 706 } 707 } 685 else if (p[1] == 'D') 686 { 687 /* this is passed through, but we keep one piece of information 688 * we may need */ 689 690 if (p[2] == 'd') { 691 // yes, it's a documentation directory. Needed for -candydoc 692 global.params.docdir = p + 3; 693 compileFlags += " "; 694 compileFlags += p; 695 696 } else if (p[2] == 'q') { 697 // a doc dir, and fullqdocs 698 global.params.docdir = p + 3; 699 global.params.fullqdocs = 1; 700 compileFlags += " "; 701 p[2] = 'd'; 702 compileFlags += p; 703 704 } else { 705 compileFlags += " "; 706 compileFlags += p; 707 } 708 } 708 709 else if (strcmp(p + 1, "quiet") == 0) 709 710 { … … 943 944 global.params.link = 0; 944 945 946 #if _WIN32 947 // Convert / to \ so linker will work 948 for (int j = 0; global.params.objname[j]; j++) 949 { 950 if (global.params.objname[j] == '/') 951 global.params.objname[j] = '\\'; 952 } 953 #endif 945 954 if (global.params.link) 946 955 { … … 955 964 else 956 965 { 957 if (global.params.objname && !global.params.listfiles && files.dim > 1) 966 if (global.params.objname && 967 !global.params.listfiles && 968 !global.params.listnffiles && 969 files.dim > 1) 958 970 { 959 971 error("multiple source files, but only one .obj name"); … … 972 984 //backend_init(); 973 985 974 if (global.params.listfiles && 986 if ((global.params.listfiles || 987 global.params.listnffiles) && 975 988 global.params.objname) { 976 989 global.listout = fopen(global.params.objname, "w"); … … 1053 1066 p = (char *) files.data[i]; 1054 1067 1055 /*#if _WIN321068 #if _WIN32 1056 1069 // Convert / to \ so linker will work 1057 1070 for (int j = 0; p[j]; j++) … … 1060 1073 p[j] = '\\'; 1061 1074 } 1062 #endif */1075 #endif 1063 1076 1064 1077 p = FileName::name(p); // strip path … … 1504 1517 printf("code %s\n", m->toChars()); 1505 1518 1506 if (global.params.doDocComments)1507 m->gendocfile(); 1519 /* if (global.params.doDocComments) 1520 m->gendocfile(); */ 1508 1521 1509 1522 // now possibly reflect this and add the reflected module as well … … 1535 1548 // now add the module to the list 1536 1549 global.cmodules->push(new Module( 1537 mem.strdup(fn.c_str()), m->md->id, 0, 0));1550 mem.strdup(fn.c_str()), m->md->id, global.params.doDocComments, global.params.doHdrGeneration)); 1538 1551 } 1539 1552 } branches/tango/rebuild/mars.h
r589 r654 48 48 char listnffiles; // list files which would be built but weren't found 49 49 char listobjfiles; // list object files which were built 50 char keeprfiles; // keep response files 50 51 char fullqobjs; // use fully-qualified object names 51 52 char fullqdocs; // use fully-qualified document names branches/tango/rebuild/module.c
r589 r654 264 264 } 265 265 266 m = new Module(filename, ident, 0, 0);266 m = new Module(filename, ident, global.params.doDocComments, global.params.doHdrGeneration); 267 267 m->loc = loc; 268 268 … … 827 827 } else if (ds->isImport()) { 828 828 Import *im = (Import *) ds; 829 im->load( NULL);829 im->load(this, NULL); 830 830 im->mod->parsepragmas(); 831 831 branches/tango/rebuild/rebuild.conf/dmd-posix
r589 r654 47 47 [liblink] 48 48 safe=yes 49 oneatatime=yes 49 50 cmd=ar rc $o $i 50 51 branches/tango/rebuild/rebuild.conf/dmd-posix-tango
r589 r654 48 48 [liblink] 49 49 safe=yes 50 oneatatime=yes 50 51 cmd=ar rc $o $i 51 52 branches/tango/rebuild/response.c
r589 r654 89 89 } 90 90 91 int systemResponse(const char *cmd, const char *rflag, const char *rfile )91 int systemResponse(const char *cmd, const char *rflag, const char *rfile, bool deleteRFile) 92 92 { 93 93 char *newcmd = mem.strdup(cmd); … … 126 126 sprintf(newcmdr, "%s %s%s", newcmd, rflag, rfile); 127 127 res = system(newcmdr); 128 remove(rfile);128 if (deleteRFile) remove(rfile); 129 129 130 130 mem.free(newcmdr); branches/tango/rebuild/response.h
r409 r654 14 14 void parseResponseFile(int *argc, char ***argv, char *rf, int argnum); 15 15 16 int systemResponse(const char *cmd, const char *rflag, const char *rfile );16 int systemResponse(const char *cmd, const char *rflag, const char *rfile, bool deleteRFile); 17 17 18 18 #endif
