Skip to content

Commit

Permalink
Makefile: run the cd commands in a subshell
Browse files Browse the repository at this point in the history
In bmake, if the directory is changed (with cd or anything else), bmake
won't return to the "root directory" on the next command (in the same
Makefile rule). This commit runs the cd command in a subshell so it
would work in bmake.

Closes #5073
  • Loading branch information
konimex authored and bagder committed Mar 11, 2020
1 parent 27ea8fc commit 0cc66ff
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -289,15 +289,15 @@ cygwinbin:

# We extend the standard install with a custom hook:
install-data-hook:
cd include && $(MAKE) install
cd docs && $(MAKE) install
cd docs/libcurl && $(MAKE) install
(cd include && $(MAKE) install)
(cd docs && $(MAKE) install)
(cd docs/libcurl && $(MAKE) install)

# We extend the standard uninstall with a custom hook:
uninstall-hook:
cd include && $(MAKE) uninstall
cd docs && $(MAKE) uninstall
cd docs/libcurl && $(MAKE) uninstall
(cd include && $(MAKE) uninstall)
(cd docs && $(MAKE) uninstall)
(cd docs/libcurl && $(MAKE) uninstall)

ca-bundle: lib/mk-ca-bundle.pl
@echo "generating a fresh ca-bundle.crt"
Expand All @@ -308,11 +308,11 @@ ca-firefox: lib/firefox-db2pem.sh
./lib/firefox-db2pem.sh lib/ca-bundle.crt

checksrc:
cd lib && $(MAKE) checksrc
cd src && $(MAKE) checksrc
cd tests && $(MAKE) checksrc
cd include/curl && $(MAKE) checksrc
cd docs/examples && $(MAKE) checksrc
(cd lib && $(MAKE) checksrc)
(cd src && $(MAKE) checksrc)
(cd tests && $(MAKE) checksrc)
(cd include/curl && $(MAKE) checksrc)
(cd docs/examples && $(MAKE) checksrc)

.PHONY: vc-ide

Expand Down

0 comments on commit 0cc66ff

Please sign in to comment.