Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
58 changes: 32 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,64 +1,70 @@
#
# make file to automate cloning svn externals into the git based cesm repo.
#
CAM_SVN = https://svn-ccsm-models.cgd.ucar.edu/cam1/branches/newtesting/models/atm/cam
CISM_SVN = https://svn-ccsm-models.cgd.ucar.edu/glc/branches/newtesting
CICE_SVN = https://svn-ccsm-models.cgd.ucar.edu/cice/branches/newtesting
CLM_SVN = https://svn-ccsm-models.cgd.ucar.edu/clm2/branches/newtesting/models/lnd/clm
POP_SVN = https://svn-ccsm-models.cgd.ucar.edu/pop2/branches/newtesting
RTM_SVN = https://svn-ccsm-models.cgd.ucar.edu/rivrtm/branches/newtesting
PIO_SVN = https://parallelio.googlecode.com/svn/trunk_tags/pio1_9_10/pio
WW3_SVN = https://svn-ccsm-models.cgd.ucar.edu/ww3/branches/newtesting

# arbitrary starting point to speed up clones
SVN_HIST=65000
GIT_SVN_CLONE = git svn clone --no-follow-parent --no-minimize-url -r$(SVN_HIST):HEAD

CAM_SVN := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*cam1.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)
CISM_SVN :=$(shell perl -ne 'next LINE unless /^(.*)\s+(.*u\/glc.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)
CICE_SVN :=$(shell perl -ne 'next LINE unless /^(.*)\s+(.*u\/cice.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)
CLM_SVN := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*clm2.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)
POP_SVN := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*u\/pop2.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)
RTM_SVN :=$(shell perl -ne 'next LINE unless /^(.*)\s+(.*rivrtm.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)
PIO_SVN := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*parallelio.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)
WW3_SVN := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*u\/ww3.*)/; print "$$2 $$1"' SVN_EXTERNAL_DIRECTORIES)


SVN_CO = svn co

# NOTE(bja, 2015-01) can probably do smarter things with the clone
# command using --trunk, --tags, --branches to pull in CESM specific
# layout.

CI_GIT = https://github.com/CESM-Development/CoupledInfrastructure.git
MCT_GIT = https://github.com/MCSclimate/MCT.git

CI_GIT := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*CoupledInfrastructure.*)/; print "$$1 $$2"' SVN_EXTERNAL_DIRECTORIES)
MCT_GIT := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*MCT.*)/; print "$$1 $$2"' SVN_EXTERNAL_DIRECTORIES)
CMAKE_GIT := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*CMake_Fortran.*)/; print "$$1 $$2"' SVN_EXTERNAL_DIRECTORIES)
GPTL_GIT := $(shell perl -ne 'next LINE unless /^(.*)\s+(.*jmrosinski.*)/; print "$$1 $$2"' SVN_EXTERNAL_DIRECTORIES)

default: git-subtrees clone-svn
clone-svn : cam-svn cism-svn cice-svn clm-svn pop-svn rtm-svn pio-svn ww3-svn

cam-svn : FORCE
$(SVN_CO) $(CAM_SVN) cesm/models/atm/cam
$(SVN_CO) $(CAM_SVN)

cism-svn : FORCE
$(SVN_CO) $(CISM_SVN) cesm/models/glc/cism
$(SVN_CO) $(CISM_SVN)

cice-svn : FORCE
$(SVN_CO) $(CICE_SVN) cesm/models/ice/cice
$(SVN_CO) $(CICE_SVN)

clm-svn : FORCE
$(SVN_CO) $(CLM_SVN) cesm/models/lnd/clm
$(SVN_CO) $(CLM_SVN)

pop-svn : FORCE
$(SVN_CO) $(POP_SVN) cesm/models/ocn/pop2
$(SVN_CO) $(POP_SVN)

rtm-svn : FORCE
$(SVN_CO) $(RTM_SVN) cesm/models/rof/rtm
$(SVN_CO) $(RTM_SVN)

pio-svn : FORCE
$(SVN_CO) $(PIO_SVN) cesm/models/utils/pio
$(SVN_CO) $(PIO_SVN)

ww3-svn : FORCE
$(SVN_CO) $(WW3_SVN) cesm/models/wav/ww3
$(SVN_CO) $(WW3_SVN)

# I think these were just one-off commands that don't have to be
# rerun, but I'm putting them here for documentation.
git-subtrees : coupled-infrastructure-git mct-git
git-subtrees : coupled-infrastructure-git mct-git cmake-git gptl-git

coupled-infrastructure-git :
git subtree add --prefix cesm $(CI_GIT) master
git subtree add --prefix $(CI_GIT)

mct-git :
git subtree add --prefix cesm/models/utils/mct $(MCT_GIT) NagFix_MCT_2.8.3
git subtree add --prefix $(MCT_GIT)

cmake-git :
git subtree add --prefix $(CMAKE_GIT)

gptl-git :
git subtree add --prefix $(GPTL_GIT)

# null rule to force things to happen
FORCE :
12 changes: 12 additions & 0 deletions SVN_EXTERNAL_DIRECTORIES
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cesm https://github.com/CESM-Development/CoupledInfrastructure/trunk
cesm/models/atm/cam https://svn-ccsm-models.cgd.ucar.edu/cam1/branches/newtesting/models/atm/cam
cesm/models/glc/cism https://svn-ccsm-models.cgd.ucar.edu/glc/branches/newtesting
cesm/models/ice/cice https://svn-ccsm-models.cgd.ucar.edu/cice/branches/newtesting
cesm/models/lnd/clm https://svn-ccsm-models.cgd.ucar.edu/clm2/branches/newtesting/models/lnd/clm
cesm/models/ocn/pop2 https://svn-ccsm-models.cgd.ucar.edu/pop2/branches/newtesting
cesm/models/rof/rtm https://svn-ccsm-models.cgd.ucar.edu/rivrtm/branches/newtesting
cesm/models/utils/mct https://github.com/MCSclimate/MCT/tags/NagFix_MCT_2.8.3
cesm/models/utils/pio https://parallelio.googlecode.com/svn/trunk_tags/pio1_9_10/pio
cesm/models/wav/ww3 https://svn-ccsm-models.cgd.ucar.edu/ww3/branches/newtesting
cesm/scripts/ccsm_utils/CMake https://github.com/CESM-Development/CMake_Fortran_utils/tags/CMake_Fortran_utils_141210b
cesm/models/utils/timing/gptl https://github.com/jmrosinski/GPTL/tags/v5.4.3
9 changes: 0 additions & 9 deletions cesm/models/utils/mct/.gitignore

This file was deleted.

51 changes: 0 additions & 51 deletions cesm/models/utils/mct/COPYRIGHT

This file was deleted.

33 changes: 0 additions & 33 deletions cesm/models/utils/mct/Makefile

This file was deleted.

89 changes: 0 additions & 89 deletions cesm/models/utils/mct/Makefile.conf.in

This file was deleted.

Loading