From 03162f8f477fb7634edbf53ad4e9dfca433dd9d9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Apr 2006 10:45:53 +0000 Subject: * 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. --- externals/Makefile.am | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'externals/Makefile.am') diff --git a/externals/Makefile.am b/externals/Makefile.am index dcddaa5d139d..7fa9e6f6426b 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) -- cgit 1.4.1