My `make` complains that make: execvp: /bin/sh: Argument list too long make: execvp: /bin/sh: Argument list too long
but I'm having trouble figuring out which command's argument list is too long. I tried "make -d" but it doesn't really help: % LANG=C make -d GNU Make 4.2.1 Built for i686-pc-linux-gnu Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Reading makefiles... Reading makefile 'GNUmakefile'... make: execvp: /bin/sh: Argument list too long make: execvp: /bin/sh: Argument list too long Updating makefiles.... Considering target file 'GNUmakefile'. Looking for an implicit rule for 'GNUmakefile'. Trying pattern rule with stem 'GNUmakefile'. Trying implicit prerequisite 'GNUmakefile.o'. Trying pattern rule with stem 'GNUmakefile'. Trying implicit prerequisite 'GNUmakefile.c'. Trying pattern rule with stem 'GNUmakefile'. Trying implicit prerequisite 'GNUmakefile.cc'. Trying pattern rule with stem 'GNUmakefile'. Trying implicit prerequisite 'GNUmakefile.C'. Trying pattern rule with stem 'GNUmakefile'. Trying implicit prerequisite 'GNUmakefile.cpp'. Trying pattern rule with stem 'GNUmakefile'. Trying implicit prerequisite 'GNUmakefile.p'. Trying pattern rule with stem 'GNUmakefile'. Trying implicit prerequisite 'GNUmakefile.f'. Trying pattern rule with stem 'GNUmakefile'. [...] As you can see, the error seems to be signaled "early". How could I track it down? Looking at the make file I see one $(shell ..) invocation which is the most likely culprit: define SET-diff $(shell echo "$(1)" "$(2)" "$(2)" | tr ' ' '\n' | sort | uniq -u) endef which I use for example in: extra_els := $(call SET-diff, $(els), $(patsubst %.elc, %.el, $(current_elcs))) where `els` and `current_elcs` hold lists of file names (and there are more than 1000 files). Is there some way to compute this set-difference without going through the shell, or passing the content of those variables via stdin? Stefan _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make