Skip to content

Commit 71ceccc

Browse files
committed
Patch for newer FMS2 directory structure
- Uses `$(or )` macro to accommodate change in file locations - Added "clean.fms" targets to clean FMS objects in addition to "clean"
1 parent e215979 commit 71ceccc

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

coupled_AM2_LM3_SIS2/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,9 @@ $(TESTDIR)/%/test: $(BUILD)/coupler_main
285285
#----
286286
# Cleanup
287287

288-
.PHONY: clean
288+
.PHONY: clean clean.fms
289+
clean.fms: clean
290+
$(MAKE) -C ../shared/fms BUILD=$(abspath $(FMS_BUILD)) clean
289291
clean:
290292
$(MAKE) -C ../shared/AM2 BUILD=$(abspath $(AM2_BUILD)) clean
291293
$(MAKE) -C ../shared/LM3 BUILD=$(abspath $(LM3_BUILD)) clean

ice_ocean_SIS2/Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ EXCLUDE ?= \
3939
EXTRA_SRC_DIRS := \
4040
$(abspath ../src/SIS2/src) \
4141
$(abspath ../src/SIS2/config_src/external) \
42-
$(abspath ../src/coupler)
42+
$(or $(wildcard $(abspath ../src/coupler/full)) \
43+
$(wildcard $(abspath ../src/coupler/shared)), \
44+
$(abspath ../src/coupler) )
45+
# The above $(or ...) covers the transition from FMS1-era to FMS2-era versions
46+
# of the coupler. The latter has multiple versions of the main coupler.
4347

4448
CONFIG_FLAGS := --config-cache
4549
CONFIG_FLAGS += --srcdir=$(abspath $(MOM_CODEBASE))
@@ -281,7 +285,9 @@ $(TESTDIR)/%/test: $(BUILD)/coupler_main
281285
#----
282286
# Cleanup
283287

284-
.PHONY: clean
288+
.PHONY: clean clean.fms
289+
clean.fms: clean
290+
$(MAKE) -C ../shared/fms BUILD=$(abspath $(FMS_BUILD)) clean
285291
clean:
286292
$(MAKE) -C ../shared/atmos_null BUILD=$(abspath $(ATMOS_BUILD)) clean
287293
$(MAKE) -C ../shared/land_null BUILD=$(abspath $(LAND_BUILD)) clean

ocean_only/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ $(TESTDIR)/%/test: $(BUILD)/MOM6
265265
# Cleanup
266266

267267
# I probably need a rule in Makefile.in for all the autoconf stuff.
268-
.PHONY: clean
268+
.PHONY: clean clean.fms
269+
clean.fms: clean
270+
$(MAKE) -C ../shared/fms BUILD=$(abspath $(FMS_BUILD)) clean
269271
clean:
270272
rm -rf $(BUILD)
271273

0 commit comments

Comments
 (0)