Overview
Comment: | Now tidies up after itself. Major modifications to do a rep on a directory -- creates a book with each example as a chapter. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
ca59e34de838a1107c3b6264a63a9aea |
User & Date: | gawthrop@users.sourceforge.net on 1997-12-06 18:54:53 |
Other Links: | branch diff | manifest | tags |
Context
1997-12-06
| ||
19:10:41 | Reverted to tabular --- from supertabular check-in: 0fcba34b14 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
18:54:53 |
Now tidies up after itself. Major modifications to do a rep on a directory -- creates a book with each example as a chapter. check-in: ca59e34de8 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
16:22:10 | Added another argument - the label. check-in: 65647807eb user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt from [481cbf77ab] to [2097285bae].
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996. ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.99 1997/12/04 22:06:53 peterg ## Added view arguments for graph plotting ## ## Revision 1.98 1997/12/04 10:58:15 peterg ## Tidied up switches ## ## Revision 1.97 1997/12/04 10:44:33 peterg | > > > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Copyright (c) P.J.Gawthrop, 1989, 1990, 1991, 1993, 1994, 1995, 1996. ############################################################### ## Version control history ############################################################### ## $Header$ ## $Log$ ## Revision 1.100 1997/12/06 12:14:39 peterg ## Put a conditional around the PS data rep to check for set arguments. ## ## Revision 1.99 1997/12/04 22:06:53 peterg ## Added view arguments for graph plotting ## ## Revision 1.98 1997/12/04 10:58:15 peterg ## Tidied up switches ## ## Revision 1.97 1997/12/04 10:44:33 peterg |
︙ | ︙ | |||
365 366 367 368 369 370 371 | print=''; #Initialise list mtt_switches=''; #Look for a command line argument while [ -n "`echo $1 | grep '-'`" ]; do | < > | > > > > > > > | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 | print=''; #Initialise list mtt_switches=''; #Look for a command line argument while [ -n "`echo $1 | grep '-'`" ]; do case $1 in -q ) mtt_switches="$mtt_switches $1"; quiet=quiet;; -p ) mtt_switches="$mtt_switches $1"; print='-p';; -c ) mtt_switches="$mtt_switches $1"; computation=c ;; -o ) mtt_switches="$mtt_switches $1"; dae_is_ode=1 ;; -s ) mtt_switches="$mtt_switches $1"; switches=1 ;; -d ) directory=$2; cd $directory; shift ;; -l ) mtt_switches="$mtt_switches $1"; level=$2; shift ;; *) echo "$1 is an invalid argument - ignoring" ;; esac shift done |
︙ | ︙ | |||
421 422 423 424 425 426 427 428 429 430 431 432 433 434 | echo ' mtt <system_name> <representation> <language>' echo ' mtt <system_name> <representation> <language> <parameters>' echo 'Options: -q quiet mode' echo ' -p print environment variables' echo ' -c c-code generation' echo ' -o ode and dae are the same' echo ' -s use switch (ISW and CSW) components' exit fi fi if [ "$1" = "info" ] && [ "$3" = "" ]; then echo Invoking info | > | 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | echo ' mtt <system_name> <representation> <language>' echo ' mtt <system_name> <representation> <language> <parameters>' echo 'Options: -q quiet mode' echo ' -p print environment variables' echo ' -c c-code generation' echo ' -o ode and dae are the same' echo ' -s use switch (ISW and CSW) components' echo ' -d <dir> use directory <dir>' exit fi fi if [ "$1" = "info" ] && [ "$3" = "" ]; then echo Invoking info |
︙ | ︙ | |||
594 595 596 597 598 599 600 601 602 603 604 605 606 607 | find $path_name -name "$2.cr" -exec cp {} . \; fi exit fi # Save up the argument list in a file; but only if argument has changed ARGS=$4; _ARGS=_$4 #DIFF doesn't like empty files - so put a blank if empty if [ -z "$ARGS" ]; then ARGS=' '; _ARGS=''; fi cat > $1_args.new <<EOF | > | 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | find $path_name -name "$2.cr" -exec cp {} . \; fi exit fi # Save up the argument list in a file; but only if argument has changed ARGS=$4; _ARGS=_$4 #DIFF doesn't like empty files - so put a blank if empty if [ -z "$ARGS" ]; then ARGS=' '; _ARGS=''; fi cat > $1_args.new <<EOF |
︙ | ︙ | |||
684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 | VCext='r' ;; *) echo Version control is not appropriate for representation $2 exit ;; esac fi # This is the main mtt programme $MAKE -s -f - $1_$2.$3 << EOF # Cancel implicit rules I don't want %.dvi: %.tex # If level>0, try and get subsystem files ifneq ("$level","0") | > > > > > > > > > > | 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 | VCext='r' ;; *) echo Version control is not appropriate for representation $2 exit ;; esac fi # See if we are making a book -- ie representation rep on a directory if [ "$2" = "rep" ]; then book=`file $1 | awk '{print $2}' | grep directory` if [ -n "$book" ]; then book=book fi fi ################################ # This is the main mtt programme ################################ $MAKE -s -f - $1_$2.$3 << EOF # Cancel implicit rules I don't want %.dvi: %.tex # If level>0, try and get subsystem files ifneq ("$level","0") |
︙ | ︙ | |||
891 892 893 894 895 896 897 898 | cat $MTTPATH/trans/m/rcs_header.txt; \ echo 'END;'; \ )> $1_sspar.r #SUMMARY rep report (txt) #SUMMARY rep report (tex) #SUMMARY rep report (view) $1_rep.txt: | > > > > > > | > | 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 | cat $MTTPATH/trans/m/rcs_header.txt; \ echo 'END;'; \ )> $1_sspar.r #SUMMARY rep report (txt) #SUMMARY rep report (tex) #SUMMARY rep report (view) ifeq ($book,book) $1_rep.txt: dir2rep $1; else $1_rep.txt: echo Creating $1_rep.txt; ( \ echo "# Outline report file for system $1 ($1_rep.txt)"; \ cat $MTTPATH/trans/m/rcs_header.txt; \ echo "mtt $1 abg tex"; \ echo "mtt $1 struc tex"; \ echo "mtt $1 dae tex"; \ echo "mtt $1 dm tex"; \ echo "mtt $1 lmfr ps"; \ )> $1_rep.txt endif #SUMMARY rbg raw bond graph (m) #Raw bond graph: fig file to mfile $1_rbg.m: $1_abg.fig $1_lbl.txt rbg_fig2m $1 $1_cmp.m: $1_rbg.m $1_fig.fig: $1_rbg.m |
︙ | ︙ | |||
1279 1280 1281 1282 1283 1284 1285 | dat2gdat $1 $2 $4 #Generic conversion of Latex to latex document mtt.sty: echo Copying mtt.sty to here cp $MTTPATH/trans/mtt.sty . $1_$2.doc: $1_$2.tex | | | 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 | dat2gdat $1 $2 $4 #Generic conversion of Latex to latex document mtt.sty: echo Copying mtt.sty to here cp $MTTPATH/trans/mtt.sty . $1_$2.doc: $1_$2.tex makedoc "$mtt_switches" "$1" "$2" "$3" "$4" "$book" #Generic conversion of LaTeX doc to dvi $1_$2.dvi: $1_$2.doc echo Creating $1_$2.dvi latex $1_$2.doc > /dev/null; \ latex $1_$2.doc > /dev/null; |
︙ | ︙ | |||
1371 1372 1373 1374 1375 1376 1377 | $1_rep.make: $1_rep.txt $1_args.m rep_txt2make $1 "$mtt_switches" make_reps: rep_txt2sh $1; touch $1_rep.txt $1_rep.tex: $1_rep.txt make_reps | | | 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 | $1_rep.make: $1_rep.txt $1_args.m rep_txt2make $1 "$mtt_switches" make_reps: rep_txt2sh $1; touch $1_rep.txt $1_rep.tex: $1_rep.txt make_reps rep_txt2tex $1 "$book" "$directory"; #SUMMARY abg Acausal bond graph report (tex) $1_abg.tex: $1_sub.sh abg2tex $1 # Version control system - uses RCS RCS: |
︙ | ︙ | |||
1397 1398 1399 1400 1401 1402 1403 | nrutil.c: echo Copying nrutil.c; cp $MTTPATH/trans/c/nrutil.c . nrutil.h: echo Copying nrutil.h; cp $MTTPATH/trans/c/nrutil.h . sign.c: echo Copying sign.c; cp $MTTPATH/trans/c/sign.c . EOF | > > > > > > > | 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 | nrutil.c: echo Copying nrutil.c; cp $MTTPATH/trans/c/nrutil.c . nrutil.h: echo Copying nrutil.h; cp $MTTPATH/trans/c/nrutil.h . sign.c: echo Copying sign.c; cp $MTTPATH/trans/c/sign.c . EOF # Tidy up. # echo Removing log files and other garbage rm -f *_unique_raw_list *_raw_list rm -f mtt_error.txt mtt_info.txt a.out rm -f *.log mtt_info.txt warning.txt rm -f *_*.idx *_*.ind *_*.ilg *_*.dvi *_*.aux *_*.lof *_*.toc |