Skip to content

Commit

Permalink
forum: port to new build system
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentVanlaer committed Aug 26, 2024
1 parent e804bc8 commit c3d879d
Show file tree
Hide file tree
Showing 20 changed files with 57 additions and 87 deletions.
56 changes: 56 additions & 0 deletions forum/Makefile
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions forum/build_and_test

This file was deleted.

8 changes: 0 additions & 8 deletions forum/build_and_test_parallel

This file was deleted.

1 change: 0 additions & 1 deletion forum/clean

This file was deleted.

2 changes: 0 additions & 2 deletions forum/export

This file was deleted.

1 change: 0 additions & 1 deletion forum/i1

This file was deleted.

1 change: 0 additions & 1 deletion forum/i1p

This file was deleted.

8 changes: 0 additions & 8 deletions forum/install

This file was deleted.

8 changes: 0 additions & 8 deletions forum/make/makefile

This file was deleted.

37 changes: 0 additions & 37 deletions forum/make/makefile_base

This file was deleted.

1 change: 0 additions & 1 deletion forum/mk

This file was deleted.

1 change: 0 additions & 1 deletion forum/test/ck

This file was deleted.

Empty file removed forum/test/clean
Empty file.
2 changes: 0 additions & 2 deletions forum/test/cleanup

This file was deleted.

2 changes: 0 additions & 2 deletions forum/test/export

This file was deleted.

Empty file removed forum/test/mk
Empty file.
4 changes: 0 additions & 4 deletions forum/test/rn

This file was deleted.

2 changes: 0 additions & 2 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ function enum_procs {
make -Oline -j$(enum_procs)
check_okay

do_one_parallel forum

if [ ! -r data ]
then
echo
Expand Down
2 changes: 1 addition & 1 deletion make/subdirs.mk
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion touch
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3d879d

Please sign in to comment.