summaryrefslogtreecommitdiffstats
path: root/rules/ltp-commands.make
blob: 7923304bf68ec8779db8e391699bbe65bdd66973 (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
# -*-makefile-*-
#
# Copyright (C) 2008 by Robert Schwebel <r.schwebel@pengutronix.de>
#           (C) 2010 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# 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.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_LTP_COMMANDS) += ltp-commands

#
# Paths and names
#
LTP_COMMANDS_VERSION	:= $(LTP_BASE_VERSION)
LTP_COMMANDS		:= ltp-commands-$(LTP_BASE_VERSION)
LTP_COMMANDS_PKGDIR	= $(PKGDIR)/$(LTP_COMMANDS)

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

$(STATEDIR)/ltp-commands.extract:
	@$(call targetinfo)
	@$(call touch)

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

$(STATEDIR)/ltp-commands.prepare:
	@$(call targetinfo)
	@$(call touch)

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

$(STATEDIR)/ltp-commands.compile:
	@$(call targetinfo)
	@cd $(LTP_BASE_DIR)/testcases/commands; $(LTP_ENV) $(MAKE) $(PARALLELMFLAGS)
	@$(call touch)

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

$(STATEDIR)/ltp-commands.install:
	@$(call targetinfo)
	@mkdir -p $(LTP_COMMANDS_PKGDIR)/bin
	@ln -sf $(LTP_COMMANDS_PKGDIR)/bin $(LTP_BASE_DIR)/testcases/bin
	@cd $(LTP_BASE_DIR)/testcases/commands; $(LTP_ENV) $(MAKE) $(PARALLELMFLAGS) install
	@rm $(LTP_BASE_DIR)/testcases/bin
	@$(call touch)

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

$(STATEDIR)/ltp-commands.targetinstall:
	@$(call targetinfo)

	@$(call install_init, ltp-commands)
	@$(call install_fixup, ltp-commands,PRIORITY,optional)
	@$(call install_fixup, ltp-commands,SECTION,base)
	@$(call install_fixup, ltp-commands,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
	@$(call install_fixup, ltp-commands,DESCRIPTION,missing)

	@cd $(LTP_COMMANDS_PKGDIR)/bin; \
	for file in `find -type f`; do \
		PER=`stat -c "%a" $$file` \
		$(call install_copy, ltp-commands, 0, 0, $$PER, \
			$(LTP_COMMANDS_PKGDIR)/bin/$$file, \
			$(LTP_BASE_BIN_DIR)/$$file); \
	done


	@$(call install_finish, ltp-commands)

	@$(call touch)

# vim: syntax=make