The following pages might be of use:
cd $METRO; make checkjunk
to look for
files that are in the tree but not added to the makefile.
In the makefile, files are added to JSRC
or MISC_FILES
. Usually we only add files
that are being shipped. We do this step in the main branch
so that when we do it later, we don't have to update makefiles in
both the main branch and the release branch.
cd $METRO/doc make intall find codeDoc -type f -print > /tmp/htmlfiles cat `cat /tmp/htmlfiles` > /tmp/allhtmlfiles spell /tmp/allhtmlfilesIf you have access to the Ptolemy tree, use
$PTII/util/testsuite/ptspell
instead of spell.
cd $METRO make glimpseand then search the glimpse index:
glimpse -H $METRO foobar
cd $METRO make clean make -k JAVAC=gcj34 JFLAGS="-O2 -Wunused -Wextraneous-semicolon -Wno-deprecated -C" all >& make.out &
if (foo == bar) return;Right:
if (foo == bar) { return; }The reason this is important is because if one does
if (foo == bar) System.out.println("About to return"); return;then the return is not part of the if statement.
We indent using Jalopy to add braces and then reindent using jindent or Eclipse
To set up Jalopy:
http://jalopy.sourceforge.net/download.html
bin
, docs
and lib
in the current
directory, so be sure to unzip it inside an empty directory.
http://jalopy.sourceforge.net/plugin-console.html
bin/preferences.sh
c:/Program: not foundYou may need to edit
bin/preferences.sh
and put double
quotes around JAVACMD
in the last line:
"$JAVACMD" -classpath "$LOCALCLASSPATH" de.hunsicker.jalopy.swing.SettingsDialog
c:/Documents and Settings/username/.jalopy
If things get confusing, you may want to remove that directory
and start bin/preferences.sh
over again
- In the "Jalopy Settings" window, under Printer -> Braces
-> Misc, click all the boxes in the Insert braces section
- Disable sorting: under Printer -> Sorting -> Declarations.
uncheck "Sort class elements"
If sorting is not disabled, then the fields will be before the methods
- Change the wrapping so we wrap before operators:
under Printer -> Wrapping, in the Policy section, select
"Wrap before operators"
- Close the Jalopy Settings window, you are now ready to indent
$PTII/adm/copyright/fixcopyrights
(not shipped with
the release) and update the copyrights on the .java
, .tcl
and makefiles
$PTII/adm/copyright/chkcopyright
on all the files.
find . -type f -print > ~/tmp/ff sh ~ptII/adm/copyright/chkcopyright `cat ~/tmp/ff | grep -v .class | grep -v codeDoc | grep -v xml | grep -v alljtests.tcl | grep -v .htm | grep -v qcf | grep -v .dtd | grep -v gif`
$METRO/util/testsuite/jindent
.
cd $METRO adm/bin/metrotxtfiles | egrep '.java$' > /tmp/jfiles
/tmp/jfilesand remove any files that are generated by tools. These files include
src/metropolis/metamodel/frontend/lexer/Lexer.java
src/metropolis/metamodel/MetaModelVisitor.java
src/metropolis/metamodel/nodetypes/*java
xargs
command to run jindent
on all the files, but don't actually do the indent, just
show what would be done.
cat /tmp/jfiles | xargs $METRO/util/testsuite/jindent -n >& /tmp/jindent.out
/tmp/jindent.out
and update
/tmp/jfiles
accordingly. Also, watch out for
java files that do a trailing new line as the last character.
-n
option:
cat /tmp/jfiles | xargs $METRO/util/testsuite/jindent >& /tmp/jindent.out
.mmm
files in a similar fashion:
cd $METRO adm/bin/metrotxtfiles | egrep '.mmm$' > /tmp/mfiles cat /tmp/mfiles | xargs $METRO/util/testsuite/mmmindent -n >& /tmp/mindent.outand then check
/tmp/mindent.out
and then run:
cat /tmp/mfiles | xargs $METRO/util/testsuite/mmmindent >& /tmp/mindent.out
$METRO/util/testsuite/cindent
cd $METRO; make -k update tests >& make.out
and look for test errors
To make a branch for 2.0-beta, use the following command:
cd $METRO cvs tag -b rel-2-0-betaThen check out the release branch with
cd ~/src cvs co -r rel-2-0-beta metro mv metro metropolis-2-0-beta
METRO
to the new location:
setenv METRO ~/src/metropolis-2-0-beta
cd $METRO; make sources
and fix accordingly.
cd $METRO; make checkjunk
and either
add files or directories to the makefile or else remove
them from the cvs branch.
$METRO/adm/gen-latest/makefile
includes rules to
build tar files. For each major release, we increment
latest
, create a new directory and copy
the old files in. The reason to do this is so that we can have
both the nightly build and the release build available without using
branches.
For example, if the next release was 2.0
, we would do
cd $METRO/adm mkdir gen-2.0 cvs add gen-2.0 cd gen-2.0 cp ../gen-1.1/{makefile,src.ex,src1.ex,findclean} . cvs add makefile src.ex src1.ex findclean cvs commit -m "Setting up for 2.0"
make USER=$USER METROHOME=$METRO clean all test>& make.out &
cd ~/src cvs co -r rel-2-0-beta metro mv metro metropolis-2-0-beta export METRO c:/cxh/src/metropolis-2-0-beta cd $METRO/adm/gen-2.0 make USER=$USER METROHOME=/cygdrive/c/cxh/src/metropolis-2-0-beta clean all test>& make.out &The zip up the contents of the
src/
directory.
Last Updated: $Date: 2005/03/14 22:45:23 $