[Git][ghc/ghc][master] haddock: Correct the Makefile to take into account Darwin systems
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Jun 12 07:08:38 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
16475bb8 by Hécate Moonlight at 2024-06-12T03:07:55-04:00
haddock: Correct the Makefile to take into account Darwin systems
- - - - -
1 changed file:
- utils/haddock/Makefile
Changes:
=====================================
utils/haddock/Makefile
=====================================
@@ -8,18 +8,17 @@ test: ## Run the test suite
@cabal test
lint: ## Run the code linter (HLint)
- @find driver haddock-api haddock-library haddock-test hoogle-test hypsrc-test latex-test \
- -name "*.hs" | xargs -P $(PROCS) -I {} hlint --refactor-options="-i" --refactor {}
+ @find driver haddock-api haddock-library -name "*.hs" | xargs -P $(PROCS) -I {} hlint --refactor-options="-i" --refactor {}
style: ## Run the code styler (fourmolu and cabal-fmt)
@cabal-fmt -i **/*.cabal
@fourmolu -q --mode inplace driver haddock-api haddock-library
style-check: ## Check the code's style (fourmolu and cabal-fmt)
- @cabal-fmt -i **/*.cabal
+ @cabal-fmt -c **/*.cabal
@fourmolu -q --mode check driver haddock-api haddock-library
-style-quick: ## Run the code styler on modified files
+style-quick: ## Run the code styler on modified files tracked by git
@cabal-fmt -i **/*.cabal
@git diff origin --name-only driver haddock-api haddock-library | xargs -P $(PROCS) -I {} fourmolu -q -i {}
@@ -29,9 +28,12 @@ tags: ## Generate ctags and etags for the source code (ghc-tags)
help: ## Display this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.* ?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
-PROCS := $(shell nproc)
-
.PHONY: all $(MAKECMDGOALS)
.DEFAULT_GOAL := help
+ifeq ($(UNAME), Darwin)
+ PROCS := $(shell sysctl -n hw.logicalcpu)
+else
+ PROCS := $(shell nproc)
+endif
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/16475bb8c8a99e6012e70ad0ff443102479e5899
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/16475bb8c8a99e6012e70ad0ff443102479e5899
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240612/7818cf79/attachment-0001.html>
More information about the ghc-commits
mailing list