From c3d879db8fcef5f1fda05caf9853d7d49f0a76c2 Mon Sep 17 00:00:00 2001 From: Vincent Vanlaer Date: Fri, 2 Aug 2024 14:10:23 -0400 Subject: [PATCH] forum: port to new build system --- forum/Makefile | 56 +++++++++++++++++++++++++++++++++++ forum/build_and_test | 7 ----- forum/build_and_test_parallel | 8 ----- forum/clean | 1 - forum/export | 2 -- forum/i1 | 1 - forum/i1p | 1 - forum/install | 8 ----- forum/make/makefile | 8 ----- forum/make/makefile_base | 37 ----------------------- forum/mk | 1 - forum/test/ck | 1 - forum/test/clean | 0 forum/test/cleanup | 2 -- forum/test/export | 2 -- forum/test/mk | 0 forum/test/rn | 4 --- install | 2 -- make/subdirs.mk | 2 +- touch | 1 - 20 files changed, 57 insertions(+), 87 deletions(-) create mode 100644 forum/Makefile delete mode 100755 forum/build_and_test delete mode 100755 forum/build_and_test_parallel delete mode 100755 forum/clean delete mode 100755 forum/export delete mode 100755 forum/i1 delete mode 100755 forum/i1p delete mode 100755 forum/install delete mode 100644 forum/make/makefile delete mode 100644 forum/make/makefile_base delete mode 100755 forum/mk delete mode 100755 forum/test/ck delete mode 100755 forum/test/clean delete mode 100755 forum/test/cleanup delete mode 100755 forum/test/export delete mode 100755 forum/test/mk delete mode 100755 forum/test/rn diff --git a/forum/Makefile b/forum/Makefile new file mode 100644 index 000000000..6e3cc4dbb --- /dev/null +++ b/forum/Makefile @@ -0,0 +1,56 @@ +include ../make/defaults-module.mk + +# Build + +MODULE_NAME := forum +SRCS := +SRCS_CHECK := +INTERNAL_DEPENDS_ON := +EXTERNAL_DEPENDS_ON := hdf5_fortran +BINTYPE := static-lib +INCLUDE_DIRS := + +# Testing + +CHECK_RESULTS_GOLDEN := test/test_output + +# Install + +MODULES := forum_m.mod +INSTALL_INCLUDES := + +include $(MAKE_DIR)/Makefile + +ifeq ($(PROFILE),debug) + FORUM_DEBUG = yes +else + FORUM_DEBUG = false +endif + +ifeq ($(MESASDK_ROOT),) + FPP=./fypp_deps +else + FPP= PYTHONPATH=$(MESASDK_ROOT)/lib/python ./fypp_deps +endif + +BUILD_DIR_FORUM_BUILD := $(BUILD_DIR_MODULE)/src +INSTALL_INCLUDES_BUILD += $(BUILD_DIR_MODULE)/include/forum.inc + +$(BUILD_DIR_FORUM_BUILD): forum-1.0.3.tar.gz | $(BUILD_DIR_FORUM_BUILD)/ $(BUILD_DIR_MODULE)/include/ + tar --strip-components=1 -xf $< -C $(BUILD_DIR_FORUM_BUILD) + cp $(BUILD_DIR_FORUM_BUILD)/src/include/forum.inc $(BUILD_DIR_MODULE)/include/forum.inc + +wrap-forum: $(BUILD_DIR_FORUM_BUILD) + $(MAKE) -C $(BUILD_DIR_FORUM_BUILD) SHARED=no DEBUG=$(FORUM_DEBUG) OMP=$(WITH_OPENMP) FPE=yes VERSION_CHECK=passed FPP="$(FPP)" LDFLAGS="$(LIB_DEP_ARGS)" FFLAGS="$(FLAGS_DEPS)" + +$(OBJ_OUT): wrap-forum | $(BUILD_DIR_MODULE)/lib/ + cp $(BUILD_DIR_FORUM_BUILD)/build/$(notdir $@) $@ + +$(BUILD_DIR_MODULE)/modules/forum_m.mod: wrap-forum | $(BUILD_DIR_MODULE)/modules/ + cp $(BUILD_DIR_FORUM_BUILD)/build/$(notdir $@) $@ + +check: + pushd test > /dev/null ; ../$(BUILD_DIR_FORUM_BUILD)/build/test_order > ../$(CHECK_RESULTS); popd > /dev/null + diff -b $(CHECK_RESULTS) $(CHECK_RESULTS_GOLDEN) + +.PHONY: wrap-forum diff --git a/forum/build_and_test b/forum/build_and_test deleted file mode 100755 index 39902ed56..000000000 --- a/forum/build_and_test +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -rm -rf forum -tar xf forum-1.0.3.tar.gz -mv forum-1.0.3 forum - -../utils/build_and_test diff --git a/forum/build_and_test_parallel b/forum/build_and_test_parallel deleted file mode 100755 index 44a4bd7f5..000000000 --- a/forum/build_and_test_parallel +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -rm -rf forum -tar xf forum-1.0.3.tar.gz -mv forum-1.0.3 forum - -../utils/build_and_test_parallel - diff --git a/forum/clean b/forum/clean deleted file mode 100755 index 356f57db5..000000000 --- a/forum/clean +++ /dev/null @@ -1 +0,0 @@ -cd make; make clean diff --git a/forum/export b/forum/export deleted file mode 100755 index db3250885..000000000 --- a/forum/export +++ /dev/null @@ -1,2 +0,0 @@ - -../utils/e1 diff --git a/forum/i1 b/forum/i1 deleted file mode 100755 index 8c377979b..000000000 --- a/forum/i1 +++ /dev/null @@ -1 +0,0 @@ -../utils/i1 diff --git a/forum/i1p b/forum/i1p deleted file mode 100755 index 75f0da679..000000000 --- a/forum/i1p +++ /dev/null @@ -1 +0,0 @@ -../utils/i1p diff --git a/forum/install b/forum/install deleted file mode 100755 index 9026e932d..000000000 --- a/forum/install +++ /dev/null @@ -1,8 +0,0 @@ -./build_and_test -if [ $? -ne 0 ] -then - exit 1 -fi -echo "export" -./export -echo "done" \ No newline at end of file diff --git a/forum/make/makefile b/forum/make/makefile deleted file mode 100644 index 2a4718cad..000000000 --- a/forum/make/makefile +++ /dev/null @@ -1,8 +0,0 @@ -# QUIET makes the output from the compilation process much less verbose -- basically, -# show which files are being compiled with which generic compilation command. The -# goal of QUIET is to make it easier to spot warnings and/or circular dependency -# errors. - -QUIET = yes - -include makefile_base diff --git a/forum/make/makefile_base b/forum/make/makefile_base deleted file mode 100644 index c83e1ff57..000000000 --- a/forum/make/makefile_base +++ /dev/null @@ -1,37 +0,0 @@ -# This is the makefile for the forum library - -MESA_DIR = ../.. - -################################################################# -# -# PREAMBLE - -include $(MESA_DIR)/utils/makefile_header - -################################################################# -# -# Hand off to ForUM build system - -MESA_LIB_DIR = $(MESA_DIR)/lib -MESA_INC_DIR = $(MESA_DIR)/include - -FORUM_DIR = ../forum - -ifeq ($(USE_SHARED), YES) - export SHARED = yes -else - export SHARED = no -endif - -all: - @$(MAKE) --no-print-directory -C $(FORUM_DIR) install - -install: - @$(CP_IF_NEWER) $(FORUM_DIR)/include/forum_m.mod $(MESA_INC_DIR)/ - @$(CP_IF_NEWER) $(FORUM_DIR)/include/forum.inc $(MESA_INC_DIR)/ - @$(CP_IF_NEWER) $(FORUM_DIR)/lib/libforum.a $(MESA_LIB_DIR)/ - -clean: - @$(MAKE) --no-print-directory -C $(FORUM_DIR) $@ - -.PHONY: install clean diff --git a/forum/mk b/forum/mk deleted file mode 100755 index f2ac277d6..000000000 --- a/forum/mk +++ /dev/null @@ -1 +0,0 @@ -cd make; make \ No newline at end of file diff --git a/forum/test/ck b/forum/test/ck deleted file mode 100755 index 2ef1f96b9..000000000 --- a/forum/test/ck +++ /dev/null @@ -1 +0,0 @@ -./../../utils/test/ck diff --git a/forum/test/clean b/forum/test/clean deleted file mode 100755 index e69de29bb..000000000 diff --git a/forum/test/cleanup b/forum/test/cleanup deleted file mode 100755 index 22f65cbab..000000000 --- a/forum/test/cleanup +++ /dev/null @@ -1,2 +0,0 @@ -cd ../make -make clean diff --git a/forum/test/export b/forum/test/export deleted file mode 100755 index 0f6ebc965..000000000 --- a/forum/test/export +++ /dev/null @@ -1,2 +0,0 @@ -cd .. -./export diff --git a/forum/test/mk b/forum/test/mk deleted file mode 100755 index e69de29bb..000000000 diff --git a/forum/test/rn b/forum/test/rn deleted file mode 100755 index 818a9d425..000000000 --- a/forum/test/rn +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -../forum/bin/test_order - diff --git a/install b/install index 60737e7e2..10d76bf28 100755 --- a/install +++ b/install @@ -306,8 +306,6 @@ function enum_procs { make -Oline -j$(enum_procs) check_okay -do_one_parallel forum - if [ ! -r data ] then echo diff --git a/make/subdirs.mk b/make/subdirs.mk index 31a3c7eb4..f7ebaad1c 100644 --- a/make/subdirs.mk +++ b/make/subdirs.mk @@ -1 +1 @@ -SUBDIRS := const utils math mtx auto_diff num interp_1d interp_2d chem eos +SUBDIRS := const utils math mtx auto_diff num interp_1d interp_2d chem eos forum diff --git a/touch b/touch index a4598cdf3..f29d596aa 100755 --- a/touch +++ b/touch @@ -25,7 +25,6 @@ do_one atm do_one binary do_one colors do_one gyre -do_one forum do_one ionization do_one kap do_one net