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