Changeset 589
- Timestamp:
- 05/09/07 03:51:23 (1 year ago)
- Files:
-
- branches/tango/DSSS.pmproj (copied) (copied from trunk/DSSS.pmproj)
- branches/tango/Resources (copied) (copied from trunk/Resources)
- branches/tango/Resources/License.rtf (copied) (copied from trunk/Resources/License.rtf)
- branches/tango/Resources/Welcome.rtf (copied) (copied from trunk/Resources/Welcome.rtf)
- branches/tango/candydoc.tar.gz (copied) (copied from trunk/candydoc.tar.gz)
- branches/tango/docs/ChangeLog (modified) (1 diff)
- branches/tango/docs/EMPTY (copied) (copied from trunk/docs/EMPTY)
- branches/tango/docs/INSTALL (modified) (1 diff)
- branches/tango/docs/NEWS (modified) (1 diff)
- branches/tango/docs/README (modified) (2 diffs)
- branches/tango/docs/README.macosx (copied) (copied from trunk/docs/README.macosx)
- branches/tango/docs/README.release (modified) (1 diff)
- branches/tango/docs/README.software_engineers (modified) (8 diffs)
- branches/tango/docs/README.technical (copied) (copied from trunk/docs/README.technical)
- branches/tango/docs/README.use (modified) (2 diffs)
- branches/tango/docs/dsss.1 (copied) (copied from trunk/docs/dsss.1)
- branches/tango/dsss.conf (modified) (1 diff)
- branches/tango/hcf/path.d (modified) (1 diff)
- branches/tango/hcf/process.d (modified) (8 diffs)
- branches/tango/rebuild/InstallMe.command (copied) (copied from trunk/rebuild/InstallMe.command)
- branches/tango/rebuild/Makefile (modified) (2 diffs)
- branches/tango/rebuild/access.c (modified) (1 diff)
- branches/tango/rebuild/aggregate.h (modified) (3 diffs)
- branches/tango/rebuild/arraytypes.h (modified) (3 diffs)
- branches/tango/rebuild/attrib.c (modified) (5 diffs)
- branches/tango/rebuild/attrib.h (modified) (1 diff)
- branches/tango/rebuild/cast.c (modified) (4 diffs)
- branches/tango/rebuild/class.c (modified) (5 diffs)
- branches/tango/rebuild/compile.c (modified) (1 diff)
- branches/tango/rebuild/complex_t.h (modified) (1 diff)
- branches/tango/rebuild/cond.c (modified) (2 diffs)
- branches/tango/rebuild/cond.h (modified) (1 diff)
- branches/tango/rebuild/config.c (modified) (1 diff)
- branches/tango/rebuild/constfold.c (modified) (12 diffs)
- branches/tango/rebuild/declaration.c (modified) (12 diffs)
- branches/tango/rebuild/declaration.h (modified) (9 diffs)
- branches/tango/rebuild/delegatize.c (modified) (2 diffs)
- branches/tango/rebuild/doc.c (modified) (2 diffs)
- branches/tango/rebuild/doc.h (modified) (1 diff)
- branches/tango/rebuild/dsss.conf (modified) (1 diff)
- branches/tango/rebuild/dsymbol.c (modified) (7 diffs)
- branches/tango/rebuild/dsymbol.h (modified) (2 diffs)
- branches/tango/rebuild/dump.c (modified) (1 diff)
- branches/tango/rebuild/entity.c (modified) (1 diff)
- branches/tango/rebuild/enum.c (modified) (1 diff)
- branches/tango/rebuild/enum.h (modified) (1 diff)
- branches/tango/rebuild/expression.c (modified) (39 diffs)
- branches/tango/rebuild/expression.h (modified) (5 diffs)
- branches/tango/rebuild/func.c (modified) (10 diffs)
- branches/tango/rebuild/hdrgen.c (modified) (1 diff)
- branches/tango/rebuild/hdrgen.h (modified) (1 diff)
- branches/tango/rebuild/html.c (modified) (1 diff)
- branches/tango/rebuild/html.h (modified) (1 diff)
- branches/tango/rebuild/identifier.c (modified) (1 diff)
- branches/tango/rebuild/identifier.h (modified) (1 diff)
- branches/tango/rebuild/idgen.c (modified) (3 diffs)
- branches/tango/rebuild/impcnvgen.c (modified) (1 diff)
- branches/tango/rebuild/import.c (modified) (1 diff)
- branches/tango/rebuild/import.h (modified) (1 diff)
- branches/tango/rebuild/inifile.c (modified) (1 diff)
- branches/tango/rebuild/init.c (modified) (4 diffs)
- branches/tango/rebuild/init.h (modified) (5 diffs)
- branches/tango/rebuild/inline.c (modified) (6 diffs)
- branches/tango/rebuild/interpret.c (modified) (40 diffs)
- branches/tango/rebuild/lexer.c (modified) (4 diffs)
- branches/tango/rebuild/lexer.h (modified) (3 diffs)
- branches/tango/rebuild/link.c (modified) (9 diffs)
- branches/tango/rebuild/macro.c (modified) (1 diff)
- branches/tango/rebuild/macro.h (modified) (1 diff)
- branches/tango/rebuild/mangle.c (modified) (7 diffs)
- branches/tango/rebuild/mars.c (modified) (42 diffs)
- branches/tango/rebuild/mars.h (modified) (6 diffs)
- branches/tango/rebuild/module.c (modified) (3 diffs)
- branches/tango/rebuild/module.h (modified) (2 diffs)
- branches/tango/rebuild/mtype.c (modified) (35 diffs)
- branches/tango/rebuild/mtype.h (modified) (2 diffs)
- branches/tango/rebuild/opover.c (modified) (3 diffs)
- branches/tango/rebuild/optimize.c (modified) (9 diffs)
- branches/tango/rebuild/parse.c (modified) (28 diffs)
- branches/tango/rebuild/parse.h (modified) (4 diffs)
- branches/tango/rebuild/port.h (modified) (1 diff)
- branches/tango/rebuild/rebuild.1 (copied) (copied from trunk/rebuild/rebuild.1)
- 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.conf/dmd-win (modified) (1 diff)
- branches/tango/rebuild/rebuild.conf/dmd-win-tango (modified) (1 diff)
- branches/tango/rebuild/response.c (modified) (3 diffs)
- branches/tango/rebuild/scope.c (modified) (4 diffs)
- branches/tango/rebuild/scope.h (modified) (2 diffs)
- branches/tango/rebuild/statement.c (modified) (21 diffs)
- branches/tango/rebuild/statement.h (modified) (1 diff)
- branches/tango/rebuild/staticassert.c (modified) (3 diffs)
- branches/tango/rebuild/staticassert.h (modified) (1 diff)
- branches/tango/rebuild/struct.c (modified) (3 diffs)
- branches/tango/rebuild/template.c (modified) (50 diffs)
- branches/tango/rebuild/template.h (modified) (12 diffs)
- branches/tango/rebuild/total.h (modified) (1 diff)
- branches/tango/rebuild/unialpha.c (modified) (1 diff)
- branches/tango/rebuild/utf.c (modified) (1 diff)
- branches/tango/rebuild/utf.h (modified) (1 diff)
- branches/tango/rebuild/version.c (modified) (1 diff)
- branches/tango/rebuild/version.h (modified) (1 diff)
- branches/tango/sss/build.d (modified) (10 diffs)
- branches/tango/sss/clean.d (modified) (4 diffs)
- branches/tango/sss/conf.d (modified) (10 diffs)
- branches/tango/sss/install.d (modified) (5 diffs)
- branches/tango/sss/main.d (modified) (8 diffs)
- branches/tango/sss/net.d (modified) (7 diffs)
- branches/tango/sss/uninstall.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/tango/docs/ChangeLog
r410 r589 1 SVN 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 17 0.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 29 0.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 40 0.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 57 0.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 65 0.60+0.18 from 0.59+0.17: 66 - Rebuild: Fixed a segfault bug. 67 68 0.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 78 0.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 82 0.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 93 0.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 1 105 0.55 from 0.54: 2 106 - Rebuild: Fixed a segfault bug. branches/tango/docs/INSTALL
r409 r589 3 3 work fine: 4 4 5 1) Get a D compiler. DMD version 0.166 or newer should work, GDC 0.20 (or the6 latest snapshot until 0.20 is released)should work.5 1) Get a D compiler. DMD version 1.0 or newer should work, GDC 0.22 or newer 6 should work. 7 7 8 8 2) If you currently have DSSS installed, UNINSTALL IT. To do this easily, just branches/tango/docs/NEWS
r410 r589 1 2007-04-22: DSSS and Rebuild 0.64 released. 2 3 2007-04-19: DSSS and Rebuild 0.63 released. 4 5 2007-04-18: DSSS and Rebuild 0.62 released. 6 7 2007-04-16: DSSS and Rebuild 0.61 released. 8 9 2007-04-14 (later): DSSS 0.60 released. 10 2007-04-14 (later): rebuild 0.18 released. 11 12 2007-04-14: DSSS 0.59 released. 13 2007-04-14: rebuild 0.17 released. 14 15 2007-04-12: DSSS 0.58 released. 16 2007-04-12: rebuild 0.16 released. 17 18 2007-04-10: DSSS 0.57 released. 19 2007-04-10: rebuild 0.15 released. 20 21 2007-03-19: DSSS 0.56 released. 22 2007-03-19: rebuild 0.14 released. 23 1 24 2007-02-26: DSSS 0.55 released. 2 25 branches/tango/docs/README
r409 r589 1 There are currently threeREADMEs:1 There are currently four READMEs: 2 2 3 3 1) README.overview, which doesn't provide much on how to actually use DSSS, but … … 7 7 3) README.software_engineers, for people maintaining software that they'd like 8 8 to use DSSS to build. 9 4) README.technical, which describes how DSSS works internally. branches/tango/docs/README.release
r410 r589 22 22 8) Update the wiki at dsource.org 23 23 24 9) (Optionally) post an announcement to the NG. 24 9) Update the source info at http://dsss.codu.org 25 26 10) (Optionally) post an announcement to the NG. branches/tango/docs/README.software_engineers
r409 r589 11 11 12 12 dsss.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 thename in13 can have any number of sections, each of which is headed with a name in 14 14 brackets, like so: 15 15 [foo/bar.d] 16 16 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 18 Most sections are named by a source file or directory. In general, sections 19 named for source files will generate binaries, and sections named for 20 directories will generate libraries. However, you can manually specify a 21 binary, library or sourcelibrary (like a library, but not compiled until it's 22 used in a binary) with the type setting: 23 [wholedirbinary] 23 24 type=binary 25 26 [onefilelibrary.d] 24 27 type=library 28 29 [onefilesrclib.d] 25 30 type=sourcelibrary 31 26 32 27 33 In each section, there can be any number of settings. Each setting is a 28 34 keyword, possibly followed by = or += and a value. For example, the "target" 29 35 setting sets the name of the output binary or library in a given section: 30 target=foobar 36 [main.d] 37 target=dzip 38 31 39 (In general, the target setting will be automatically set to something 32 40 sensible) 33 41 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 43 Sections creating libraries from directories will normally include all the .d 44 files in that directory or any subdirectory of it. You may also specify 45 subdirectories explicitly in dsss.conf, which will cause some .d files to be 46 reassigned. For example, if you have these files: 47 dzip/algorithm.d, foo/compression/zip.d 48 and a section: 49 [dzip] 50 then the produced library will include algorithm.d and zip.d. 51 If you have two sections: 52 [dzip] 53 [dzip/compression] 54 then two libraries will be produced: The library from 'dzip' will contain 55 algorithm.d, and the library from [dzip/compression] will contain zip.d. 56 57 58 Furthermore, content in dsss.conf can be set up as version-specific, with a 59 version keyword similar to the version keyword in D. For example, to make sure 60 that a certain binary is only produced on Windows: 37 61 version (Windows) { 38 [ foo/windows.d]39 target= foo_for_windows62 [dzip/windows.d] 63 target=dzip_for_windows 40 64 } 41 65 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: 66 The version keyword in dsss.conf also supports negation: 45 67 version (!Windows) { 46 [ foo/nowindows.d]47 target= foo_for_notwindows68 [dzip/nonwindows.d] 69 target=dzip_for_nonwindows 48 70 } 49 71 … … 57 79 } 58 80 59 60 There are quite a few other settings supported, such as: 81 The version statement in dsss.conf has a fairly strict syntax: the { must be on 82 the same line as the statement, and the version being tested must be in 83 parenthesis. 84 85 86 There are quite a few other settings supported: 61 87 62 88 * exclude … … 64 90 exclude=foo.d bar.d 65 91 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: 69 102 * .d files. If a .d file is specified as a command, it will be compiled and 70 103 run. … … 74 107 * install: DSSS has an internal 'install' command, which takes the 75 108 following syntax: 76 *install <file> <target directory>109 install <file> <target directory> 77 110 78 111 * eval: Run a command (.d file or otherwise), and execute its result … … 84 117 * You may use * to apply a setting to all sections, or simply exclude the 85 118 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 86 121 87 122 * add: Like set, but adds to a setting. … … 104 139 * This directory can also be used for .d files. 105 140 141 * $DOC_PREFIX : The prefix to which documentation is installed. 142 106 143 * $ETC_PREFIX : The prefix to which configuration files are being 107 144 installed. 108 109 * buildflags110 * Flags that will be added to the output to build/bud when building this111 section.112 145 113 146 … … 121 154 The important global settings are 'name' (which will otherwise be gleaned from 122 155 the 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. 156 With these settings, a dsss.conf file would conventionally look something like 157 this: 158 name = dzip 159 version = 1.0 160 [dzip.d] 161 target = dzip 162 163 164 There is also a global setting, "requires", which may be used to explicitly 165 list dependencies: 166 requires = bintod 167 In general, it is NOT necessary to use this setting, as DSSS will detect 168 dependencies based on what is imported from the D source. 169 170 171 It is possible to add a setting to all sections with the special [*] section: 172 name = dzip 173 version = 1.0 174 [*] 175 buildflags=-g 176 [main.d] 177 target = dzipper 178 [dzip] 126 179 127 180 … … 133 186 134 187 135 You can also recurse into subdirectories, by specifying the subdirectory as a 136 section and setting the type to"subdir":188 It is possible to have source files spread out through several directories, and 189 to support this in dsss.conf there is the special type "subdir": 137 190 [subtool] 138 191 type = subdir 139 192 193 Each subdirectory must have its own dsss.conf . Note that setting type=subdir 194 will cause DSSS to recurse into that directory, but will not cause that 195 directory to be visible at compile time. If you want that feature, you will 196 need to add -I flags to buildflags: 197 name = dzip 198 version = 1.0 199 [*] 200 buildflags=-g -Isubtool 201 [subtool] 202 type = subdir 203 [main.d] 204 target = dzipper 205 [dzip] 206 207 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. branches/tango/docs/README.use
r409 r589 18 18 can attain more information on them with the command: 19 19 $ dsss build --help 20 21 You can build only a specified target by simply adding it to the command line: 22 $ dsss build dzipper 23 24 Of particular use is the option --doc, which generates .html documentation from 25 DDoc comments of compiled libraries: 26 $ dsss build --doc 20 27 21 28 You can make DSSS remove all of the intermediate files it created, leaving only … … 42 49 $ dsss install --prefix=<directory> 43 50 51 If you generated documentation at build time, and would like to install that 52 documentation, use the --doc flag to `dsss install`: 53 $ dsss install --doc 54 44 55 You can also uninstall previously installed software. For example, to uninstall 45 56 the hypothetical package "dhello": branches/tango/dsss.conf
r409 r589 3 3 [*] 4 4 buildflags = -g 5 version (OSXUniversalBinary) { 6 buildflags += -arch ppc -arch i386 7 } 5 8 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] 10 preinstall = install candydoc.tar.gz $PREFIX/share/dsss 11 12 [+docs] 13 preinstall = 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] 23 type = sourcelibrary 10 24 11 25 [rebuild] branches/tango/hcf/path.d
r409 r589 103 103 char[] ret; 104 104 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 } 108 112 } else { 109 113 ret = origpath.dup; branches/tango/hcf/process.d
r409 r589 36 36 import std.stream; 37 37 38 import std.c.stdio; 38 39 import std.c.stdlib; 39 40 … … 146 147 } 147 148 148 uint readBlock(void* buffer, uint size)149 override size_t readBlock(void* buffer, size_t size) 149 150 { 150 151 version (Posix) { … … 169 170 } 170 171 171 uint writeBlock(void* buffer, uint size)172 override size_t writeBlock(void* buffer, size_t size) 172 173 { 173 174 version (Posix) { … … 189 190 } 190 191 191 ulong seek(long offset, SeekPos whence)192 override ulong seek(long offset, SeekPos whence) 192 193 { 193 194 throw new StreamException("Cannot seek in PStreams"); … … 259 260 { 260 261 int res; 262 fflush(stdout); fflush(stderr); 261 263 res = system(cmd); 262 264 if (res) // CyberShadow 2007.02.22: Display a message before exiting … … 264 266 int p = cmd.find(' '); 265 267 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); 268 270 } 269 271 } … … 273 275 { 274 276 writefln("+ %s", cmd); 277 fflush(stdout); fflush(stderr); 275 278 return system(cmd); 276 279 } … … 282 285 systemOrDie(cmd); 283 286 } 287 288 /** system + use a response file */ 289 int 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 */ 307 void 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 */ 321 int sayAndSystemR(char[] cmd, char[] rflag, char[] rfile) 322 { 323 writefln("+ %s", cmd); 324 return systemResponse(cmd, rflag, rfile); 325 } 326 327 /** systemROrDie + output */ 328 void saySystemRDie(char[] cmd, char[] rflag, char[] rfile) 329 { 330 writefln("+ %s", cmd); 331 systemROrDie(cmd, rflag, rfile); 332 } branches/tango/rebuild/Makefile
r409 r589 9 9 10 10 PREFIX=/usr 11 BINDIR=$(PREFIX)/bin 12 MANDIR=$(PREFIX)/share/man 13 DOCDIR=$(PREFIX)/share/doc 14 SYSCONFDIR=$(PREFIX)/etc 11 15 12 16 OBJS=\ … … 107 111 108 112 install: 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/ 115 122 ./instdymods $(PREFIX) 116 123 branches/tango/rebuild/access.c
r409 r589 3 3 // All Rights Reserved 4 4 // written by Walter Bright 5 // www.digitalmars.com5 // http://www.digitalmars.com 6 6 // License for redistribution is by either the Artistic License 7 7 // in artistic.txt, or the GNU General Public License in gnu.txt. branches/tango/rebuild/aggregate.h
r409 r589 4 4 // All Rights Reserved 5 5 // written by Walter Bright 6 // www.digitalmars.com6 // http://www.digitalmars.com 7 7 // License for redistribution is by either the Artistic License 8 8 // in artistic.txt, or the GNU General Public License in gnu.txt. … … 148 148 }; 149 149 150 #define CLASSINFO_SIZE (0x3C+ 8) // value of ClassInfo.size150 #define CLASSINFO_SIZE (0x3C+12) // value of ClassInfo.size 151 151 152 152 struct ClassDeclaration : AggregateDeclaration … … 157 157 ClassDeclaration *baseClass; // NULL only if this is Object 158 158 CtorDeclaration *ctor; 159 CtorDeclaration *defaultCtor; // default constructor 159 160 FuncDeclarations dtors; // Array of destructors 160 161 FuncDeclaration *staticCtor; branches/tango/rebuild/arraytypes.h
r409 r589 4 4 // All Rights Reserved 5 5 // written by Walter Bright 6 // www.digitalmars.com6 // http://www.digitalmars.com 7 7 // License for redistribution is by either the Artistic License 8 8 // in artistic.txt, or the GNU General Public License in gnu.txt. … … 24 24 struct TemplateParameter; 25 25 struct FuncDeclaration; 26 struct Identifier; 27 struct Initializer; 26 28 27 29 struct TemplateParameters : Array { }; … … 43 45 struct Arguments : Array { }; 44 46 47 struct Identifiers : Array { }; 48 49 struct Initializers : Array { }; 50 45 51 #endif branches/tango/rebuild/attrib.c
r409 r589 4 4 // All Rights Reserved 5 5 // written by Walter Bright 6 // www.digitalmars.com6 // http://www.digitalmars.com 7 7 // License for redistribution is by either the Artistic License 8 8 // in artistic.txt, or the GNU General Public License in gnu.txt. … … 747 747 748 748 e = e->semantic(sc); 749 e = e->optimize(WANTvalue | WANTinterpret); 749 750 if (e->op == TOKstring) 750 751 { … … 768 769 769 770 e = e->semantic(sc); 771 e = e->optimize(WANTvalue | WANTinterpret); 770 772 args->data[0] = (void *)e; 771 773 if (e->op != TOKstring) … … 848 850 { 849 851 Expression *e = (Expression *)args->data[i]; 850 852 853 char *toadd = NULL; 854 851 855 e = e->semantic(sc); 852 856 if (e->op == TOKstring) 853 857 { 854 858 StringExp *se = (StringExp *)e; 855 856 /* add this version flag to our own idea of versions, as857 * 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(); 860 864 } 861 865 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); 863 872 } 864 873 } 874 875 } else if (ident == Id::nolink) { 876 if (sc && sc->module) { 877 sc->module->nolink = 1; 878 } 879 865 880 } 866 881 … … 1184 1199 exp = exp->semantic(sc); 1185 1200 exp = resolveProperties(sc, exp); 1186 exp = exp->optimize(WANTvalue );1201 exp = exp->optimize(WANTvalue | WANTinterpret); 1187 1202 if (exp->op != TOKstring) 1188 1203 { error("argument to mixin must be a string, not (%s)", exp->toChars()); branches/tango/rebuild/attrib.h
r409 r589 4 4 // All Rights Reserved 5 5 // written by Walter Bright 6 // www.digitalmars.com6 // http://www.digitalmars.com 7 7 // License for redistribution is by either the Artistic License 8 8 // in artistic.txt, or the GNU General Public License in gnu.txt. branches/tango/rebuild/cast.c
r409 r589 3 3 // All Rights Reserved 4 4 // written by Walter Bright 5 // www.digitalmars.com5 // http://www.digitalmars.com 6 6 // License for redistribution is by either the Artistic License 7 7 // in artistic.txt, or the GNU General Public License in gnu.txt. … … 404 404 } 405 405 406 int AssocArrayLiteralExp::implicitConvTo(Type *t) 407 { MATCH result = MATCHexact; 408 409 Type *typeb = type->toBasetype(); 410 Type *tb = t->toBasetype(); <
