Skip to content

Commit 91ee52c

Browse files
committed
Replace use of "echoout" utility with make "reverse" function
1 parent 4e16894 commit 91ee52c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

M2/Macaulay2/d/Makefile.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,14 @@ clean::; rm -f distributed-packages.h
8686
# these files depend on WITH_MYSQL, which is in config.h:
8787
actors4.o actors2.o : ../../include/M2/config.h
8888

89+
# https://stackoverflow.com/a/786530
90+
reverse = $(if $(1),$(call reverse,$(wordlist 2,$(words $(1)),$(1)))) $(firstword $(1))
91+
8992
ifeq "$(DEPENDS)" "yes"
9093
# We include all the files twice, once in reverse order. Example: "include a b c d d c b a"
9194
# The reason for this is that some versions of gnu make build the needed files in reverse order, and some build in forward order.
9295
# (Compare version 4.3 to version 4.4)
93-
include $(patsubst %.d, %.dep, $(patsubst %.dd, %.dep, $(M2_DFILES) $(shell ../util/echoout -r $(M2_DFILES))))
96+
include $(patsubst %.d, %.dep, $(patsubst %.dd, %.dep, $(M2_DFILES) $(call reverse, $(M2_DFILES))))
9497
endif
9598

9699
.SUFFIXES: .d .sig .dep .res .test .m2

0 commit comments

Comments
 (0)