File tree Expand file tree Collapse file tree
amuse/rfi/tools/dir_templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,7 +86,9 @@ $(DYNAMIC_LIB): $(OBJS) $(CUOBJS)
8686 $(NVCC ) $(NVCCFLAGS ) -c $< -o $@
8787
8888$(PKG_CONFIG_FILE ) :
89- $(file >$@ ,$(PKG_CONFIG_CONTENTS ) )
89+ # the file function is not available on old macOS make, so we make do with this
90+ printf ' ' > $@
91+ $(foreach line,$(PKG_CONFIG_CONTENTS ) ,printf '% s\n' '$(line ) ' >>$@ ;)
9092
9193
9294.PHONY : clean
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ VERSION = VERSION
1616 ##### Modify URL as needed #####
1717 $(DOWNLOAD) https://github.com/{code}/{code}/archive/$(VERSION).tar.gz >$@
1818
19- PATCHES := $(file < patches/series)
20- PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces
19+ PATCHES := $(shell cat patches/series)
2120
2221src/{code}-$(VERSION): {code}.tar.gz
2322 ##### Modify as needed #####
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ VERSION = VERSION
1616 ##### Modify URL as needed #####
1717 $(DOWNLOAD) https://github.com/{code}/{code}/archive/$(VERSION).tar.gz >$@
1818
19- PATCHES := $(file < patches/series)
20- PATCHES := $(patsubst %,%,$(PATCHES)) # replace newlines with spaces
19+ PATCHES := $(shell cat patches/series)
2120
2221src/{code}-$(VERSION): {code}.tar.gz
2322 ##### Modify as needed #####
Original file line number Diff line number Diff line change @@ -42,9 +42,7 @@ src/mesa-$(MESA_VERSION).zip:
4242
4343MESA_DIR := src/mesa-$(MESA_VERSION )
4444
45- PATCHES := $(file < patches/series_mesa)
46- PATCHES := $(patsubst % ,% ,$(PATCHES ) ) # replace newlines with spaces
47-
45+ PATCHES := $(shell cat patches/series)
4846
4947$(MESA_DIR ) : src/mesa-$(MESA_VERSION ) .zip
5048 cd src && unzip -q ../$<
Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ support/config.mk:
1212mesa_r2208.zip :
1313 $(DOWNLOAD ) https://zenodo.org/record/2603017/files/mesa-r2208.zip > $@
1414
15- PATCHES := $(file < patches/series)
16- PATCHES := $(patsubst % ,% ,$(PATCHES ) ) # replace newlines with spaces
15+ PATCHES := $(shell cat patches/series)
1716
1817src/mesa : mesa_r2208.zip
1918 mkdir -p src
Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ VERSION = 2.02.70
1414mocassin.$(VERSION ) .tar.gz :
1515 $(DOWNLOAD ) https://amuse.strw.leidenuniv.nl/codes/mocassin.$(VERSION ) .tar.gz > $@
1616
17- PATCHES := $(file < patches/series)
18- PATCHES := $(patsubst % ,% ,$(PATCHES ) ) # replace newlines with spaces
17+ PATCHES := $(shell cat patches/series)
1918
2019src :
2120 mkdir -p src
Original file line number Diff line number Diff line change @@ -14,8 +14,7 @@ VERSION = r187
1414mpiamrvac.tar.gz :
1515 $(DOWNLOAD ) http://amuse.strw.leidenuniv.nl/codes/mpiamrvac-$(VERSION ) .tgz > $@
1616
17- PATCHES := $(file < patches/series)
18- PATCHES := $(patsubst % ,% ,$(PATCHES ) ) # replace newlines with spaces
17+ PATCHES := $(shell cat patches/series)
1918
2019src/mpiamrvac : | mpiamrvac.tar.gz
2120 tar xf $|
Original file line number Diff line number Diff line change @@ -91,7 +91,9 @@ $(DYNAMIC_LIB): $(OBJS)
9191 $(FC ) $(FCFLAGS ) -c -o $* .o $<
9292
9393$(PKG_CONFIG_FILE ) :
94- $(file >$@ ,$(PKG_CONFIG_CONTENTS ) )
94+ # the file function is not available on old macOS make, so we make do with this
95+ printf ' ' > $@
96+ $(foreach line,$(PKG_CONFIG_CONTENTS ) ,printf '% s\n' '$(line ) ' >>$@ ;)
9597
9698
9799ifdef DYNAMIC_LIB_MPI
@@ -106,7 +108,9 @@ endif
106108 $(MPIFC ) $(FCFLAGS ) $(CFLAGS_MPI ) -c -o $* .mo $<
107109
108110$(PKG_CONFIG_FILE_MPI ) :
109- $(file >$@ ,$(PKG_CONFIG_CONTENTS_MPI ) )
111+ # the file function is not available on old macOS make, so we make do with this
112+ printf ' ' > $@
113+ $(foreach line,$(PKG_CONFIG_CONTENTS_MPI ) ,printf '% s\n' '$(line ) ' >>$@ ;)
110114
111115
112116# Clean up
You can’t perform that action at this time.
0 commit comments