diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-03-04 13:12:29 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-03-04 13:13:12 +0100 |
commit | 19d86132a88f19a8578b6a640a8eefa3e856fdfb (patch) | |
tree | 45bf643df2679c5bd17755a7e39e6e6671264076 | |
parent | e256c8ce1778ff6fbb2e8d59556d48fb3c53393d (diff) | |
download | pandoc-19d86132a88f19a8578b6a640a8eefa3e856fdfb.tar.gz |
Makefile: Separate refactor and reformat targets.
Removed tools/refactor.sh.
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | tools/refactor.sh | 8 |
2 files changed, 5 insertions, 10 deletions
@@ -17,7 +17,10 @@ bench: stack bench refactor: - ./tools/refactor.sh $(sourcefiles) + for f in $(sourcefiles); do echo $$f; hlint --refactor --refactor-options='-i' --cpp-file=`stack path --dist-dir`/build/autogen/cabal_macros.h $$f >/dev/null ; perl -i'' -ne 'if (/./) { print "\n" x $$n, $$_; $$n = 0 } else { $$n++ }' $$f; done + +reformat: + for f in $(sourcefiles); do echo $$f; stylish-haskell -i $$f ; done changes_github: pandoc --filter extract-changes.hs changelog -t markdown_github | sed -e 's/\\#/#/g' | pbcopy @@ -57,4 +60,4 @@ download_stats: clean: stack clean -.PHONY: deps quick full install clean test bench changes_github macospkg dist prof download_stats refactor +.PHONY: deps quick full install clean test bench changes_github macospkg dist prof download_stats refactor reformat diff --git a/tools/refactor.sh b/tools/refactor.sh deleted file mode 100755 index 40e3c964e..000000000 --- a/tools/refactor.sh +++ /dev/null @@ -1,8 +0,0 @@ -cppdir=`stack path --dist-dir`/build/autogen -for f in $* -do - echo "Applying hlint --refactor to $f" - hlint --refactor -i --cpp-file=$cppdir/cabal_macros.h $f >/dev/null - echo "Applying stylish-haskell to $f" - stylish-haskell -i $f | perl -ne 'if (/./) { print "\n" x $n, $_; $n = 0 } else { $n++ }' >/dev/null -done |