Skip to content

Commit 14b4d29

Browse files
committed
Testing: Use the top-level configure
The .testing/ Makefile was reworked to use the top-level configure. This prevents much of the redundant copying of configure.ac and m4/ macros.
1 parent f6fe9a6 commit 14b4d29

1 file changed

Lines changed: 8 additions & 21 deletions

File tree

.testing/Makefile

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -309,34 +309,21 @@ $(BUILD)/opt_target: | $(TARGET_CODEBASE)
309309
.PHONY: FORCE
310310

311311

312-
## Use autoconf to construct the Makefile for each target
313-
# TODO: This could all be moved to a top-level MOM6 Makefile
312+
# Use autoconf to construct the Makefile for each target
313+
314314
.PRECIOUS: $(BUILD)/%/Makefile
315-
.PRECIOUS: $(BUILD)/%/Makefile.in
316-
.PRECIOUS: $(BUILD)/%/configure
317315
.PRECIOUS: $(BUILD)/%/config.status
318-
.PRECIOUS: $(BUILD)/%/configure.ac
319-
.PRECIOUS: $(BUILD)/%/m4/
320316

321-
$(BUILD)/%/Makefile: $(BUILD)/%/Makefile.in $(BUILD)/%/config.status
317+
$(BUILD)/%/Makefile: $(BUILD)/%/config.status
322318
cd $(@D) && ./config.status
323319

324-
$(BUILD)/%/config.status: $(BUILD)/%/configure $(DEPS)/lib/libFMS.a $(DEPS)/lib/libgsw.a $(DEPS)/lib/libcvmix.a
325-
cd $(@D) && $(MOM_ENV) ./configure -n --srcdir=$(CODEBASE) $(MOM_ACFLAGS) \
320+
$(BUILD)/%/config.status: $(DEPS)/lib/libFMS.a
321+
$(BUILD)/%/config.status: $(DEPS)/lib/libgsw.a
322+
$(BUILD)/%/config.status: $(DEPS)/lib/libcvmix.a
323+
$(BUILD)/%/config.status: | $(BUILD)/%/
324+
cd $(@D) && $(MOM_ENV) ../../../configure -n $(MOM_ACFLAGS) \
326325
|| (cat config.log && false)
327326

328-
$(BUILD)/%/Makefile.in: ../ac/Makefile.in | $(BUILD)/%/
329-
cp ../ac/Makefile.in $(@D)
330-
331-
$(BUILD)/%/configure: $(BUILD)/%/configure.ac $(BUILD)/%/m4/
332-
autoreconf -if $(@D)
333-
334-
$(BUILD)/%/configure.ac: ../ac/configure.ac | $(BUILD)/%/
335-
cp ../ac/configure.ac $(@D)
336-
337-
$(BUILD)/%/m4/: ../ac/m4/ | $(BUILD)/%/
338-
cp -r ../ac/m4 $(@D)
339-
340327
ALL_EXECS = symmetric asymmetric repro openmp opt opt_target coupled nuopc \
341328
cov unit timing
342329
$(foreach b,$(ALL_EXECS),$(BUILD)/$(b)/):

0 commit comments

Comments
 (0)