From: Felix Fietkau Date: Thu, 4 Apr 2024 13:03:27 +0000 (+0200) Subject: build: De-duplicate _DIRS before calling mkdir X-Git-Tag: hostap_2_11~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b755c967247934c288503f9d0c96d5c6b44dbf4;p=thirdparty%2Fhostap.git build: De-duplicate _DIRS before calling mkdir If the build path is long, the contents of the _DIRS variable can be very long, since it repeats the same directories very often. In some cases, this has triggered an "Argument list too long" build error. Reported-by: Robert Marko Suggested-by: Eneas U de Queiroz Signed-off-by: Felix Fietkau --- diff --git a/src/build.rules b/src/build.rules index acda88472..c756ccb84 100644 --- a/src/build.rules +++ b/src/build.rules @@ -80,7 +80,7 @@ endif _DIRS := $(BUILDDIR)/$(PROJ) .PHONY: _make_dirs _make_dirs: - @mkdir -p $(_DIRS) + @mkdir -p $(sort $(_DIRS)) $(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs $(Q)$(CC) -c -o $@ $(CFLAGS) $<