diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-04-25 10:45:53 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-04-25 10:45:53 +0000 |
commit | 03162f8f477fb7634edbf53ad4e9dfca433dd9d9 (patch) | |
tree | 88aaf58b6111f8a0cb8422c97697605e1f3dc4de /externals/Makefile.am | |
parent | ef2d4a2da9c14c15985bdd27c02d2d30093a3e56 (diff) |
* Unless --with-bzip2 is specified, use a copy of bzip2 in the
externals directory. This is in particular useful because though
most systems have bzip2/bunzip2, they don't always have libbz2,
which we need for bsdiff/bspatch.
Diffstat (limited to 'externals/Makefile.am')
-rw-r--r-- | externals/Makefile.am | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/externals/Makefile.am b/externals/Makefile.am index dcddaa5d1..7fa9e6f64 100644 --- a/externals/Makefile.am +++ b/externals/Makefile.am @@ -64,10 +64,43 @@ build-aterm: have-aterm endif -all: build-db build-aterm +# bzip2 -EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz +BZIP2 = bzip2-1.0.3 + +$(BZIP2).tar.gz: + @echo "Nix requires bzip2 to build." + @echo "Please download version 1.0.3 from" + @echo " http://www.bzip.org/1.0.3/bzip2-1.0.3.tar.gz" + @echo "and place it in the externals/ directory." + false + +$(BZIP2): $(BZIP2).tar.gz + gunzip < $(BZIP2).tar.gz | tar xvf - + +have-bzip2: + $(MAKE) $(BZIP2) + touch have-bzip2 + +if HAVE_BZIP2 +build-bzip2: +else +build-bzip2: have-bzip2 + (pfx=`pwd` && \ + cd $(BZIP2) && \ + $(MAKE) && \ + $(MAKE) install PREFIX=$$pfx/inst-bzip2) + touch build-bzip2 + +install: + cp $(bzip2_bin_test)/bzip2 $(bzip2_bin_test)/bunzip2 ${bzip2_bin} +endif + + +all: build-db build-aterm build-bzip2 + +EXTRA_DIST = $(DB).tar.gz $(ATERM).tar.gz $(BZIp2).tar.gz ext-clean: $(RM) -f have-db build-db have-aterm build-aterm - $(RM) -rf $(DB) $(ATERM) + $(RM) -rf $(DB) $(ATERM) $(BZIP2) |