Changeset 570 for GCM

Show
Ignore:
Timestamp:
07/20/06 22:00:33 (2 years ago)
Author:
mankoff
Message:

exe auto-generates .R from template; added debug target

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • GCM/GSO/trunk/Makefile

    r564 r570  
    1313        @echo "make exe          # create executable (startexe)" 
    1414        @echo "make start        # start the model (E)" 
     15        @echo "make debug        # start in gdb" 
    1516        @echo "make stop         # stop the model (fort.3)" 
    1617        @echo "make kill         # stop the model (SIGHUP)" 
     
    2324        cd code/; $(MAKE) clean 
    2425 
    25 exe: $(RUNID).R 
     26exe: 
    2627        ./startexe $(RUNID) 
     28        sed s/GSOtemplate/$(RUNID)/g GSOtemplate.R > $(RUNID).R     # create .R 
    2729        sed s/GSOtemplate/$(RUNID)/g GSOtemplate/E > ./$(RUNID)/E       # create E 
    2830        chmod u+x ./$(RUNID)/E 
     
    3234        @echo " " 
    3335        @echo " " 
    34         @echo " " 
    35         @echo " " 
    36         @echo "move & customize I, fort.1, fort.2, etc. files to ./$(RUNID)" 
    37         @echo "then: make start" 
     36        @echo "1) customize I and $(RUNID).R in ./$(RUNID)" 
     37        @echo "2) place fort.1 and fort.2 files in ./$(RUNID)" 
     38        @echo "3) make start RUNID=$(RUNID)" 
    3839        @echo " " 
    3940 
     
    4647        cd $(RUNID); ./E 
    4748 
     49debug: 
     50        @echo " " 
     51        @echo "Note: You should compile with the debug options enabled" 
     52        @echo "  ex: $ make clean; make build FFFLAGS=-g; make exe RUNID=$(RUNID)" 
     53        @echo "      then re-run 'make debug RUNID=$(RUNID)'" 
     54        @echo " " 
     55        cd $(RUNID); \ 
     56        ./$(RUNID)ln; \ 
     57        echo "set args < I > $(RUNID).gdb.$$.PRT" > ./gdb.cmds; \ 
     58        echo "run" >> ./gdb.cmds; \ 
     59        gdb -x ./gdb.cmds ./$(RUNID).exe; \ 
     60        ./$(RUNID)uln 
     61 
    4862stop: 
    4963        @perl -e 'open(F3,">./$(RUNID)/fort.3"); print F3 pack("i a8 i",8,$(RUNID),8);'