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
|
# -*-makefile-*-
#
# Copyright (C) 2002-2009 by The PTXdist Team - See CREDITS for Details
#
# make sure bash is used to execute commands from makefiles
SHELL=bash
export SHELL
unexport MAKEFLAGS
PHONY := all FORCE
all:
@echo "ptxdist: error: please use 'ptxdist' instead of calling make directly."
@exit 1
# ----------------------------------------------------------------------------
# Some directory locations
# ----------------------------------------------------------------------------
include $(PTXDIST_TOPDIR)/scripts/ptxdist_vars.sh
include $(RULESDIR)/other/Definitions.make
include $(PTXDIST_PTXCONFIG)
# might be non existent
-include $(PTXDIST_PLATFORMCONFIG)
# might be non existent
ifneq ($(wildcard $(PTXDIST_COLLECTIONCONFIG)),)
include $(PTXDIST_COLLECTIONCONFIG)
PTX_COLLECTION := y
endif
# ----------------------------------------------------------------------------
# Include all rule files
# ----------------------------------------------------------------------------
include $(PTX_MAP_ALL_MAKE)
include $(RULESDIR)/other/Namespace.make
# might be non existent
include $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_PRERULES))), $(sort $(wildcard $(dir)/*.make)))
include $(PTX_DGEN_DEPS_PRE)
include $(PTX_DGEN_RULESFILES_MAKE)
#
# the extended format is:
# PACKAGES-<ARCH>-<LABEL>
#
# to keep it simple, just add the "-y-y" to "-y"
# (for "-m" and "--" accordingly)
#
PACKAGES-y += $(PACKAGES-y-y)
PACKAGES-m += $(PACKAGES-y-m)
PACKAGES- += $(PACKAGES-y-) $(PACKAGES--y) $(PACKAGES--m) $(PACKAGES--)
HOST_PACKAGES-y += $(HOST_PACKAGES-y-y)
HOST_PACKAGES-m += $(HOST_PACKAGES-y-m)
HOST_PACKAGES- += $(HOST_PACKAGES-y-) $(HOST_PACKAGES--y) $(HOST_PACKAGES--m) $(HOST_PACKAGES--)
CROSS_PACKAGES-y+= $(CROSS_PACKAGES-y-y)
CROSS_PACKAGES-m+= $(CROSS_PACKAGES-y-m)
CROSS_PACKAGES- += $(CROSS_PACKAGES-y-) $(CROSS_PACKAGES--y) $(CROSS_PACKAGES--m) $(CROSS_PACKAGES--)
LAZY_PACKAGES-y += $(LAZY_PACKAGES-y-y)
LAZY_PACKAGES-m += $(LAZY_PACKAGES-y-m)
LAZY_PACKAGES- += $(LAZY_PACKAGES-y-) $(LAZY_PACKAGES--y) $(LAZY_PACKAGES--m) $(LAZY_PACKAGES--)
PACKAGES := $(PACKAGES-y)
CROSS_PACKAGES := $(CROSS_PACKAGES-y)
HOST_PACKAGES := $(HOST_PACKAGES-y)
LAZY_PACKAGES := $(LAZY_PACKAGES-y)
#
# build everything if no collection is active
#
ifndef PTX_COLLECTION
PACKAGES += $(PACKAGES-m)
CROSS_PACKAGES += $(CROSS_PACKAGES-m)
HOST_PACKAGES += $(HOST_PACKAGES-m)
LAZY_PACKAGES += $(LAZY_PACKAGES-m)
endif
PTX_PACKAGES_SELECTED := \
$(PACKAGES) \
$(CROSS_PACKAGES) \
$(HOST_PACKAGES) \
$(LAZY_PACKAGES)
PTX_PACKAGES_INSTALL := \
$(PACKAGES) \
$(PTXDIST_BASE_PACKAGES) \
$(PACKAGES-b)
# might be non existent
include $(foreach dir, $(call reverse,$(subst :,$(space),$(PTXDIST_PATH_POSTRULES))), $(sort $(wildcard $(dir)/*.make)))
# install_alternative and install_copy has some configuration defined
# dependencies. include the files specifying these dependencies.
include $(wildcard $(STATEDIR)/*.deps)
# include late so the *PACKAGES* variables are already defined
include $(PTX_DGEN_DEPS_POST)
# ----------------------------------------------------------------------------
# just the "print" target
# ----------------------------------------------------------------------------
print-%: FORCE
$(if $(filter k,$(MAKEFLAGS)),,$($(if $(filter undefined,$(origin $(*))),$(error $(*) undefined))))
@echo "$(if $(filter 1,$(PTXDIST_VERBOSE)),$(*)=)$($(*))"
.PHONY: $(PHONY)
# vim600:set foldmethod=marker:
# vim600:set syntax=make:
|