Correcting whitespace/alignment issues. Adding main source in more principled manner.
[cabal.git] / Makefile
blob4fd5f8ba83054fc25701aaff4452ed2df5bdf2c1
1 .PHONY : all lexer sdpx lib exe doctest gen-extra-source-files
3 LEXER_HS:=Cabal/Distribution/Parsec/Lexer.hs
4 SPDX_LICENSE_HS:=Cabal/Distribution/SPDX/LicenseId.hs
5 SPDX_EXCEPTION_HS:=Cabal/Distribution/SPDX/LicenseExceptionId.hs
7 all : exe lib
9 lexer : $(LEXER_HS)
11 spdx : $(SPDX_LICENSE_HS) $(SPDX_EXCEPTION_HS)
13 $(LEXER_HS) : boot/Lexer.x
14 alex --latin1 --ghc -o $@ $^
15 cat -s $@ > Lexer.tmp
16 mv Lexer.tmp $@
18 $(SPDX_LICENSE_HS) : boot/SPDX.LicenseId.template.hs cabal-dev-scripts/src/GenSPDX.hs license-list-data/licenses.json
19 cabal new-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-spdx -- boot/SPDX.LicenseId.template.hs license-list-data/licenses.json $(SPDX_LICENSE_HS)
21 $(SPDX_EXCEPTION_HS) : boot/SPDX.LicenseExceptionId.template.hs cabal-dev-scripts/src/GenSPDXExc.hs license-list-data/licenses.json
22 cabal new-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-spdx-exc -- boot/SPDX.LicenseExceptionId.template.hs license-list-data/exceptions.json $(SPDX_EXCEPTION_HS)
24 lib : $(LEXER_HS)
25 cabal new-build --enable-tests Cabal
27 exe : $(LEXER_HS)
28 cabal new-build --enable-tests cabal-install
30 doctest :
31 doctest --fast Cabal/Distribution Cabal/Language
33 gen-extra-source-files:
34 cabal new-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-extra-source-files -- Cabal/Cabal.cabal
35 cabal new-run --builddir=dist-newstyle-meta --project-file=cabal.project.meta gen-extra-source-files -- cabal-install/cabal-install.cabal
37 cabal-install-test:
38 cabal new-build -j3 all --disable-tests --disable-benchmarks
39 rm -rf .ghc.environment.*
40 cd cabal-testsuite && `cabal-plan list-bin cabal-tests` --with-cabal=`cabal-plan list-bin cabal` --hide-successes -j3 ${TEST}