Skip to content

Commit

Permalink
Move autotools build script to main docker Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Nov 1, 2024
1 parent 8e12f62 commit 6bbbf06
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
13 changes: 13 additions & 0 deletions M2/BUILD/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ all: build run
clean:; [[ "$(BUILD_DIR)" =~ "M2/BUILD/build".* ]] && rm -rf $(M2_REPO)/$(BUILD_DIR)
clean-ccache: rm -rf $(STORAGE)/.ccache

## Script for building Macaulay2 (autotools)
define M2_BUILD_SCRIPT_autotools
set -xe

git config --global --add safe.directory $(M2_HOME)/M2
mkdir -p M2/$(BUILD_DIR)
cd M2/$(BUILD_DIR)
$(M2_HOME)/M2/M2/autogen.sh
$(M2_HOME)/M2/M2/configure $(CONFIG_OPTS)
make
endef
export M2_BUILD_SCRIPT_autotools

###############################################################################
# Build targets

Expand Down
15 changes: 1 addition & 14 deletions M2/BUILD/docker/rhel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,7 @@ BUILD_ARGS = --build-arg DISTRIBUTION=$(DISTRIBUTION) \
--build-arg RELEASE=$(RELEASE)
TAG = m2-$(BUILD)-$(DISTRIBUTION)-$(RELEASE)-build
BUILD_DIR = M2/BUILD/build-docker

## Script for building Macaulay2 (autotools)
define M2_BUILD_SCRIPT_autotools
set -xe

git config --global --add safe.directory $(M2_HOME)/M2
mkdir -p M2/$(BUILD_DIR)
cd M2/$(BUILD_DIR)
$(M2_HOME)/M2/M2/autogen.sh
$(M2_HOME)/M2/M2/configure --with-system-gc --enable-download --enable-rpm \
--prefix=/usr
make
endef
export M2_BUILD_SCRIPT_autotools
CONFIG_OPTS = --with-system-gc --enable-download --enable-rpm --prefix=/usr

###############################################################################
# Build targets
Expand Down

0 comments on commit 6bbbf06

Please sign in to comment.