Skip to content

Commit 57a6234

Browse files
committed
Fetch submodules even when we're not in a git repo (for tarballs)
1 parent 2f4cdae commit 57a6234

File tree

10 files changed

+37
-8
lines changed

10 files changed

+37
-8
lines changed

M2/libraries/Makefile.library.in

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ ifneq ($(PARALLEL),yes)
1313
NOTPARALLEL = -j1
1414
endif
1515
LIBNAME ?= $(shell basename `pwd`)
16+
GIT_REF ?= v$(VERSION)
1617
UNTARDIR = build
1718
OLDUNTARDIR = build-old
1819
TARDIR ?= $(LIBNAME)-$(VERSION)
@@ -127,10 +128,27 @@ fetch: .submodule-updated
127128
$(MAKE) update-submodule
128129
touch $@
129130
update-submodule:
130-
@GIT@ submodule update --init @abs_top_srcdir@/submodules/$(LIBNAME)
131+
if git rev-parse 2> /dev/null; \
132+
then \
133+
@GIT@ submodule update --init \
134+
@abs_top_srcdir@/submodules/$(LIBNAME); \
135+
else \
136+
cd @abs_top_srcdir@/submodules; \
137+
rm -rf $(LIBNAME); \
138+
@GIT@ clone $(URL) $(LIBNAME); \
139+
cd $(LIBNAME); \
140+
@GIT@ checkout $(GIT_REF); \
141+
fi
142+
131143
clean::
132144
rm -f .submodule-updated
133-
@GIT@ submodule deinit @abs_top_srcdir@/submodules/$(LIBNAME)
145+
if git rev-parse 2> /dev/null; \
146+
then \
147+
@GIT@ submodule deinit @abs_top_srcdir@/submodules/$(LIBNAME); \
148+
else \
149+
rm -rf @abs_top_srcdir@/submodules/$(LIBNAME); \
150+
mkdir @abs_top_srcdir@/submodules/$(LIBNAME); \
151+
fi
134152
else
135153
fetch: $(TARFILE_DIR)/$(TARFILE)
136154
endif

M2/libraries/fflas_ffpack/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# This link is broken: http://linalg.org/projects/fflas-ffpack
55
# http://linalg.org/
66
SUBMODULE = true
7+
URL = https://github.com/linbox-team/fflas-ffpack
78
VERSION = 2.5.0
89
PRECONFIGURE = autoreconf -vif
910
PATCHFILE = @abs_srcdir@/patch-$(VERSION)

M2/libraries/flint/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
SUBMODULE = true
22
# LIBNAME = flint2
33
HOMEPAGE = http://flintlib.org
4-
# git://github.com/wbhart/flint2.git
4+
URL = https://github.com/flintlib/flint
55
VERSION = 3.3.1
66
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
77
PARALLEL = yes

M2/libraries/frobby/Makefile.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
SUBMODULE = true
33
LICENSEFILES = COPYING
44
# author: Bjarke Roune <[email protected]>
5+
URL = https://github.com/Macaulay2/frobby
56
VERSION = 0.9.5
7+
GIT_REF = 08e7cd9203
68
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
79

810
VPATH = @srcdir@

M2/libraries/gc/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
HOMEPAGE = http://www.hboehm.info/gc/
22
SUBMODULE = true
33
LIBNAME = bdwgc
4-
URL = http://www.hboehm.info/gc/gc_source/
4+
URL = https://github.com/ivmai/bdwgc.git
55
GITURL = https://github.com/ivmai/bdwgc/
66
VERSION = 8.2.8
77
LICENSEFILES = README.QUICK

M2/libraries/givaro/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ SUBMODULE = true
77
VLIMIT = 900000
88
MLIMIT = 900000
99

10-
VERSION = 4.2.0
10+
URL = https://github.com/linbox-team/givaro
11+
VERSION = 4.2.1
1112
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
1213
# the patch modifies test/Makefile.am, so we must remake test/Makefile.in
1314
PRECONFIGURE = autoreconf -vif

M2/libraries/gtest/Makefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
SUBMODULE = true
22
LIBNAME = googletest
3+
URL = https://github.com/google/googletest
34
VERSION = 1.16.0
45
CONFIGURECMD = cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DBUILD_GMOCK=OFF \
56
-DCMAKE_INSTALL_LIBDIR=lib

M2/libraries/mathic/Makefile.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
HOMEPAGE = https://github.com/broune/mathic
2+
URL = https://github.com/Macaulay2/mathic
23
SUBMODULE = true
34
VPATH = @srcdir@
4-
VERSION = 20250513-7abf77e4ce
5+
VERSION = 1.0~git20250513
6+
GIT_REF = 7abf77e4ce
57
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
68
PRECONFIGURE = autoreconf -i
79
CONFIGOPTIONS = --disable-shared

M2/libraries/mathicgb/Makefile.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
HOMEPAGE = https://github.com/broune/mathicgb
2+
URL = https://github.com/Macaulay2/mathicgb
23
SUBMODULE = true
34
VPATH = @srcdir@
4-
VERSION = 20250513-de13956492
5+
VERSION = 1.0~git20250513
6+
GIT_REF = de13956492
57
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
68
PRECONFIGURE = autoreconf -i
79
CONFIGOPTIONS = --disable-shared PKG_CONFIG_PATH=$(LIBRARIESDIR)/lib/pkgconfig

M2/libraries/memtailor/Makefile.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
SUBMODULE = true
22
HOMEPAGE = https://github.com/broune/memtailor
3+
URL = https://github.com/Macaulay2/memtailor
34
VPATH = @srcdir@
4-
VERSION = 20250513-07c84a6852
5+
VERSION = 1.0~git20250513
6+
GIT_REF = 07c84a6852
57
# PATCHFILE = @abs_srcdir@/patch-$(VERSION)
68
PRECONFIGURE = autoreconf -i
79
CONFIGOPTIONS = --disable-shared

0 commit comments

Comments
 (0)