From: Dan Fandrich Date: Fri, 1 Sep 2023 21:51:32 +0000 (-0700) Subject: build: fix portability of mancheck and checksrc targets X-Git-Tag: curl-8_3_0~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5949369c9f54ceeed38e9789a17173828e654a07;p=thirdparty%2Fcurl.git build: fix portability of mancheck and checksrc targets At least FreeBSD preserves cwd across makefile lines, so rules consisting of more than one "cd X; do_something" must be explicitly run in a subshell to avoid this. This problem caused the Cirrus FreeBSD build to fail when parallel make jobs were enabled. --- diff --git a/docs/libcurl/opts/Makefile.am b/docs/libcurl/opts/Makefile.am index 21193e0d47..250937fd16 100644 --- a/docs/libcurl/opts/Makefile.am +++ b/docs/libcurl/opts/Makefile.am @@ -54,7 +54,7 @@ pdf: $(PDFPAGES) echo "converted $< to $@") mancheck: - @cd $(top_srcdir)/docs/libcurl/opts && ls `awk -F, '!/OBSOLETE/ && /^ CINIT/ { a=substr($$1, 9); print "CURLOPT_" a ".3"}' $(top_srcdir)/include/curl/curl.h` + @(cd $(top_srcdir)/docs/libcurl/opts && ls `awk -F, '!/OBSOLETE/ && /^ CINIT/ { a=substr($$1, 9); print "CURLOPT_" a ".3"}' $(top_srcdir)/include/curl/curl.h`) rm -f in_temp @(for a in $(man_MANS); do echo $$a >>in_temp; done) sort in_temp > in_makefile diff --git a/tests/Makefile.am b/tests/Makefile.am index 0d9f6f5812..55d551f1a6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -117,10 +117,10 @@ event-test: perlcheck all echo "converted $< to $@") checksrc: - cd libtest && $(MAKE) checksrc - cd unit && $(MAKE) checksrc - cd server && $(MAKE) checksrc - cd http && $(MAKE) checksrc + (cd libtest && $(MAKE) checksrc) + (cd unit && $(MAKE) checksrc) + (cd server && $(MAKE) checksrc) + (cd http && $(MAKE) checksrc) if CURLDEBUG # for debug builds, we scan the sources on all regular make invokes