# HG changeset patch # User Aziz K?ksal # Date 1204133833 -3600 # Node ID b091e8b0ef5c063eb03f2f08624cd94cb311e343 # Parent 05dfe88dd3bbb59fc40aca8d3e0736e9e5b1359a Fixed and improved release.sh. Modified DDoc comments of modules in util/. diff -r 05dfe88dd3bb -r b091e8b0ef5c trunk/release.sh --- a/trunk/release.sh Wed Feb 27 02:12:59 2008 +0100 +++ b/trunk/release.sh Wed Feb 27 18:37:13 2008 +0100 @@ -5,13 +5,12 @@ exit; fi -NAME="dil" BUILD="./build" -DIR="$NAME.$1" -DEST="${BUILD}/$DIR" -FRESH_REPOS="fresh_repos" +DIR="dil.$1" +DEST="$BUILD/$DIR" +FRESH_REPOS="$BUILD/fresh_repos" -# Create build directory. +# Create build directory if it doesn't exist. [ ! -e $BUILD ] && mkdir $BUILD # Convert Unix newlines to Windows newlines @@ -22,19 +21,34 @@ # We need dil to get a list of all modules to be compiled. if [ ! -s ./dil ]; then - dsss build -full -w &> /dev/null + dsss build -full &> /dev/null fi + +if [ ! -s ./dil ]; then + echo "Couldn't build DIL. Can't get list of modules to be built." + exit; +fi + +# Used by doc generation and winbuild function. SRC_FILES=`./dil igraph src/main.d --paths` -function winbuild -{ - wine ~/bin/dmd.exe $SRC_FILES -odwinobj -ofdil $* -} + +# Recreate destination directory. +rm -rf $DEST +mkdir -p $DEST/{bin,doc/htmlsrc,src} -# Recreate destination director. -rm -rf $DEST -mkdir $DEST $DEST/bin $DEST/src +# Create documentation. +./dil ddoc $DEST/doc/ -v src/macros_dil.ddoc -version=DDoc src/config.d $SRC_FILES +# Generate syntax highlighted HTML files. +HTMLSRC="$DEST/doc/htmlsrc" +for filepath in $SRC_FILES; +do + htmlfile=`echo $filepath | sed -e 's@^src/@@' -e 's@/@.@g' -e 's@.d$@@'`.html + echo "FILE: $filepath > $HTMLSRC/$htmlfile"; + ./dil gen --lines --syntax --html $filepath > "$HTMLSRC/$htmlfile"; +done # Linux Debug +echo "***** Building Linux binaries *****" dsss build -clean -full -version=D2 cp dil $DEST/bin/dil2_d dsss build -clean -full @@ -46,7 +60,11 @@ cp dil $DEST/bin/dil if [ -s ~/bin/dmd.exe ]; then - echo "*** Building Windows Binaries ***\n" + echo "***** Building Windows binaries *****" + function winbuild + { # obj dir is winobj. -op = don't strip paths from obj files. + wine ~/bin/dmd.exe -odwinobj -op -ofdil $* $SRC_FILES + } # Windows Debug winbuild -version=D2 cp dil.exe $DEST/bin/dil2_d.exe @@ -60,16 +78,19 @@ fi # Copy source and other files. -rm -rf $BUILD/$FRESH_REPOS -hg archive -r tip -t files $BUILD/$FRESH_REPOS -cp -r $BUILD/$FRESH_REPOS/trunk/* $DEST +rm -rf $FRESH_REPOS +hg archive -r tip -t files $FRESH_REPOS +cp -r $FRESH_REPOS/trunk/* $DEST -cp $BUILD/$FRESH_REPOS/trunk/src/config.d $DEST/bin/ -cp $BUILD/$FRESH_REPOS/trunk/src/lang_*.d $DEST/bin/ +cp $FRESH_REPOS/trunk/src/config.d $DEST/bin/ +cp $FRESH_REPOS/trunk/src/lang_*.d $DEST/bin/ +cp $FRESH_REPOS/trunk/src/*_map.d $DEST/bin/ +cp $FRESH_REPOS/trunk/src/*.css $DEST/bin/ +cp $FRESH_REPOS/trunk/src/predefined.ddoc $DEST/bin/ +cp $FRESH_REPOS/trunk/src/html.css $HTMLSRC # Build archives -cd $BUILD # tar.gz doesn't compress well -tar --owner root --group root -czf $DIR.tar.gz $DIR -tar --owner root --group root --bzip2 -cf $DIR.tar.bz2 $DIR -zip -q -9 -r $DIR.zip $DIR +tar --owner root --group root -czf $DEST.tar.gz $DEST +tar --owner root --group root --bzip2 -cf $DEST.tar.bz2 $DEST +zip -q -9 -r $DEST.zip $DEST diff -r 05dfe88dd3bb -r b091e8b0ef5c trunk/src/util/metastrings.d --- a/trunk/src/util/metastrings.d Wed Feb 27 02:12:59 2008 +0100 +++ b/trunk/src/util/metastrings.d Wed Feb 27 18:37:13 2008 +0100 @@ -7,12 +7,12 @@ * Macros: * WIKI = Phobos/StdMetastrings * Copyright: - * Public Domain + * Public Domain. */ -/* +/** * Authors: - * Walter Bright, Digital Mars, www.digitalmars.com + * Walter Bright, Digital Mars, www.digitalmars.com$(BR) * Don Clugston */ diff -r 05dfe88dd3bb -r b091e8b0ef5c trunk/src/util/uni.d --- a/trunk/src/util/uni.d Wed Feb 27 02:12:59 2008 +0100 +++ b/trunk/src/util/uni.d Wed Feb 27 18:37:13 2008 +0100 @@ -18,6 +18,8 @@ * $(LINK2 http://www.unicode.org, The Unicode Consortium) * Trademarks: * Unicode(tm) is a trademark of Unicode, Inc. + * Copyright: + * Public Domain. */