]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
build: fix portability of mancheck and checksrc targets
authorDan Fandrich <dan@coneharvesters.com>
Fri, 1 Sep 2023 21:51:32 +0000 (14:51 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 1 Sep 2023 22:08:39 +0000 (15:08 -0700)
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.

docs/libcurl/opts/Makefile.am
tests/Makefile.am

index 21193e0d47a8752a8dfe396b03d37b437062ffa1..250937fd168de4d7d7251696c49e2a5efc97600a 100644 (file)
@@ -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
index 0d9f6f5812a84e25dcc85dd9a4b95afc87e48620..55d551f1a636754ef9563f5fc4cbe7990b82fcaa 100644 (file)
@@ -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