From 4c77178d9f74388be1ceef1a7229ea72ac6efb49 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Thu, 29 Jul 2021 16:19:05 +0200 Subject: [PATCH] [Makefile] another usage of $(file ...) --- Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index dddb183595f..78f43ee7356 100644 --- a/Makefile +++ b/Makefile @@ -2523,13 +2523,10 @@ else endif $(RM) -r $(CLIENT_DIR) $(MKDIR) -p $(CLIENT_DIR) - @#Workaround to avoid "argument list too long" in make 3.82+ without - @#using 'file' built-in, only available on make 4.0+ - @#for make 4.0+, using the 'file' function could be a better solution, - @#although it seems to segfault in 4.0 (but not in 4.1) - $(RM) file_list_to_archive.tmp - @$(foreach file,$(DISTRIB_FILES) $(DISTRIB_TESTS),\ - echo '$(file)' | $(SED) 's/@/ /g' >> file_list_to_archive.tmp$(NEWLINE)) + #Workaround to avoid "argument list too long" in Cygwin + $(file >file_list_to_archive.tmp) + $(foreach f,$(DISTRIB_FILES), \ + $(file >>file_list_to_archive.tmp,$(subst @, ,$(f)))) $(TAR) -cf - --files-from file_list_to_archive.tmp | $(TAR) -C $(CLIENT_DIR) -xf - $(RM) file_list_to_archive.tmp $(PRINT_MAKING) files -- GitLab