diff --git a/lib/sapporo_light/Makefile b/lib/sapporo_light/Makefile index 41328e5d08..eb6a049d43 100644 --- a/lib/sapporo_light/Makefile +++ b/lib/sapporo_light/Makefile @@ -86,7 +86,9 @@ $(DYNAMIC_LIB): $(OBJS) $(CUOBJS) $(NVCC) $(NVCCFLAGS) -c $< -o $@ $(PKG_CONFIG_FILE): - $(file >$@,$(PKG_CONFIG_CONTENTS)) + # the file function is not available on old macOS make, so we make do with this + printf '' >$@ + $(foreach line,$(PKG_CONFIG_CONTENTS),printf '%s\n' '$(line)' >>$@;) .PHONY: clean diff --git a/src/amuse/rfi/tools/dir_templates/Makefile_cxx b/src/amuse/rfi/tools/dir_templates/Makefile_cxx index 6ff6c82c2d..54cb0d1f34 100644 --- a/src/amuse/rfi/tools/dir_templates/Makefile_cxx +++ b/src/amuse/rfi/tools/dir_templates/Makefile_cxx @@ -16,8 +16,7 @@ VERSION = VERSION ##### Modify URL as needed ##### $(DOWNLOAD) https://github.com/{code}/{code}/archive/$(VERSION).tar.gz >$@ -PATCHES := $(file < patches/series) -PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces +PATCHES := $(shell cat patches/series) src/{code}-$(VERSION): {code}.tar.gz ##### Modify as needed ##### diff --git a/src/amuse/rfi/tools/dir_templates/Makefile_fortran b/src/amuse/rfi/tools/dir_templates/Makefile_fortran index 390007e28a..c871b11667 100644 --- a/src/amuse/rfi/tools/dir_templates/Makefile_fortran +++ b/src/amuse/rfi/tools/dir_templates/Makefile_fortran @@ -16,8 +16,7 @@ VERSION = VERSION ##### Modify URL as needed ##### $(DOWNLOAD) https://github.com/{code}/{code}/archive/$(VERSION).tar.gz >$@ -PATCHES := $(file < patches/series) -PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces +PATCHES := $(shell cat patches/series) src/{code}-$(VERSION): {code}.tar.gz ##### Modify as needed ##### diff --git a/src/amuse_mesa_r15140/Makefile b/src/amuse_mesa_r15140/Makefile index 3969ab73a9..e00e63867f 100644 --- a/src/amuse_mesa_r15140/Makefile +++ b/src/amuse_mesa_r15140/Makefile @@ -42,9 +42,7 @@ src/mesa-$(MESA_VERSION).zip: MESA_DIR := src/mesa-$(MESA_VERSION) -PATCHES := $(file < patches/series_mesa) -PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces - +PATCHES := $(shell cat patches/series) $(MESA_DIR): src/mesa-$(MESA_VERSION).zip cd src && unzip -q ../$< diff --git a/src/amuse_mesa_r2208/Makefile b/src/amuse_mesa_r2208/Makefile index 06c7e8289f..4dacc2cb95 100644 --- a/src/amuse_mesa_r2208/Makefile +++ b/src/amuse_mesa_r2208/Makefile @@ -12,8 +12,7 @@ support/config.mk: mesa_r2208.zip: $(DOWNLOAD) https://zenodo.org/record/2603017/files/mesa-r2208.zip >$@ -PATCHES := $(file < patches/series) -PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces +PATCHES := $(shell cat patches/series) src/mesa: mesa_r2208.zip mkdir -p src diff --git a/src/amuse_mocassin/Makefile b/src/amuse_mocassin/Makefile index 8567ff41ae..046639c323 100644 --- a/src/amuse_mocassin/Makefile +++ b/src/amuse_mocassin/Makefile @@ -14,8 +14,7 @@ VERSION = 2.02.70 mocassin.$(VERSION).tar.gz: $(DOWNLOAD) https://amuse.strw.leidenuniv.nl/codes/mocassin.$(VERSION).tar.gz >$@ -PATCHES := $(file < patches/series) -PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces +PATCHES := $(shell cat patches/series) src: mkdir -p src diff --git a/src/amuse_mpiamrvac/Makefile b/src/amuse_mpiamrvac/Makefile index 360c04bd6e..40629593fa 100644 --- a/src/amuse_mpiamrvac/Makefile +++ b/src/amuse_mpiamrvac/Makefile @@ -14,8 +14,7 @@ VERSION = r187 mpiamrvac.tar.gz: $(DOWNLOAD) http://amuse.strw.leidenuniv.nl/codes/mpiamrvac-$(VERSION).tgz >$@ -PATCHES := $(file < patches/series) -PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces +PATCHES := $(shell cat patches/series) src/mpiamrvac: | mpiamrvac.tar.gz tar xf $| diff --git a/support/shared/lib-targets.mk b/support/shared/lib-targets.mk index fa7154fb25..12bb618ad0 100644 --- a/support/shared/lib-targets.mk +++ b/support/shared/lib-targets.mk @@ -91,7 +91,9 @@ $(DYNAMIC_LIB): $(OBJS) $(FC) $(FCFLAGS) -c -o $*.o $< $(PKG_CONFIG_FILE): - $(file >$@,$(PKG_CONFIG_CONTENTS)) + # the file function is not available on old macOS make, so we make do with this + printf '' >$@ + $(foreach line,$(PKG_CONFIG_CONTENTS),printf '%s\n' '$(line)' >>$@;) ifdef DYNAMIC_LIB_MPI @@ -106,7 +108,9 @@ endif $(MPIFC) $(FCFLAGS) $(CFLAGS_MPI) -c -o $*.mo $< $(PKG_CONFIG_FILE_MPI): - $(file >$@,$(PKG_CONFIG_CONTENTS_MPI)) + # the file function is not available on old macOS make, so we make do with this + printf '' >$@ + $(foreach line,$(PKG_CONFIG_CONTENTS_MPI),printf '%s\n' '$(line)' >>$@;) # Clean up