Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/make-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build distribution tarballs
on: workflow_dispatch

jobs:
make-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install build dependencies
run: |
sudo add-apt-repository -y ppa:macaulay2/macaulay2
sudo apt-get install -y 4ti2 autoconf automake bison ca-certificates cohomcalg coinor-csdp fflas-ffpack flex g++ gdbmtool gfan gfortran git install-info libboost-dev libboost-regex-dev libboost-stacktrace-dev libcdd-dev libeigen3-dev libffi-dev libflint-dev libfplll-dev libfrobby-dev libgc-dev libgdbm-dev libgivaro-dev libglpk-dev libgmp-dev libgtest-dev liblzma-dev libmathic-dev libmathicgb-dev libmemtailor-dev libmpfi-dev libmpfr-dev libmps-dev libnauty-dev libncurses-dev libnormaliz-dev libntl-dev libopenblas-dev libpython3-dev libreadline-dev libsingular-dev libtbb-dev libtool-bin libxml2-dev lrslib make msolve nauty normaliz patch pkgconf python3 r-base singular-data time topcom wget zlib1g-dev
- name: Build Macaulay2
run: |
cd M2/BUILD/build
../../autogen.sh
../../configure --with-system-libs --with-fplll
make -j$(nproc 2>/dev/null || sysctl -n hw.logicalcpu)
- name: Make distribution tarballs
run: |
cd M2/BUILD/build
make dist
make doc-dist
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: dist-tarballs
path: |
M2/BUILD/build/*.tar.gz
2 changes: 2 additions & 0 deletions M2/Macaulay2/packages/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,10 @@ unmark-$1: ; rm -rf @pre_libm2dir@/$1/.installed
@echo "make: Leaving directory \`$(shell pwd)/$1-temporary'"
ls -l $1-temporary
rm -rf $1-temporary
ifeq ($(filter info, @DOCUMENTATION@), info)
if [ -e @pre_infodir@/$1.info ]; then \
@INSTALL_INFO@ --info-dir=@pre_infodir@ @pre_infodir@/$1.info; fi
endif
@ [ "${IgnoreExampleErrors}" = true -o -f $$@ ] || (echo error: file $$@ not made by installPackage >&2; false)
check-info::@pre_infodir@/$1.info.errors
@pre_infodir@/$1.info.errors: @pre_infodir@/$1.info
Expand Down
30 changes: 30 additions & 0 deletions M2/Makefile.doc-dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
prefix ?= /usr/local
exec_prefix ?= $(prefix)
datadir ?= $(prefix)/share
libdir ?= $(exec_prefix)/lib

PACKAGES := $(patsubst dump/%.dump, %, $(wildcard dump/*.dump))
ENDIAN := $(shell printf '\x61\x62\x63\x64' | od -An -tx4 -N4 | tr -d ' \n' | \
awk '{if($$0=="61626364") print "abcd"; else print "dcba"}')
POINTER_SIZE := $(shell expr $(shell getconf LONG_BIT) / 8)
DB_FILENAME = rawdocumentation-$(ENDIAN)-$(POINTER_SIZE).db
DB_FILES := $(patsubst %, lib/Macaulay2/%/cache/$(DB_FILENAME), $(PACKAGES))

all: $(DB_FILES)

lib/Macaulay2/%/cache/$(DB_FILENAME): dump/%.dump
mkdir -p $(@D)
gdbm_load $< $@

install:
mkdir -p $(DESTDIR)$(datadir)
cp -r share/* $(DESTDIR)$(datadir)
mkdir -p $(DESTDIR)$(libdir)
cp -r lib/* $(DESTDIR)$(libdir)

clean:
rm -rf lib

# Local Variables:
# mode: makefile
# End:
56 changes: 55 additions & 1 deletion M2/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
include include/config.Makefile
VPATH = @srcdir@
.PRECIOUS:@srcdir@/configure config.status
.PHONY:unconfigure-libs reconfigure configure-help report-M2-location help scripts
.PHONY: unconfigure-libs reconfigure configure-help report-M2-location help \
scripts dist doc-dist
all install: \
check-make config.status configured check-for-undefined-configure-variables \
srcdir protect-configs configured-files check-machine \
Expand Down Expand Up @@ -62,6 +63,7 @@ clean:
rm -f M2 srcdir .link-test srcdir confdefs.h configure.lineno conftest.* include/config.h
rm -rf usr-dist conf_* usr-host
rm -f pre-install.sh post-install.sh normal-install.sh
rm -f $(DIST_NAME).tar.gz $(DOC_DIST_NAME).tar.gz

install: configured; $(MAKE) -C distributions $@
@srcdir@/configure : @srcdir@/configure.ac @srcdir@/m4/files; @srcdir@/autogen.sh
Expand Down Expand Up @@ -130,6 +132,56 @@ report-M2-location:
validate-html:
$(MAKE) -C Macaulay2/packages $@

DIST_NAME = @PACKAGE_TARNAME@-@PACKAGE_VERSION@

dist: $(DIST_NAME).tar.gz

$(DIST_NAME)/M2:
mkdir -p $@/include/M2
cp @top_srcdir@/configure $@
cp @top_srcdir@/install-sh $@
cp @top_srcdir@/config.guess $@
cp @top_srcdir@/config.sub $@
cp @top_srcdir@/include/M2/config.h.in $@/include/M2

$(DIST_NAME).tar.gz: $(DIST_NAME)/M2
git submodule update --init @top_srcdir@/Macaulay2/editors/emacs
cd @top_srcdir@/.. && @GIT@ archive \
--prefix=$(DIST_NAME)/ \
-o @abs_builddir@/M2.tar HEAD
cd @top_srcdir@/Macaulay2/editors/emacs && @GIT@ archive \
--prefix=$(DIST_NAME)/M2/Macaulay2/editors/emacs/ \
-o @abs_builddir@/M2-emacs.tar HEAD
@TAR@ -Af M2.tar M2-emacs.tar
@TAR@ -rf M2.tar $(DIST_NAME)
gzip M2.tar
mv M2.tar.gz $@
rm -rf M2-emacs.tar $(DIST_NAME)

DOC_DIST_NAME = @PACKAGE_TARNAME@-docs-@PACKAGE_VERSION@

doc-dist: $(DOC_DIST_NAME).tar.gz

$(DOC_DIST_NAME).tar.gz:
$(MAKE) -C Macaulay2/packages
mkdir -p $(DOC_DIST_NAME)/share/doc
cp -r @pre_docdir@ $(DOC_DIST_NAME)/share/doc
cp -r @pre_infodir@ $(DOC_DIST_NAME)/share
mkdir -p $(DOC_DIST_NAME)/dump
for PACKAGE_DIR in @pre_libm2dir@/*; \
do \
PACKAGE=$$(basename $$PACKAGE_DIR); \
if test -d @pre_libm2dir@/$$PACKAGE/cache; \
then cd @pre_libm2dir@/$$PACKAGE/cache; \
gdbm_dump rawdocumentation-*.db \
@abs_builddir@/$(DOC_DIST_NAME)/dump/$$PACKAGE.dump; \
fi; \
done
cp @srcdir@/Makefile.doc-dist $(DOC_DIST_NAME)/Makefile
@TAR@ -czf $@ $(DOC_DIST_NAME)
rm -rf $(DOC_DIST_NAME)


announce:
@ echo "================================================================="
@ echo " Macaulay2 version @PACKAGE_VERSION@"
Expand Down Expand Up @@ -158,6 +210,8 @@ help:
@ echo " check run the tests"
@ echo " clean remove all generated files except configured files"
@ echo " distclean remove all generated files"
@ echo " dist generate a source tarball for distribution"
@ echo " doc-dist generate a tarball containing the M2 docs"
@ echo " help show this help"
@ echo ""
@ echo "targets for all libraries:"
Expand Down
6 changes: 5 additions & 1 deletion M2/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,18 @@ fi
AC_ARG_ENABLE([documentation],
[AS_HELP_STRING([--enable-documentation=...],
[space-delimited list of types of documentation to build; available
options are "html", "info", and "pdf"; default value is "html info"])],
options are "html", "info", and "pdf"; default value is "html info".
"download" will download pre-generated documentation])],
[DOCUMENTATION=$enableval],
[DOCUMENTATION="html info"])

if test "$DOCUMENTATION" = no
then DOCUMENTATION=""
elif test "$DOCUMENTATION" = yes
then DOCUMENTATION="html info"
elif test "$DOCUMENTATION" = download
then DOCUMENTATION=""
BUILDLIST="$BUILDLIST Macaulay2-docs"
else for DOCTYPE in $DOCUMENTATION
do case $DOCTYPE in
html|pdf)
Expand Down
8 changes: 8 additions & 0 deletions M2/libraries/Macaulay2-docs/Makefile.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
VERSION = @PACKAGE_VERSION@

CONFIGURECMD = :

INSTALLTARGET = install prefix=@pre_prefix@ exec_prefix=@pre_exec_prefix@

include ../Makefile.library
Makefile: @srcdir@/Makefile.in ; cd ../.. && ./config.status libraries/Macaulay2-docs/Makefile
2 changes: 1 addition & 1 deletion M2/libraries/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ BUILT_TARGETS = patch fetch all check unconfigure reinstall
ALL_TARGETS = $(BUILT_TARGETS) clean distclean
all:fetch
$(ALL_TARGETS): Makefile.library
$(foreach d,@LIBLIST@ @PROGLIST@ libtool M2, \
$(foreach d,@LIBLIST@ @PROGLIST@ M2 Macaulay2-docs, \
$(foreach t, $(ALL_TARGETS), \
$(eval $t-in-$d:; + $$(MAKE) -C $d $t) \
$(eval .PHONY: $t $t-in-$d)))
Expand Down
22 changes: 20 additions & 2 deletions M2/libraries/Makefile.library.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ifneq ($(PARALLEL),yes)
NOTPARALLEL = -j1
endif
LIBNAME ?= $(shell basename `pwd`)
GIT_REF ?= v$(VERSION)
UNTARDIR = build
OLDUNTARDIR = build-old
TARDIR ?= $(LIBNAME)-$(VERSION)
Expand Down Expand Up @@ -127,10 +128,27 @@ fetch: .submodule-updated
$(MAKE) update-submodule
touch $@
update-submodule:
@GIT@ submodule update --init @abs_top_srcdir@/submodules/$(LIBNAME)
if git rev-parse 2> /dev/null; \
then \
@GIT@ submodule update --init \
@abs_top_srcdir@/submodules/$(LIBNAME); \
else \
cd @abs_top_srcdir@/submodules; \
rm -rf $(LIBNAME); \
@GIT@ clone $(URL) $(LIBNAME); \
cd $(LIBNAME); \
@GIT@ checkout $(GIT_REF); \
fi

clean::
rm -f .submodule-updated
@GIT@ submodule deinit @abs_top_srcdir@/submodules/$(LIBNAME)
if git rev-parse 2> /dev/null; \
then \
@GIT@ submodule deinit @abs_top_srcdir@/submodules/$(LIBNAME); \
else \
rm -rf @abs_top_srcdir@/submodules/$(LIBNAME); \
mkdir @abs_top_srcdir@/submodules/$(LIBNAME); \
fi
else
fetch: $(TARFILE_DIR)/$(TARFILE)
endif
Expand Down
1 change: 1 addition & 0 deletions M2/libraries/fflas_ffpack/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# This link is broken: http://linalg.org/projects/fflas-ffpack
# http://linalg.org/
SUBMODULE = true
URL = https://github.com/linbox-team/fflas-ffpack
VERSION = 2.5.0
PRECONFIGURE = autoreconf -vif
PATCHFILE = @abs_srcdir@/patch-$(VERSION)
Expand Down
2 changes: 1 addition & 1 deletion M2/libraries/flint/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SUBMODULE = true
# LIBNAME = flint2
HOMEPAGE = http://flintlib.org
# git://github.com/wbhart/flint2.git
URL = https://github.com/flintlib/flint
VERSION = 3.3.1
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
PARALLEL = yes
Expand Down
2 changes: 2 additions & 0 deletions M2/libraries/frobby/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
SUBMODULE = true
LICENSEFILES = COPYING
# author: Bjarke Roune <[email protected]>
URL = https://github.com/Macaulay2/frobby
VERSION = 0.9.5
GIT_REF = 08e7cd9203
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)

VPATH = @srcdir@
Expand Down
2 changes: 1 addition & 1 deletion M2/libraries/gc/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HOMEPAGE = http://www.hboehm.info/gc/
SUBMODULE = true
LIBNAME = bdwgc
URL = http://www.hboehm.info/gc/gc_source/
URL = https://github.com/ivmai/bdwgc.git
GITURL = https://github.com/ivmai/bdwgc/
VERSION = 8.2.8
LICENSEFILES = README.QUICK
Expand Down
3 changes: 2 additions & 1 deletion M2/libraries/givaro/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ SUBMODULE = true
VLIMIT = 900000
MLIMIT = 900000

VERSION = 4.2.0
URL = https://github.com/linbox-team/givaro
VERSION = 4.2.1
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
# the patch modifies test/Makefile.am, so we must remake test/Makefile.in
PRECONFIGURE = autoreconf -vif
Expand Down
1 change: 1 addition & 0 deletions M2/libraries/gtest/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUBMODULE = true
LIBNAME = googletest
URL = https://github.com/google/googletest
VERSION = 1.16.0
CONFIGURECMD = cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DBUILD_GMOCK=OFF \
-DCMAKE_INSTALL_LIBDIR=lib
Expand Down
4 changes: 3 additions & 1 deletion M2/libraries/mathic/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
HOMEPAGE = https://github.com/broune/mathic
URL = https://github.com/Macaulay2/mathic
SUBMODULE = true
VPATH = @srcdir@
VERSION = 20250513-7abf77e4ce
VERSION = 1.0~git20250513
GIT_REF = 7abf77e4ce
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
PRECONFIGURE = autoreconf -i
CONFIGOPTIONS = --disable-shared
Expand Down
4 changes: 3 additions & 1 deletion M2/libraries/mathicgb/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
HOMEPAGE = https://github.com/broune/mathicgb
URL = https://github.com/Macaulay2/mathicgb
SUBMODULE = true
VPATH = @srcdir@
VERSION = 20250513-de13956492
VERSION = 1.0~git20250513
GIT_REF = de13956492
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
PRECONFIGURE = autoreconf -i
CONFIGOPTIONS = --disable-shared PKG_CONFIG_PATH=$(LIBRARIESDIR)/lib/pkgconfig
Expand Down
4 changes: 3 additions & 1 deletion M2/libraries/memtailor/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
SUBMODULE = true
HOMEPAGE = https://github.com/broune/memtailor
URL = https://github.com/Macaulay2/memtailor
VPATH = @srcdir@
VERSION = 20250513-07c84a6852
VERSION = 1.0~git20250513
GIT_REF = 07c84a6852
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
PRECONFIGURE = autoreconf -i
CONFIGOPTIONS = --disable-shared
Expand Down
1 change: 1 addition & 0 deletions M2/m4/files
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ distributions/deb/macaulay2/preinst
libraries/Makefile
libraries/4ti2/Makefile
libraries/M2/Makefile
libraries/Macaulay2-docs/Makefile
libraries/Makefile.library
libraries/cddlib/Makefile
libraries/cddplus/Makefile
Expand Down
Loading