diff --git a/Makefile b/Makefile index c915446..bcc315b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # TODO: Phase out Makefile in favor of Cabal GHCFLAGS=-O9 +GHCFLAGS_STATIC=$(GHCFLAGS) -optl-static -optl-pthread all: shellcheck .tests shellcheck.1 : Done @@ -14,6 +15,7 @@ shellcheck: regardless ./test/runQuack && touch .tests shellcheck.1: shellcheck.1.md + : Formatting man page pandoc -s -t man $< -o $@ clean: @@ -21,4 +23,8 @@ clean: rm -f *.hi *.o ShellCheck/*.hi ShellCheck/*.o rm -rf dist +shellcheck-static: regardless + : Conditionally compiling a statically linked shellcheck-static + ghc $(GHCFLAGS_STATIC) --make shellcheck -o shellcheck-static + regardless: diff --git a/README.md b/README.md index d8e6a7b..b5b8c1d 100644 --- a/README.md +++ b/README.md @@ -76,5 +76,8 @@ To build and run the tests, cd to the shellcheck source directory and: $ make +If you want to distribute the binary and/or run it on other distros, you +can `make shellcheck-static` to build a statically linked executable without +library dependencies. Happy ShellChecking!