Changeset 654

Show
Ignore:
Timestamp:
06/30/07 19:56:25 (1 year ago)
Author:
Gregor
Message:

MERGE: trunk r653

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/tango/docs/ChangeLog

    r589 r654  
    1 SVN from 0.64: 
     1SVN 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 
     60.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 
     160.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 
     290.65 from 0.64: 
    230        - Now exits with the proper exit code when a subcommand fails (see 
    331          ticket #58). 
     
    1442        - Rebuild: Moved document generation back into rebuild. 
    1543        - 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. 
    1650 
    17510.64 from 0.63: 
  • branches/tango/docs/NEWS

    r589 r654  
     12006-06-29: DSSS and Rebuild 0.67 released. 
     2 
     32007-06-25: DSSS and Rebuild 0.66 released. 
     4 
     52007-05-18: DSSS and Rebuild 0.65 released. 
     6 
    172007-04-22: DSSS and Rebuild 0.64 released. 
    28 
  • branches/tango/docs/README.overview

    r409 r654  
    2020 * DSSS automatically generates .di (D import) files for libraries which cause 
    2121   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. 
    2324 * DSSS can automatically choose names for libraries generated from D packages 
    2425   which will not conflict with libraries from other sources, or incompatible 
  • branches/tango/docs/README.release

    r589 r654  
    33instructions on how to make a release of the current version of DSSS. 
    44 
    5 1) sss/main.d, docs/ChangeLog, docs/NEWS and rebuild/mars.c all need to b
    6    updated. 
     51) sss/main.d, docs/ChangeLog, docs/NEWS, rebuild/mars.c, rebuild/rebuild.ex
     6   and rebuild/rebuild_choosedc.exe all need to be updated. 
    77 
    882) svn export to dsss-<version> 
  • branches/tango/docs/README.software_engineers

    r589 r654  
    207207 
    208208At 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. 
     209dsss.conf file, with the exception that binaries are always built last. By 
     210default, every section will be built. This can be overridden with the global 
     211option 'defaulttargets', which allows you to specify a list of targets to build 
     212by default. All targets will be built if 'all' is explicitly specified on the 
     213command line. 
  • branches/tango/docs/README.use

    r589 r654  
    3232Finally, you can cause DSSS to remove /all/ compiled files, essentially leaving 
    3333the source directory as it was before DSSS was used at all, with the command: 
    34 $ dsss distbuild 
     34$ dsss distclean 
    3535 
    3636 
  • branches/tango/dsss.conf

    r589 r654  
    2727 
    2828[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 
     30type = sourcelibrary 
    4231 
    4332version (Windows) { 
    4433    # Necessary on Windows, worthless elsewhere 
    4534    [bcd/windows] 
     35    type = sourcelibrary 
    4636} 
    4737 
  • branches/tango/hcf/path.d

    r589 r654  
    2929module hcf.path; 
    3030 
    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  
    3931version (Windows) { 
    4032    import bcd.windows.windows; 
  • branches/tango/hcf/process.d

    r589 r654  
    287287 
    288288/** system + use a response file */ 
    289 int systemResponse(char[] cmd, char[] rflag, char[] rfile
     289int systemResponse(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile
    290290{ 
    291291    int ret; 
     
    299299    ret = system(elems[0] ~ " " ~ rflag ~ rfile); 
    300300     
    301     std.file.remove(rfile); 
     301    if (deleteRFile) std.file.remove(rfile); 
    302302     
    303303    return ret; 
     
    305305 
    306306/** systemResponse + guarantee success */ 
    307 void systemROrDie(char[] cmd, char[] rflag, char[] rfile
     307void systemROrDie(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile
    308308{ 
    309309    int res; 
    310     res = systemResponse(cmd, rflag, rfile); 
     310    res = systemResponse(cmd, rflag, rfile, deleteRFile); 
    311311    if (res)  // CyberShadow 2007.02.22: Display a message before exiting 
    312312    { 
     
    319319 
    320320/** systemResponse + output */ 
    321 int sayAndSystemR(char[] cmd, char[] rflag, char[] rfile
     321int sayAndSystemR(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile
    322322{ 
    323323    writefln("+ %s", cmd); 
    324     return systemResponse(cmd, rflag, rfile); 
     324    return systemResponse(cmd, rflag, rfile, deleteRFile); 
    325325} 
    326326 
    327327/** systemROrDie + output */ 
    328 void saySystemRDie(char[] cmd, char[] rflag, char[] rfile
     328void saySystemRDie(char[] cmd, char[] rflag, char[] rfile, bool deleteRFile
    329329{ 
    330330    writefln("+ %s", cmd); 
    331     systemROrDie(cmd, rflag, rfile); 
    332 } 
     331    systemROrDie(cmd, rflag, rfile, deleteRFile); 
     332} 
  • branches/tango/rebuild/InstallMe.command

    r589 r654  
    66 
    77sudo install -p -m 755 rebuild $PREFIX/bin 
     8sudo install -p -m 755 rebuild_choosedc $PREFIX/bin 
    89sudo install -p -m 644 dymoduleinit.d $PREFIX/lib 
    910sudo install -p -m 644 rebuild.1 $PREFIX/share/man/man1 
     11sudo install -p -m 644 testtango.d $PREFIX/share/rebuild 
    1012 
    1113sudo install -d -m 755 $PREFIX/etc/rebuild 
  • branches/tango/rebuild/Makefile

    r589 r654  
    1010PREFIX=/usr 
    1111BINDIR=$(PREFIX)/bin 
    12 MANDIR=$(PREFIX)/share/man 
    13 DOCDIR=$(PREFIX)/share/doc 
     12SHAREDIR=$(PREFIX)/share 
     13MANDIR=$(SHAREDIR)/man 
     14DOCDIR=$(SHAREDIR)/doc 
    1415SYSCONFDIR=$(PREFIX)/etc 
    1516 
     
    7071  whereami.o 
    7172 
    72 all: rebuild$(EXEEXT) rebuild.conf/default 
     73all: rebuild$(EXEEXT) rebuild_choosedc$(EXEEXT) rebuild.conf/default 
    7374 
    7475rebuild$(EXEEXT): id.c impcnvtab.c $(OBJS) 
     
    9293impcnvgen.o: impcnvgen.c 
    9394    $(NATIVECXX) $(CXXFLAGS) -c impcnvgen.c -o impcnvgen.o 
    94    
     95 
    9596rebuild.conf/default: choosedc$(EXEEXT) 
    9697    ./choosedc$(EXEEXT) 
    9798 
    98 choosedc$(EXEEXT): choosedc.o nwhereami.o 
    99     $(NATIVECXX) $(CXXFLAGS) $(LDFLAGS) choosedc.o nwhereami.o -o choosedc$(EXEEXT) 
     99choosedc$(EXEEXT): nchoosedc.o nwhereami.o 
     100    $(NATIVECXX) $(CXXFLAGS) $(LDFLAGS) nchoosedc.o nwhereami.o -o choosedc$(EXEEXT) 
    100101 
    101 choosedc.o: choosedc.c 
    102     $(NATIVECXX) $(CXXFLAGS) -c choosedc.c -o choosedc.o 
     102rebuild_choosedc$(EXEEXT): choosedc.o whereami.o 
     103    $(CXX) $(CXXFLAGS) $(LDFLAGS) choosedc.o whereami.o -o rebuild_choosedc$(EXEEXT) 
     104 
     105nchoosedc.o: choosedc.c 
     106    $(NATIVECXX) $(CXXFLAGS) -c choosedc.c -o nchoosedc.o 
    103107 
    104108nwhereami.o: whereami.c 
     
    115119    mkdir -p $(DOCDIR)/rebuild 
    116120    mkdir -p $(SYSCONFDIR)/rebuild 
     121    mkdir -p $(SHAREDIR)/rebuild 
    117122    cp -pf rebuild$(EXEEXT) $(BINDIR) 
     123    cp -pf rebuild_choosedc$(EXEEXT) $(BINDIR) 
    118124    ln -s rebuild$(EXEEXT) $(BINDIR)/rerun$(EXEEXT) 
    119125    cp -rf rebuild.1 $(MANDIR)/man1 
    120126    cp -pf README $(DOCDIR)/rebuild 
    121127    cp -pRf rebuild.conf/* $(SYSCONFDIR)/rebuild/ 
     128    cp -pf testtango.d $(SHAREDIR)/rebuild 
    122129    ./instdymods $(PREFIX) 
    123130 
     
    126133    rm -f id.c id.h idgen$(EXEEXT) idgen.o 
    127134    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  
    274274            } else if (ds->isImport()) { 
    275275                Import *im = (Import *) ds; 
    276                 im->load(NULL); 
     276                im->load(m, NULL); 
    277277                im->mod->parsepragmas(); 
    278278                 
     
    10851085            } else if (ds->isImport()) { 
    10861086                Import *im = (Import *) ds; 
    1087                 im->load(NULL); 
     1087                im->load(m, NULL); 
    10881088                im->mod->parsepragmas(); 
    10891089                 
  • branches/tango/rebuild/choosedc.c

    r409 r654  
    55 */ 
    66 
    7 #include "stdio.h" 
     7#include <stdio.h> 
     8#include <stdlib.h> 
     9#include <string.h> 
     10#include <unistd.h> 
     11 
    812#include "whereami.h" 
    913 
    10 int main(
     14int main(int argc, char **argv
    1115{ 
    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; 
    1419    FILE *fout; 
    1520     
     
    2025#endif 
    2126     
     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     
    2243    // check for DMD 
    23     if (whereAmI("dmd", &dir, &fil)) { 
     44    if (whereAmI("dmd", &dmddir, &fil)) { 
    2445        haveDMD = 1; 
    2546    } else { 
     
    2849     
    2950    // check for GDC 
    30     if (whereAmI("gdmd", &dir, &fil)) { 
     51    if (whereAmI("gdmd", &gdcdir, &fil)) { 
    3152        haveGDC = 1; 
    3253    } else { 
     
    3960#ifdef __WIN32 
    4061        compiler = "dmd"; 
     62        haveGDC = 0; 
    4163#else 
    4264        compiler = "gdc"; 
     65        haveDMD = 0; 
    4366#endif 
    4467    } else if (haveDMD) { 
     
    4770        compiler = "gdc"; 
    4871    } 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"); 
    5082        return 0; 
    5183    } 
    5284     
     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     
    53109    // 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"); 
    55119    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); 
    57121    fclose(fout); 
    58122     
  • branches/tango/rebuild/compile.c

    r589 r654  
    7373        } else { 
    7474            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)); 
    7676            else 
    7777                res = system(cline.c_str()); 
  • branches/tango/rebuild/config.c

    r589 r654  
    4848void readConfigFile(const string &dir, const string &fname, string &versionFile); 
    4949 
    50 void readConfig(char *argvz, const string &profile
     50void readConfig(char *argvz, const string &profile, bool generate
    5151{ 
    5252    // find where we're installed 
     
    9090    string conffile = confdir + DIRSEP + profile; 
    9191    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        } 
    94109    } 
    95110     
  • branches/tango/rebuild/config.h

    r409 r654  
    3030 
    3131// Read a configuration file 
    32 void readConfig(char *argvz, const std::string &profile); 
     32void readConfig(char *argvz, const std::string &profile, bool generate); 
    3333 
    3434// Read from a command 
  • branches/tango/rebuild/constfold.c

    r589 r654  
    3434 
    3535#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 
    3656 
    3757Expression *expType(Type *type, Expression *e) 
     
    487507        c = complex_t(e1->toReal() % r2, e1->toImaginary() % r2); 
    488508#else 
     509 
    489510        c = complex_t(fmodl(e1->toReal(), r2), fmodl(e1->toImaginary(), r2)); 
    490511#endif 
  • branches/tango/rebuild/dsss.conf

    r589 r654  
    88 
    99preinstall=install rebuild$EXE_EXT $BIN_PREFIX ; \ 
     10    install rebuild_choosedc$EXE_EXT $BIN_PREFIX ; \ 
    1011    install rebuild.conf/default $ETC_PREFIX/rebuild ; \ 
    1112    install rebuild.conf/phobos $ETC_PREFIX/rebuild ; \ 
     
    1819    install rebuild.conf/dmd-posix-tango $ETC_PREFIX/rebuild ; \ 
    1920    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 
    2123 
    2224version (Posix) { 
  • branches/tango/rebuild/import.c

    r589 r654  
    7878} 
    7979 
    80 void Import::load(Scope *sc) 
     80void Import::load(Module *src, Scope *sc) 
    8181{ 
    8282    DsymbolTable *dst; 
     
    106106        mod->importedFrom = sc ? sc->module->importedFrom : Module::rootModule; 
    107107    } 
     108 
     109    // Modules need a list of each imported module 
     110    if (src) 
     111        src->aimports.push(mod); 
     112     
    108113    if (!pkg) 
    109114    pkg = mod; 
     
    118123    //printf("Import::semantic('%s')\n", toChars()); 
    119124 
    120     load(sc); 
     125    load(NULL, sc); 
    121126 
    122127    if (mod) 
     
    142147    } 
    143148 
    144     // Modules need a list of each imported module 
    145     sc->module->aimports.push(mod); 
    146  
    147149    if (mod->needmoduleinfo) 
    148150        sc->module->needmoduleinfo = 1; 
     
    231233 
    232234    if (!pkg) 
    233     load(NULL); 
     235    load(NULL, NULL); 
    234236 
    235237    // Forward it to the package/module 
  • branches/tango/rebuild/import.h

    r589 r654  
    5151    char *kind(); 
    5252    Dsymbol *syntaxCopy(Dsymbol *s);    // copy only syntax trees 
    53     void load(Scope *sc); 
     53    void load(Module *src, Scope *sc); 
    5454    void semantic(Scope *sc); 
    5555    void semantic2(Scope *sc); 
  • branches/tango/rebuild/link.c

    r589 r654  
    2828#if _WIN32 
    2929#include    <process.h> 
    30 #endif 
    31  
    32 #if linux 
     30#else 
     31 
    3332#include    <sys/types.h> 
    3433#include    <sys/wait.h> 
     
    216215            } else { 
    217216                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)); 
    219218                else 
    220219                    res = system(cline.c_str()); 
     
    241240                } else { 
    242241                    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)); 
    244243                    else 
    245244                        res = system(cline.c_str()); 
  • branches/tango/rebuild/mars.c

    r589 r654  
    6666    copyright = "Copyright (c) 1999-2007 by Digital Mars and Gregor Richards"; 
    6767    written = "written by Walter Bright and Gregor Richards"; 
    68     version = "version 0.64 (based on DMD 1.013)"; 
     68    version = "version 0.67 (based on DMD 1.013)"; 
    6969    global.structalign = 8; 
    7070    cmodules = NULL; 
     
    182182                 compile)\n\ 
    183183  -objfiles      list object files generated\n\ 
     184  -keeprfiles    Keep response files (if they are used)\n\ 
    184185  -full          compile all source files, regardless of their age\n\ 
    185186  -explicit      only compile files explicitly named, not dependencies\n\ 
     
    266267    global.params.listnffiles = 0; 
    267268    global.params.listobjfiles = 0; 
     269    global.params.keeprfiles = 0; 
    268270    global.params.fullqobjs = 1; 
    269271    global.params.fullqdocs = 0; 
     
    348350    } 
    349351     
    350     readConfig(argv[0], chooseProfile); 
     352    readConfig(argv[0], chooseProfile, (chooseProfile == "default")); 
    351353     
    352354    // if the configuration includes path=, add that path 
     
    522524                if (masterConfig.find("liblink") != masterConfig.end() && 
    523525                    masterConfig["liblink"].find("oneatatime") != masterConfig["liblink"].end() && 
    524                     masterConfig["liblink"]["oneatatime"] != "yes") { 
     526                    masterConfig["liblink"]["oneatatime"] != "no") { 
    525527                    global.params.oneatatime = 1; 
    526528                } 
     
    531533                if (masterConfig.find("shliblink") != masterConfig.end() && 
    532534                    masterConfig["shliblink"].find("oneatatime") != masterConfig["shliblink"].end() && 
    533                     masterConfig["shliblink"]["oneatatime"] != "yes") { 
     535                    masterConfig["shliblink"]["oneatatime"] != "no") { 
    534536                    global.params.oneatatime = 1; 
    535537                } 
     
    540542                if (masterConfig.find("dyliblink") != masterConfig.end() && 
    541543                    masterConfig["dyliblink"].find("oneatatime") != masterConfig["dyliblink"].end() && 
    542                     masterConfig["dyliblink"]["oneatatime"] != "yes") { 
     544                    masterConfig["dyliblink"]["oneatatime"] != "no") { 
    543545                    global.params.oneatatime = 1; 
    544546                } 
     
    607609            { 
    608610                global.params.listobjfiles = 1; 
     611            } 
     612            else if (strcmp(p + 1, "keeprfiles") == 0) 
     613            { 
     614                global.params.keeprfiles = 1; 
    609615            } 
    610616            else if (strcmp(p + 1, "full") == 0) 
     
    677683        } 
    678684        } 
    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            } 
    708709        else if (strcmp(p + 1, "quiet") == 0) 
    709710            { 
     
    943944    global.params.link = 0; 
    944945 
     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 
    945954    if (global.params.link) 
    946955    { 
     
    955964    else 
    956965    { 
    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) 
    958970    { 
    959971        error("multiple source files, but only one .obj name"); 
     
    972984    //backend_init(); 
    973985     
    974     if (global.params.listfiles && 
     986    if ((global.params.listfiles || 
     987         global.params.listnffiles) && 
    975988        global.params.objname) { 
    976989        global.listout = fopen(global.params.objname, "w"); 
     
    10531066    p = (char *) files.data[i]; 
    10541067 
    1055 /*#if _WIN32 
     1068#if _WIN32 
    10561069    // Convert / to \ so linker will work 
    10571070    for (int j = 0; p[j]; j++) 
     
    10601073        p[j] = '\\'; 
    10611074    } 
    1062 #endif */ 
     1075#endif 
    10631076 
    10641077    p = FileName::name(p);      // strip path 
     
    15041517        printf("code      %s\n", m->toChars()); 
    15051518         
    1506         if (global.params.doDocComments) 
    1507             m->gendocfile(); 
     1519        /* if (global.params.doDocComments) 
     1520            m->gendocfile(); */ 
    15081521         
    15091522        // now possibly reflect this and add the reflected module as well 
     
    15351548                // now add the module to the list 
    15361549                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)); 
    15381551            } 
    15391552        } 
  • branches/tango/rebuild/mars.h

    r589 r654  
    4848    char listnffiles;   // list files which would be built but weren't found 
    4949    char listobjfiles;  // list object files which were built 
     50    char keeprfiles;    // keep response files 
    5051    char fullqobjs;     // use fully-qualified object names 
    5152    char fullqdocs;     // use fully-qualified document names 
  • branches/tango/rebuild/module.c

    r589 r654  
    264264    } 
    265265 
    266     m = new Module(filename, ident, 0, 0); 
     266    m = new Module(filename, ident, global.params.doDocComments, global.params.doHdrGeneration); 
    267267    m->loc = loc; 
    268268 
     
    827827            } else if (ds->isImport()) { 
    828828                Import *im = (Import *) ds; 
    829                 im->load(NULL); 
     829                im->load(this, NULL); 
    830830                im->mod->parsepragmas(); 
    831831                 
  • branches/tango/rebuild/rebuild.conf/dmd-posix

    r589 r654  
    4747[liblink] 
    4848safe=yes 
     49oneatatime=yes 
    4950cmd=ar rc $o $i 
    5051 
  • branches/tango/rebuild/rebuild.conf/dmd-posix-tango

    r589 r654  
    4848[liblink] 
    4949safe=yes 
     50oneatatime=yes 
    5051cmd=ar rc $o $i 
    5152 
  • branches/tango/rebuild/response.c

    r589 r654  
    8989} 
    9090 
    91 int systemResponse(const char *cmd, const char *rflag, const char *rfile
     91int systemResponse(const char *cmd, const char *rflag, const char *rfile, bool deleteRFile
    9292{ 
    9393    char *newcmd = mem.strdup(cmd); 
     
    126126    sprintf(newcmdr, "%s %s%s", newcmd, rflag, rfile); 
    127127    res = system(newcmdr); 
    128     remove(rfile); 
     128    if (deleteRFile) remove(rfile); 
    129129     
    130130    mem.free(newcmdr); 
  • branches/tango/rebuild/response.h

    r409 r654  
    1414void parseResponseFile(int *argc, char ***argv, char *rf, int argnum); 
    1515 
    16 int systemResponse(const char *cmd, const char *rflag, const char *rfile); 
     16int systemResponse(const char *cmd, const char *rflag, const char *rfile, bool deleteRFile); 
    1717 
    1818#endif