9 GHCFLAGS
=-Wall
-threaded
14 # build the library itself
16 SOURCES
=Distribution
/*.hs Distribution
/Simple
/*.hs \
17 Distribution
/PackageDescription
/*.hs Distribution
/Simple
/GHC
/*.hs \
18 Distribution
/Simple
/Build
/*.hs Distribution
/Compat
/*.hs \
19 Distribution
/Simple
/Program
/*.hs
20 CONFIG_STAMP
=dist/setup-config
21 BUILD_STAMP
=dist/build
/libHSCabal-
$(VERSION
).a
22 HADDOCK_STAMP
=dist/doc
/html
/Cabal
/index.html
23 SDIST_STAMP
=dist/Cabal-
$(VERSION
).
tar.gz
25 DIST_STAMP
=$(DISTLOC
)/Cabal-
$(VERSION
).
tar.gz
29 setup
: $(SOURCES
) Setup.hs
31 $(HC
) $(GHCFLAGS
) --make
-i.
-odir
dist/setup
-hidir
dist/setup Setup.hs \
34 $(CONFIG_STAMP
): setup Cabal.cabal
35 .
/setup configure
--with-compiler
=$(HC
) --prefix=$(PREFIX
)
38 $(BUILD_STAMP
): $(CONFIG_STAMP
) $(SOURCES
)
41 install: $(BUILD_STAMP
)
46 haddock
: $(HADDOCK_STAMP
)
47 $(HADDOCK_STAMP
) : $(CONFIG_STAMP
) $(BUILD_STAMP
)
56 moduleTest
: tests
/ModuleTest.hs tests
/PackageDescriptionTests.hs
58 $(HC
) --make
-Wall
-DDEBUG
-odir
dist/test -hidir
dist/test \
59 -itests tests
/ModuleTest.hs
-o moduleTest
61 #tests: moduleTest clean
62 # cd tests/A && $(MAKE) clean
63 # cd tests/HUnit-1.0 && $(MAKE) clean
64 # cd tests/A && $(MAKE)
65 # cd tests/HUnit-1.0 && $(MAKE)
74 $(SDIST_STAMP
) : $(BUILD_STAMP
)
78 $(DIST_STAMP
) : $(HADDOCK_STAMP
) $(SDIST_STAMP
)
81 tar -xzf
$(SDIST_STAMP
) -C
$(DISTLOC
)/
82 mkdir
-p
$(DISTLOC
)/Cabal-
$(VERSION
)/doc
83 cp
-r
dist/doc
/html
$(DISTLOC
)/Cabal-
$(VERSION
)/doc
/API
84 cp ChangeLog.md
$(DISTLOC
)/Cabal-
$(VERSION
)/
85 tar --format
=ustar
-C
$(DISTLOC
) -czf
$(DISTLOC
)/Cabal-
$(VERSION
).
tar.gz Cabal-
$(VERSION
)
87 mv
$(DISTLOC
)/Cabal-
$(VERSION
)/doc
/API
$(DISTLOC
)/doc
88 mv
$(DISTLOC
)/Cabal-
$(VERSION
)/ChangeLog.md
$(DISTLOC
)/
89 rm -r
$(DISTLOC
)/Cabal-
$(VERSION
)/
90 @echo
"Cabal tarball built: $(DIST_STAMP)"
91 @echo
"Release fileset prepared: $(DISTLOC)/"
93 # Out of date, use SFTP
94 #release: $(DIST_STAMP)
95 # scp -r $(DISTLOC) $(SSH_USER)@haskell.org:/home/web/haskell.org/cabal/release/cabal-$(VERSION)
96 # ssh $(SSH_USER)@haskell.org 'cd /home/web/haskell.org/cabal/release && rm -f $(KIND) && ln -s cabal-$(VERSION) $(KIND)'
100 TAGSSRCDIRS
= Distribution Language
101 tags TAGS
: $(SOURCES
)
102 find
$(TAGSSRCDIRS
) -name \
*.\
*hs | xargs hasktags