Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CCPP.mk for moving ccpp underneath FV3 #11

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/incmake/component_CCPP.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ ccpp_mk=$(CCPP_BINDIR)/ccpp.mk
all_component_mk_files+=$(ccpp_mk)

# Location of source code and installation
CCPP_SRCDIR?=$(ROOTDIR)/ccpp
CCPP_BINDIR?=$(ROOTDIR)/ccpp
CCPP_SRCDIR?=$(ROOTDIR)/FV3/ccpp
CCPP_BINDIR?=$(ROOTDIR)/FV3/ccpp

# Build directory - set to FV3 (later fv3atm) for old make (i.e. in-source) build
CCPP_BUILDDIR?=$(ROOTDIR)/FV3

# Make sure we have a model that supports CCPP:
ifeq (,$(findstring FV3,$(COMPONENTS)))
$(error CCPP requires FV3)
else
# Ensure the model is selected.
override CCPP_CONFOPT += --config=ccpp/config/ccpp_prebuild_config.py
override CCPP_CONFOPT += --config=$(CCPP_SRCDIR)/config/ccpp_prebuild_config.py --builddir=$(CCPP_BUILDDIR)
override CCPP_MAKEOPT ?= $(FV3_MAKEOPT)
override CCPP_BUILDOPT ?= $(FV3_BUILDOPT)
endif
Expand Down Expand Up @@ -47,7 +50,7 @@ $(ccpp_mk): configure
set -xue ; \
export PATH_CCPP="$(CCPP_SRCDIR)" ; \
cd $(ROOTDIR) ; \
./ccpp/framework/scripts/ccpp_prebuild.py $(CCPP_CONFOPT) ; \
$$PATH_CCPP/framework/scripts/ccpp_prebuild.py $(CCPP_CONFOPT) ; \
cd $$PATH_CCPP ; \
./build_ccpp.sh ${BUILD_TARGET} "$$PATH_CCPP" $(ccpp_mk) \
"$(CCPP_MAKEOPT)" NO NO ; \
Expand Down