summaryrefslogtreecommitdiffstats
path: root/rules/e2tools.make
blob: f3506d34644ce2f44780a17d11069bf6faca64ec (plain)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# -*-makefile-*-
# $Id$
#
# Copyright (C) 2003 by Benedikt Spranger
#          
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

# FIXME: RSC: make this a hosttool? 

#
# We provide this package
#
ifdef PTXCONF_E2TOOLS
PACKAGES += hosttool-e2tools
endif

#
# Paths and names
#
HOSTTOOL_E2TOOLS_VERSION	= 0.0.15
HOSTTOOL_E2TOOLS		= e2tools-$(HOSTTOOL_E2TOOLS_VERSION)
HOSTTOOL_E2TOOLS_SUFFIX		= tar.gz
HOSTTOOL_E2TOOLS_URL		= http://home.earthlink.net/~k_sheff/sw/e2tools/$(HOSTTOOL_E2TOOLS).$(HOSTTOOL_E2TOOLS_SUFFIX)
HOSTTOOL_E2TOOLS_SOURCE		= $(SRCDIR)/$(HOSTTOOL_E2TOOLS).$(HOSTTOOL_E2TOOLS_SUFFIX)
HOSTTOOL_E2TOOLS_DIR		= $(BUILDDIR)/$(E2TOOLS)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

hosttool-e2tools_get: $(STATEDIR)/hosttool-e2tools.get

hosttool-e2tools_get_deps = $(HOSTTOOL_E2TOOLS_SOURCE)

$(STATEDIR)/hosttool-e2tools.get: $(hosttool-e2tools_get_deps)
	@$(call targetinfo, $@)
	$(call touch, $@)

$(HOSTTOOL_E2TOOLS_SOURCE):
	@$(call targetinfo, $@)
	@$(call get, $(HOSTTOOL_E2TOOLS_URL))

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

hosttool-e2tools_extract: $(STATEDIR)/hosttool-e2tools.extract

hosttool-e2tools_extract_deps = $(STATEDIR)/hosttool-e2tools.get

$(STATEDIR)/hosttool-e2tools.extract: $(hosttool-e2tools_extract_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(HOSTTOOL_E2TOOLS_DIR))
	@$(call extract, $(HOSTTOOL_E2TOOLS_SOURCE))
	$(call touch, $@)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

hosttool-e2tools_prepare: $(STATEDIR)/hosttool-e2tools.prepare

#
# dependencies
#
hosttool-e2tools_prepare_deps = \
	$(STATEDIR)/hosttool-e2tools.extract \
	$(STATEDIR)/hosttool-e2fsprogs.install

HOSTTOOL_E2TOOLS_PATH	=  PATH=$(CROSS_PATH)
HOSTTOOL_E2TOOLS_ENV 	=  $(CROSS_ENV)
#HOSTTOOL_E2TOOLS_ENV	+=

#
# autoconf
#
HOSTTOOL_E2TOOLS_AUTOCONF = \
	--prefix=$(PTXCONF_PREFIX) \
	--build=$(GNU_HOST)
	--host=$(GNU_HOST)
	--target=$(GNU_HOST)

$(STATEDIR)/hosttool-e2tools.prepare: $(hosttool-e2tools_prepare_deps)
	@$(call targetinfo, $@)
	@$(call clean, $(HOSTTOOL_E2TOOLS_DIR)/config.cache)
	cd $(HOSTTOOL_E2TOOLS_DIR) && \
		$(HOSTTOOL_E2TOOLS_PATH) $(HOSTTOOL_E2TOOLS_ENV) \
		./configure $(HOSTTOOL_E2TOOLS_AUTOCONF)
	$(call touch, $@)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

hosttool-e2tools_compile: $(STATEDIR)/hosttool-e2tools.compile

hosttool-e2tools_compile_deps = $(STATEDIR)/hosttool-e2tools.prepare

$(STATEDIR)/hosttool-e2tools.compile: $(hosttool-e2tools_compile_deps)
	@$(call targetinfo, $@)
	$(HOSTTOOL_E2TOOLS_PATH) make -C $(HOSTTOOL_E2TOOLS_DIR)
	$(call touch, $@)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

hosttool-e2tools_install: $(STATEDIR)/hosttool-e2tools.install

$(STATEDIR)/hosttool-e2tools.install: $(STATEDIR)/hosttool-e2tools.compile
	@$(call targetinfo, $@)
	$(HOSTTOOL_E2TOOLS_PATH) make -C $(HOSTTOOL_E2TOOLS_DIR) install
	$(call touch, $@)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

hosttool-e2tools_targetinstall: $(STATEDIR)/hosttool-e2tools.targetinstall

hosttool-e2tools_targetinstall_deps = $(STATEDIR)/hosttool-e2tools.compile

$(STATEDIR)/hosttool-e2tools.targetinstall: $(hosttool-e2tools_targetinstall_deps)
	@$(call targetinfo, $@)
	$(call touch, $@)

# ----------------------------------------------------------------------------
# Clean
# ----------------------------------------------------------------------------

hosttool-e2tools_clean:
	rm -rf $(STATEDIR)/hosttool-e2tools.*
	rm -rf $(HOSTTOOL_E2TOOLS_DIR)

# vim: syntax=make