Changeset 589

Show
Ignore:
Timestamp:
05/09/07 03:51:23 (1 year ago)
Author:
Gregor
Message:

MERGE: trunk r588

Files:

Legend:

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

    r410 r589  
     1SVN from 0.64: 
     2        - Now exits with the proper exit code when a subcommand fails (see 
     3          ticket #58). 
     4        - Argument parsing now fails properly with invalid arguments before the 
     5          command. 
     6        - Now always fflush's before doing a system() call, to improve output. 
     7        - Rearranged build order to be a bit more explicit. 
     8        - Added the new technical README. 
     9        - Improved the process of making universal binaries for OS X. 
     10        - Rebuild: Added -notfound, which lists imports which correspond with 
     11          non-existing files. 
     12        - DSSS should now only install dependencies which are not handled (even 
     13          if they're handled externally to DSSS). 
     14        - Rebuild: Moved document generation back into rebuild. 
     15        - Rebuild: Support for pragma(nolink) (see ticket #57). 
     16 
     170.64 from 0.63: 
     18        - Rebuild: Added "rerun" mode, which acts like a more robust rdmd (see 
     19          ticket #28). 
     20        - Rebuild: <prefix>/include/d is always included automatically in the 
     21          import path, so that rebuild can be used more easily in isolation 
     22          with DSSS-installed software. 
     23        - Added `dsss net depslist` command. 
     24        - Made `dsss uninstall` explicitly require an argument. 
     25        - Rebuild: Fixed -K flag (see ticket #56). 
     26        - Rebuild: Made --prefix=<absolute path> work properly on Windows when 
     27          backslashes are used (see ticket #53). 
     28 
     290.63 from 0.62: 
     30        - Made OS X -arch, -isysroot and -framework flags work with dsss as 
     31          well as rebuild (see ticket #27). 
     32        - Improved documentation. 
     33        - Merged DMD 1.013. 
     34        - Rebuild: Added flags= variable to configuration files (see ticket #44). 
     35        - Added predigen and postdigen commands (see ticket #49). 
     36        - Made `dsss install` install rebuild's man page as well as DSSS' (see 
     37          ticket #47). 
     38        - Rebuild: Added -gui flag (see ticket #50). 
     39 
     400.62 from 0.61: 
     41        - Added man page for DSSS. 
     42        - Made --prefix and family work with relative paths (see ticket #37). 
     43        - Rebuild: No longer links the same library more than once in a row 
     44          (though it will still link it multiple times in total, due to 
     45          complexities of Posix linking) (see ticket #39). 
     46        - Rebuild: Made export_version accept an identifier as well as a string 
     47          (see ticket #40). 
     48        - Rebuild: Now closes the response file properly after using it (see 
     49          ticket #42). 
     50        - Rebuild: Now supports comments in response files (see ticket #43). 
     51        - Rebuild: Allow -arch and -isysroot flags on OS X (see ticket #27). 
     52        - Rebuild: Added path= variable to config files (see ticket #29). 
     53        - sources directory is now created during dsss install (see ticket #36). 
     54        - Rebuild: Executable file name is based on the first source file, not 
     55          the first object file (see ticket #44). 
     56 
     570.61 from 0.60+0.18: 
     58        - Rebuild: Fixed a (potential) segfault bug in rebuild with modules 
     59          with no module declaration. 
     60        - Rebuild: Made a bit less intolerant of modules with no module 
     61          declarations. 
     62        - Rebuild: Fixed some problems with dmd-win profile. 
     63        - Synchronized DSSS and Rebuild version numbers. 
     64 
     650.60+0.18 from 0.59+0.17: 
     66        - Rebuild: Fixed a segfault bug. 
     67 
     680.59+0.17 from 0.58+0.16: 
     69        - Made it possible to install list.list to /etc rather than 
     70          <prefix>/etc 
     71        - Rebuild: Added a man page. 
     72        - Rebuild: Made (independent) installation a bit more configurable. 
     73        - Added support for one-module [source]libraries. 
     74        - Integrated candydoc. 
     75        - Added --doc option, to automatically generate documentation for all 
     76          [source]libraries. 
     77 
     780.58+0.16 from 0.57+0.15: 
     79        - Rebuild: Updated DMD frontend version (to DMD 1.012). 
     80        - Removed util/macro.d, which doesn't work with DMD 1.012. 
     81 
     820.57+0.15 from 0.56+0.14: 
     83        - Rebuild: Updated DMD frontend version (to DMD 1.010). 
     84        - Fixed a bug with std.c.darwin.darwin vs std.c.unix.unix on OS X. 
     85        - Rebuild: -dc is now allowed in response files (see ticket #19) 
     86        - Rebuild: Fixed library linking order for DMD on Posix. 
     87        - Fixed problems with cross-compilation. 
     88        - Misc. bug fixes. 
     89        - Rebuild: Fixed -clean to only remove generated files. (see ticket #20) 
     90        - Rebuild: -J is now passed through properly. 
     91        - Rebuild: -g and -gc are now passed through properly. 
     92 
     930.56+0.14 from 0.55+0.13: 
     94        - Rebuild: Updated DMD frontend version. 
     95        - Patches to compile on x86_64 (NOT for rebuild yet) 
     96        - Uses response files when calling rebuild, for Windows bugs (ticket 
     97          #18) 
     98        - Added --bindir, --libdir, similar options. 
     99        - Rebuild: Added -n option (like make -n) 
     100        - Now looks for rebuild in $PATH, rather than just next to DSSS. 
     101        - Rebuild: Added -clean option (like bud's) 
     102        - Added one-file-at-a-time option for libraries on DMD+Windows 
     103          (according to Walter, the only reliable way to do this). 
     104 
    11050.55 from 0.54: 
    2106        - Rebuild: Fixed a segfault bug. 
  • branches/tango/docs/INSTALL

    r409 r589  
    33work fine: 
    44 
    5 1) Get a D compiler. DMD version 0.166 or newer should work, GDC 0.20 (or the 
    6    latest snapshot until 0.20 is released) should work. 
     51) Get a D compiler. DMD version 1.0 or newer should work, GDC 0.22 or newer 
     6   should work. 
    77 
    882) If you currently have DSSS installed, UNINSTALL IT. To do this easily, just 
  • branches/tango/docs/NEWS

    r410 r589  
     12007-04-22: DSSS and Rebuild 0.64 released. 
     2 
     32007-04-19: DSSS and Rebuild 0.63 released. 
     4 
     52007-04-18: DSSS and Rebuild 0.62 released. 
     6 
     72007-04-16: DSSS and Rebuild 0.61 released. 
     8 
     92007-04-14 (later): DSSS 0.60 released. 
     102007-04-14 (later): rebuild 0.18 released. 
     11 
     122007-04-14: DSSS 0.59 released. 
     132007-04-14: rebuild 0.17 released. 
     14 
     152007-04-12: DSSS 0.58 released. 
     162007-04-12: rebuild 0.16 released. 
     17 
     182007-04-10: DSSS 0.57 released. 
     192007-04-10: rebuild 0.15 released. 
     20 
     212007-03-19: DSSS 0.56 released. 
     222007-03-19: rebuild 0.14 released. 
     23 
    1242007-02-26: DSSS 0.55 released. 
    225 
  • branches/tango/docs/README

    r409 r589  
    1 There are currently three READMEs: 
     1There are currently four READMEs: 
    22 
    331) README.overview, which doesn't provide much on how to actually use DSSS, but 
     
    773) README.software_engineers, for people maintaining software that they'd like 
    88   to use DSSS to build. 
     94) README.technical, which describes how DSSS works internally. 
  • branches/tango/docs/README.release

    r410 r589  
    22228) Update the wiki at dsource.org 
    2323 
    24 9) (Optionally) post an announcement to the NG. 
     249) Update the source info at http://dsss.codu.org 
     25 
     2610) (Optionally) post an announcement to the NG. 
  • branches/tango/docs/README.software_engineers

    r409 r589  
    1111 
    1212dsss.conf is a plain-text file, with a similar syntax to Windows INI files. It 
    13 can have any number of sections, each of which is headed with the name in 
     13can have any number of sections, each of which is headed with a name in 
    1414brackets, like so: 
    1515[foo/bar.d] 
    1616 
    17 Each section is named by a source file or directory. In general, sections named 
    18 for source files will generate binaries, and sections named for directories 
    19 will generate libraries, which are set up through DSSS to be equivalent to D 
    20 packages. However, you can manually specify a binary, library or sourcelibrary 
    21 (like a library, but not compiled until it's used in a binary) with the type 
    22 setting: 
     17 
     18Most sections are named by a source file or directory. In general, sections 
     19named for source files will generate binaries, and sections named for 
     20directories will generate libraries. However, you can manually specify a 
     21binary, library or sourcelibrary (like a library, but not compiled until it's 
     22used in a binary) with the type setting: 
     23[wholedirbinary] 
    2324type=binary 
     25 
     26[onefilelibrary.d] 
    2427type=library 
     28 
     29[onefilesrclib.d] 
    2530type=sourcelibrary 
     31 
    2632 
    2733In each section, there can be any number of settings. Each setting is a 
    2834keyword, possibly followed by = or += and a value. For example, the "target" 
    2935setting sets the name of the output binary or library in a given section: 
    30 target=foobar 
     36[main.d] 
     37target=dzip 
     38 
    3139(In general, the target setting will be automatically set to something 
    3240sensible) 
    3341 
    34 Furthermore, any amount of content in dsss.conf can be set up as version- 
    35 specific, with a version keyword similar to the version keyword in D. For 
    36 example, to make sure that a certain binary is only produced on Windows: 
     42 
     43Sections creating libraries from directories will normally include all the .d 
     44files in that directory or any subdirectory of it. You may also specify 
     45subdirectories explicitly in dsss.conf, which will cause some .d files to be 
     46reassigned. For example, if you have these files: 
     47dzip/algorithm.d, foo/compression/zip.d 
     48and a section: 
     49[dzip] 
     50then the produced library will include algorithm.d and zip.d. 
     51If you have two sections: 
     52[dzip] 
     53[dzip/compression] 
     54then two libraries will be produced: The library from 'dzip' will contain 
     55algorithm.d, and the library from [dzip/compression] will contain zip.d. 
     56 
     57 
     58Furthermore, content in dsss.conf can be set up as version-specific, with a 
     59version keyword similar to the version keyword in D. For example, to make sure 
     60that a certain binary is only produced on Windows: 
    3761version (Windows) { 
    38  [foo/windows.d] 
    39  target=foo_for_windows 
     62 [dzip/windows.d] 
     63 target=dzip_for_windows 
    4064} 
    4165 
    42 The version statement in dsss.conf has a fairly strict syntax: the { must be on 
    43 the same line as the statement, and the version being tested must be in 
    44 parenthesis. Unlike D, DSSS' version statement supports the ! (not) operator: 
     66The version keyword in dsss.conf also supports negation: 
    4567version (!Windows) { 
    46  [foo/nowindows.d] 
    47  target=foo_for_notwindows 
     68 [dzip/nonwindows.d] 
     69 target=dzip_for_nonwindows 
    4870} 
    4971 
     
    5779} 
    5880 
    59  
    60 There are quite a few other settings supported, such as: 
     81The version statement in dsss.conf has a fairly strict syntax: the { must be on 
     82the same line as the statement, and the version being tested must be in 
     83parenthesis. 
     84 
     85 
     86There are quite a few other settings supported: 
    6187 
    6288* exclude 
     
    6490    exclude=foo.d bar.d 
    6591 
    66 * prebuild, preinstall, preclean, postbuild, postinstall, postclean 
    67   * Commands to be run before/after building/installing/cleaning. Can be any 
    68     number of ;-separated commands, and supports some special command types: 
     92* buildflags 
     93  * Flags that will be added to the command line for rebuild when building this 
     94    section. 
     95 
     96* prebuild, preinstall, preclean, predigen, postbuild, postinstall, postclean, 
     97  postdigen 
     98  * Commands to be run before or after (pre or post) building (build), 
     99    installing (install), cleaning (clean) or generating .di files (digen) for 
     100    the current section. Can be any number of ;-separated commands, and 
     101    supports some special command types: 
    69102    * .d files. If a .d file is specified as a command, it will be compiled and 
    70103      run. 
     
    74107    * install: DSSS has an internal 'install' command, which takes the 
    75108      following syntax: 
    76       * install <file> <target directory> 
     109      install <file> <target directory> 
    77110 
    78111    * eval: Run a command (.d file or otherwise), and execute its result 
     
    84117      * You may use * to apply a setting to all sections, or simply exclude the 
    85118        section (but still include the .) to set a global setting. 
     119      * This is most useful when used via eval, as in: 
     120        eval detectsettings.d 
    86121 
    87122    * add: Like set, but adds to a setting. 
     
    104139      * This directory can also be used for .d files. 
    105140 
     141    * $DOC_PREFIX : The prefix to which documentation is installed. 
     142 
    106143    * $ETC_PREFIX : The prefix to which configuration files are being 
    107144      installed. 
    108  
    109 * buildflags 
    110   * Flags that will be added to the output to build/bud when building this 
    111     section. 
    112145 
    113146 
     
    121154The important global settings are 'name' (which will otherwise be gleaned from 
    122155the directory name) and 'version' (which will otherwise be set to 'latest'). 
    123  
    124  
    125 It is possible to add a setting to all sections with the special [*] section. 
     156With these settings, a dsss.conf file would conventionally look something like 
     157this: 
     158name = dzip 
     159version = 1.0 
     160[dzip.d] 
     161target = dzip 
     162 
     163 
     164There is also a global setting, "requires", which may be used to explicitly 
     165list dependencies: 
     166requires = bintod 
     167In general, it is NOT necessary to use this setting, as DSSS will detect 
     168dependencies based on what is imported from the D source. 
     169 
     170 
     171It is possible to add a setting to all sections with the special [*] section: 
     172name = dzip 
     173version = 1.0 
     174[*] 
     175buildflags=-g 
     176[main.d] 
     177target = dzipper 
     178[dzip] 
    126179 
    127180 
     
    133186 
    134187 
    135 You can also recurse into subdirectories, by specifying the subdirectory as a 
    136 section and setting the type to "subdir": 
     188It is possible to have source files spread out through several directories, and 
     189to support this in dsss.conf there is the special type "subdir": 
    137190[subtool] 
    138191type = subdir 
    139192 
     193Each subdirectory must have its own dsss.conf . Note that setting type=subdir 
     194will cause DSSS to recurse into that directory, but will not cause that 
     195directory to be visible at compile time. If you want that feature, you will 
     196need to add -I flags to buildflags: 
     197name = dzip 
     198version = 1.0 
     199[*] 
     200buildflags=-g -Isubtool 
     201[subtool] 
     202type = subdir 
     203[main.d] 
     204target = dzipper 
     205[dzip] 
     206 
     207 
     208At build time, sections will be handled in the order that they appear in the 
     209dsss.conf file, with the exception that binaries are always built last. 
  • branches/tango/docs/README.use

    r409 r589  
    1818can attain more information on them with the command: 
    1919$ dsss build --help 
     20 
     21You can build only a specified target by simply adding it to the command line: 
     22$ dsss build dzipper 
     23 
     24Of particular use is the option --doc, which generates .html documentation from 
     25DDoc comments of compiled libraries: 
     26$ dsss build --doc 
    2027 
    2128You can make DSSS remove all of the intermediate files it created, leaving only 
     
    4249$ dsss install --prefix=<directory> 
    4350 
     51If you generated documentation at build time, and would like to install that 
     52documentation, use the --doc flag to `dsss install`: 
     53$ dsss install --doc 
     54 
    4455You can also uninstall previously installed software. For example, to uninstall 
    4556the hypothetical package "dhello": 
  • branches/tango/dsss.conf

    r409 r589  
    33[*] 
    44buildflags = -g 
     5version (OSXUniversalBinary) { 
     6    buildflags += -arch ppc -arch i386 
     7} 
    58 
    6 [+hcf] 
    7 preinstall = install hcf/env.d $INCLUDE_PREFIX/hcf ; \ 
    8 install hcf/path.d $INCLUDE_PREFIX/hcf ; \ 
    9 install hcf/process.d $INCLUDE_PREFIX/hcf 
     9[+candydoc] 
     10preinstall = install candydoc.tar.gz $PREFIX/share/dsss 
     11 
     12[+docs] 
     13preinstall = install docs/README $PREFIX/share/doc/dsss ; \ 
     14    install docs/README.overview $PREFIX/share/doc/dsss ; \ 
     15    install docs/README.use $PREFIX/share/doc/dsss ; \ 
     16    install docs/README.software_engineers $PREFIX/share/doc/dsss ; \ 
     17    install docs/README.technical $PREFIX/share/doc/dsss ; \ 
     18    install docs/dsss.1 $PREFIX/share/man/man1 ; \ 
     19    install rebuild/rebuild.1 $PREFIX/share/man/man1 ; \ 
     20    install docs/EMPTY $PREFIX/share/dsss/sources 
     21 
     22[hcf] 
     23type = sourcelibrary 
    1024 
    1125[rebuild] 
  • branches/tango/hcf/path.d

    r409 r589  
    103103    char[] ret; 
    104104     
    105     // replace any altsep with sep 
    106     if (altsep.length) { 
    107         ret = replace(origpath, altsep, sep); 
     105    version (Windows) { 
     106        // replace any altsep with sep 
     107        if (altsep.length) { 
     108            ret = replace(origpath, altsep, sep); 
     109        } else { 
     110            ret = origpath.dup; 
     111        } 
    108112    } else { 
    109113        ret = origpath.dup; 
  • branches/tango/hcf/process.d

    r409 r589  
    3636import std.stream; 
    3737 
     38import std.c.stdio; 
    3839import std.c.stdlib; 
    3940 
     
    146147    } 
    147148     
    148     uint readBlock(void* buffer, uint size) 
     149    override size_t readBlock(void* buffer, size_t size) 
    149150    { 
    150151        version (Posix) { 
     
    169170    } 
    170171     
    171     uint writeBlock(void* buffer, uint size) 
     172    override size_t writeBlock(void* buffer, size_t size) 
    172173    { 
    173174        version (Posix) { 
     
    189190    } 
    190191     
    191     ulong seek(long offset, SeekPos whence) 
     192    override ulong seek(long offset, SeekPos whence) 
    192193    { 
    193194        throw new StreamException("Cannot seek in PStreams"); 
     
    259260{ 
    260261    int res; 
     262    fflush(stdout); fflush(stderr); 
    261263    res = system(cmd); 
    262264    if (res)  // CyberShadow 2007.02.22: Display a message before exiting 
     
    264266        int p = cmd.find(' '); 
    265267        if(p!=-1) cmd=cmd[0..p]; 
    266         writefln("Command " ~ cmd ~ " returned with exitcode ", res, ", aborting."); 
    267         exit(res); 
     268        writefln("Command " ~ cmd ~ " returned with code ", res, ", aborting."); 
     269        exit(1); 
    268270    } 
    269271} 
     
    273275{ 
    274276    writefln("+ %s", cmd); 
     277    fflush(stdout); fflush(stderr); 
    275278    return system(cmd); 
    276279} 
     
    282285    systemOrDie(cmd); 
    283286} 
     287 
     288/** system + use a response file */ 
     289int systemResponse(char[] cmd, char[] rflag, char[] rfile) 
     290{ 
     291    int ret; 
     292    char[][] elems = std.string.split(cmd, " "); 
     293     
     294    /* the output is elems past 1 joined with \n */ 
     295    char[] resp = std.string.join(elems[1..$], "\n"); 
     296    std.file.write(rfile, resp); 
     297     
     298    fflush(stdout); fflush(stderr); 
     299    ret = system(elems[0] ~ " " ~ rflag ~ rfile); 
     300     
     301    std.file.remove(rfile); 
     302     
     303    return ret; 
     304} 
     305 
     306/** systemResponse + guarantee success */ 
     307void systemROrDie(char[] cmd, char[] rflag, char[] rfile) 
     308{ 
     309    int res; 
     310    res = systemResponse(cmd, rflag, rfile); 
     311    if (res)  // CyberShadow 2007.02.22: Display a message before exiting 
     312    { 
     313        int p = cmd.find(' '); 
     314        if(p!=-1) cmd=cmd[0..p]; 
     315        writefln("Command " ~ cmd ~ " returned with code ", res, ", aborting."); 
     316        exit(1); 
     317    } 
     318} 
     319 
     320/** systemResponse + output */ 
     321int sayAndSystemR(char[] cmd, char[] rflag, char[] rfile) 
     322{ 
     323    writefln("+ %s", cmd); 
     324    return systemResponse(cmd, rflag, rfile); 
     325} 
     326 
     327/** systemROrDie + output */ 
     328void saySystemRDie(char[] cmd, char[] rflag, char[] rfile) 
     329{ 
     330    writefln("+ %s", cmd); 
     331    systemROrDie(cmd, rflag, rfile); 
     332} 
  • branches/tango/rebuild/Makefile

    r409 r589  
    99 
    1010PREFIX=/usr 
     11BINDIR=$(PREFIX)/bin 
     12MANDIR=$(PREFIX)/share/man 
     13DOCDIR=$(PREFIX)/share/doc 
     14SYSCONFDIR=$(PREFIX)/etc 
    1115 
    1216OBJS=\ 
     
    107111 
    108112install: 
    109     mkdir -p $(PREFIX)/bin 
    110     mkdir -p $(PREFIX)/etc/rebuild 
    111     mkdir -p $(PREFIX)/share/doc/rebuild 
    112     cp -pf rebuild$(EXEEXT) $(PREFIX)/bin 
    113     cp -pRf rebuild.conf/* $(PREFIX)/etc/rebuild/ 
    114     cp -pf README $(PREFIX)/share/doc/rebuild 
     113    mkdir -p $(BINDIR) 
     114    mkdir -p $(MANDIR)/man1 
     115    mkdir -p $(DOCDIR)/rebuild 
     116    mkdir -p $(SYSCONFDIR)/rebuild 
     117    cp -pf rebuild$(EXEEXT) $(BINDIR) 
     118    ln -s rebuild$(EXEEXT) $(BINDIR)/rerun$(EXEEXT) 
     119    cp -rf rebuild.1 $(MANDIR)/man1 
     120    cp -pf README $(DOCDIR)/rebuild 
     121    cp -pRf rebuild.conf/* $(SYSCONFDIR)/rebuild/ 
    115122    ./instdymods $(PREFIX) 
    116123 
  • branches/tango/rebuild/access.c

    r409 r589  
    33// All Rights Reserved 
    44// written by Walter Bright 
    5 // www.digitalmars.com 
     5// http://www.digitalmars.com 
    66// License for redistribution is by either the Artistic License 
    77// in artistic.txt, or the GNU General Public License in gnu.txt. 
  • branches/tango/rebuild/aggregate.h

    r409 r589  
    44// All Rights Reserved 
    55// written by Walter Bright 
    6 // www.digitalmars.com 
     6// http://www.digitalmars.com 
    77// License for redistribution is by either the Artistic License 
    88// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    148148}; 
    149149 
    150 #define CLASSINFO_SIZE  (0x3C+8)  // value of ClassInfo.size 
     150#define CLASSINFO_SIZE  (0x3C+12) // value of ClassInfo.size 
    151151 
    152152struct ClassDeclaration : AggregateDeclaration 
     
    157157    ClassDeclaration *baseClass;    // NULL only if this is Object 
    158158    CtorDeclaration *ctor; 
     159    CtorDeclaration *defaultCtor;   // default constructor 
    159160    FuncDeclarations dtors;     // Array of destructors 
    160161    FuncDeclaration *staticCtor; 
  • branches/tango/rebuild/arraytypes.h

    r409 r589  
    44// All Rights Reserved 
    55// written by Walter Bright 
    6 // www.digitalmars.com 
     6// http://www.digitalmars.com 
    77// License for redistribution is by either the Artistic License 
    88// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    2424struct TemplateParameter; 
    2525struct FuncDeclaration; 
     26struct Identifier; 
     27struct Initializer; 
    2628 
    2729struct TemplateParameters : Array { }; 
     
    4345struct Arguments : Array { }; 
    4446 
     47struct Identifiers : Array { }; 
     48 
     49struct Initializers : Array { }; 
     50 
    4551#endif 
  • branches/tango/rebuild/attrib.c

    r409 r589  
    44// All Rights Reserved 
    55// written by Walter Bright 
    6 // www.digitalmars.com 
     6// http://www.digitalmars.com 
    77// License for redistribution is by either the Artistic License 
    88// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    747747 
    748748        e = e->semantic(sc); 
     749        e = e->optimize(WANTvalue | WANTinterpret); 
    749750        if (e->op == TOKstring) 
    750751        { 
     
    768769 
    769770        e = e->semantic(sc); 
     771        e = e->optimize(WANTvalue | WANTinterpret); 
    770772        args->data[0] = (void *)e; 
    771773        if (e->op != TOKstring) 
     
    848850        { 
    849851        Expression *e = (Expression *)args->data[i]; 
    850  
     852   
     853                char *toadd = NULL; 
     854                 
    851855        e = e->semantic(sc); 
    852856        if (e->op == TOKstring) 
    853857        { 
    854858            StringExp *se = (StringExp *)e; 
    855                      
    856                     /* add this version flag to our own idea of versions, as 
    857                      * well as the compile line */ 
    858                     VersionCondition::addPredefinedGlobalIdent((char *) se->string); 
    859                     addFlag(compileFlags, "compile", "version", "-version=$i", (char *) se->string); 
     859                    toadd = (char *) se->string; 
     860                } 
     861                else if (e->op == TOKidentifier) 
     862                { 
     863                    toadd = e->toChars(); 
    860864                } 
    861865                else 
    862                     error("string expected for export_version, not '%s'", e->toChars()); 
     866                    error("string or identifier expected for export_version, not '%s'", e->toChars()); 
     867                 
     868                /* add this version flag to our own idea of versions, as 
     869                 * well as the compile line */ 
     870                VersionCondition::addPredefinedGlobalIdent(toadd); 
     871                addFlag(compileFlags, "compile", "version", "-version=$i", toadd); 
    863872            } 
    864873        } 
     874         
     875    } else if (ident == Id::nolink) { 
     876        if (sc && sc->module) { 
     877            sc->module->nolink = 1; 
     878        } 
     879         
    865880    } 
    866881 
     
    11841199    exp = exp->semantic(sc); 
    11851200    exp = resolveProperties(sc, exp); 
    1186     exp = exp->optimize(WANTvalue); 
     1201    exp = exp->optimize(WANTvalue | WANTinterpret); 
    11871202    if (exp->op != TOKstring) 
    11881203    {   error("argument to mixin must be a string, not (%s)", exp->toChars()); 
  • branches/tango/rebuild/attrib.h

    r409 r589  
    44// All Rights Reserved 
    55// written by Walter Bright 
    6 // www.digitalmars.com 
     6// http://www.digitalmars.com 
    77// License for redistribution is by either the Artistic License 
    88// in artistic.txt, or the GNU General Public License in gnu.txt. 
  • branches/tango/rebuild/cast.c

    r409 r589  
    33// All Rights Reserved 
    44// written by Walter Bright 
    5 // www.digitalmars.com 
     5// http://www.digitalmars.com 
    66// License for redistribution is by either the Artistic License 
    77// in artistic.txt, or the GNU General Public License in gnu.txt. 
     
    404404} 
    405405 
     406int AssocArrayLiteralExp::implicitConvTo(Type *t) 
     407{   MATCH result = MATCHexact; 
     408 
     409    Type *typeb = type->toBasetype(); 
     410    Type *tb = t->toBasetype(); <