aboutsummaryrefslogtreecommitdiff
path: root/reproduce/software/make/basic.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2026-07-20 20:20:56 +0200
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2026-07-20 22:07:00 +0200
commitab5e0aa9fa8a6b94b1306fa120736b6fbb1a2f70 (patch)
tree34a36afe78cdc244d22b6ad1f0037dd0c0138db0 /reproduce/software/make/basic.mk
parent4cfa34b1e101adcd050a476307b7680db8afcd8e (diff)
IMPORTANT: better names for to-publish dirs and portability fixesHEADmaneage
Summary: this commit only affects the analysis of your project in case you used the 'tex-publish-dir' or 'data-publish-dir' directories. They need to be renamed to 'figdir' and 'drdir' respectively. Until now, the directories containing the to-be-published data were described deep in the middle of 'initialize.mk' (away from the other shared directories), they also had hard-to-use (long) names. Furthermore, 'README-hacking.md' that is the main documentation of Maneage had grown organically, such that the checklists were scattered across the file and some things were repeated or not classified clearly. Finally, some portability issues were reported by Stergios Amarantidis and Diana Korotun. With this commit, the to-be-published directories have been renamed to the more simple names of 'figdir' and 'drdir' respectively and their definition in 'initialize.mk' has come right under the rest of the top-level directories (to be easily found). Furthermore, the 'README-hacking.md' has been fully restructured to be easier to navigate and follow for a new reader. Finally, the portability issues mentioned above have been addressed: - Within the '--help' output of './project', the '--keep-going' option was listed under "Configure and Make options", while it is only relevant as a Make option. It was therefore moved under Make options. - We had not explicitly set the locale of Maneage; causing a crash on one of the newly tested computers (a macOS with a non-C locale) during the execution of 'prep-source.sh'. With this commit, all the top-level Makefiles and scripts of Maneage set 'LC_ALL' to 'C' to ensure the same locale on any system. - The 'download-multi-try.sh' script would crash when building basic software in the following scenario: the downloader was still from the host, but one of its linked libraries had already been installed in Maneage and conflicted with the host. A step has been added to catch such cases and remove the Maneage'd library when this was the problem. - On macOS, we discovered that 'pkg-config' and 'wget' need a Python installation, so the necessary conditions have been added. - The 'apptainer.sh' script did not allow passing the '--debug' or '--host-cc' options to the execution of './project' within the container. - Within 'configure.sh', we wrote the absolute path of the downloader to use in 'LOCAL.conf'. However, we install both downloaders and it is safer to use Maneage's own downloader when it has been installed. So the downloader name in 'LOCAL.conf' now only has the name (without its absolute path).
Diffstat (limited to 'reproduce/software/make/basic.mk')
-rw-r--r--reproduce/software/make/basic.mk37
1 files changed, 36 insertions, 1 deletions
diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk
index 000f62d..b045bb1 100644
--- a/reproduce/software/make/basic.mk
+++ b/reproduce/software/make/basic.mk
@@ -87,6 +87,7 @@ all: $(foreach p, $(targets-proglib), $(ibidir)/$(p)); @echo > /dev/null
# own build-directory comes first.
.ONESHELL:
.SHELLFLAGS := -e -c
+export LC_ALL := C
export CCACHE_DISABLE := 1
export SHELL := $(ibdir)/dash
export PATH := $(ibdir):$(PATH)
@@ -123,6 +124,7 @@ export LD_LIBRARY_PATH=$(sys_library_sh_path)
endif
export LD_LIBRARY_PATH := $(shell echo $(ildir):$(LD_LIBRARY_PATH) \
| sed -e's/::/:/g' -e's/^://' -e's/:$$//')
+ldpathorig := $(subst $(ildir):,,$(LD_LIBRARY_PATH))
# RPATH is automatically written in macOS, so 'DYLD_LIBRARY_PATH' is
# ultimately redundant. But on some systems, even having a single value
@@ -459,6 +461,21 @@ $(ibidir)/pkg-config-$(pkgconfig-version): $(ibidir)/tar-$(tar-version)
printf ' glib/configure\n' >> $$confsh
printf 'exec ./configure "$$@"\n' >> $$confsh
chmod +x $$confsh
+
+# For its 'glib' installation within macOS, pkg-config needs a
+# working Python for its build (not affecting its final code), but
+# only searches for '/usr/bin/python'. However, some users may have
+# Python available in another location, so we'll set it externally
+# here to be safe. Note that 'which' is not present on some
+# systems, 'command -v' is more portable).
+ if type python > /dev/null 2> /dev/null; then
+ pypath=$$(command -v python)
+ elif type python3 > /dev/null 2> /dev/null; then
+ pypath=$$(command -v python3)
+ else
+ printf "pkg-config: ERROR: a local Python is necessary"; exit 1
+ fi
+ export PYTHON=$$pypath
fi
# Configuration options:
@@ -479,6 +496,8 @@ $(ibidir)/pkg-config-$(pkgconfig-version): $(ibidir)/tar-$(tar-version)
+
+
# Level 3 (THIRD MOST BASIC): Bash
# --------------------------------
#
@@ -687,7 +706,6 @@ $(ibidir)/bash-$(bash-version): \
-
# Level 4: Most other programs
# ----------------------------
@@ -940,6 +958,23 @@ $(ibidir)/wget-$(wget-version): \
tarball=wget-$(wget-version).tar.lz
$(call import-source, $(wget-url), $(wget-checksum))
+# Wget needs a working Python for its tests (VERY BAD DESIGN!), this
+# does not affect its final operation. But only searches for
+# '/usr/bin/python'. However, some users may have Python available in
+# another location, so we'll set it externally here to be safe. Note
+# that 'which' is not present on some systems, 'command -v' is more
+# portable).
+ if [ x$(on_mac_os) = xyes ]; then
+ if type python > /dev/null 2> /dev/null; then
+ pypath=$$(command -v python)
+ elif type python3 > /dev/null 2> /dev/null; then
+ pypath=$$(command -v python3)
+ else
+ printf "Wget: ERROR: a local Python is necessary"; exit 1
+ fi
+ export PYTHON=$$pypath
+ fi
+
# We need to explicitly disable 'libiconv', because of the
# 'pkg-config' and 'libiconv' problem.
libs="-pthread"