1##
2# GNUmakefile for curl
3##
4
5## Configuration ##
6
7Project        = texinfo
8Name           = $(Project)
9Version        = 4.8
10Name_Vers      = $(Name)-$(Version)
11Compress_Type  = bz2
12Tarball        = $(Name_Vers).tar.$(Compress_Type)
13Extract_Dir    = $(Name_Vers)
14Patch_List     = 4832842-html.c.patch 4808658-texindex.c.patch texindex.patch sed-with-c-locale.patch utf8-locale-alias.patch
15
16## Don't modify below here ##
17
18# Determine correct extract option (default = gzip).
19ifeq ($(Compress_Type),bz2)
20	Extract_Option = j
21else
22	Extract_Option = z
23endif
24
25no_target:
26	@$(MAKE) -f Makefile
27
28# Hijack the install stage to extract/patch the source.
29install:
30	@echo "-- Extracting distfiles --"
31	rm -rf $(OBJROOT)
32	cp -r $(SRCROOT) $(OBJROOT)
33	rm -rf $(OBJROOT)/$(Project)
34	cd $(OBJROOT) && tar $(Extract_Option)xf $(OBJROOT)/$(Tarball)
35	mv $(OBJROOT)/$(Extract_Dir) $(OBJROOT)/$(Project)
36	@echo "-- Applying patches --"
37	$(_v) for patchfile in $(Patch_List); do \
38		(cd $(OBJROOT)/$(Project) && patch -p0 -F0 < $(OBJROOT)/patches/$$patchfile) || exit 1; \
39	done
40	@echo "-- Done extracting/patching, continuing --"
41	$(MAKE) -C $(OBJROOT) -f Makefile install \
42		SRCROOT=$(OBJROOT) \
43		OBJROOT=$(OBJROOT)/$(Project) \
44		VERSION=$(VERSION)
45
46.DEFAULT:
47	@$(MAKE) -f Makefile $@
48