MAP_DIR     := ./gmt

#--- flags for make
M_FLAGS     := --no-print-directory

all: maps
	@echo "done."

maps:
	@echo 'updating all maps in '$(MAP_DIR)
	@make $(M_FLAGS) -C $(MAP_DIR) all

#start your work day: 
#	1. update local copy of repository
#	2. get updated data
#	3. rerun make all to make sure we look at up-to-date maps
#this could theoretically go into the startup script of the machine for all projects
start-day:
	svn update
	rsync -avz --include="*/" --include="BEZ*" --include="BZ*" --exclude="*" ronni@fairweather.gps.alaska.edu:/gps/data/NEAsia2.5_timeseries/ ./data
	@make $(M_FLAGS) all
	
#start your work day: 
#	1. commit changes you made to project locally to repository
#	2. backup your data (well, that's kinda funky here)
#this could theoretically go into the shutdown script of the machine for all projects
end-day:
	svn commit
	rsync -avz --include="*/" --include="BEZ*" --include="BZ*" --exclude="*" ./data/ ronni@fairweather.gps.alaska.edu:/tmp

#assumes destination folder was created by user at some point
webupdate:
	rsync -r ./www ronni@fairweather.gps.alaska.edu:/export/ftpweb/ronni/projects/

clean:
	@make $(M_FLAGS) -C $(MAP_DIR) clean

