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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
# $OpenBSD: bsd.xorg.mk,v 1.8 2006/12/02 16:28:48 matthieu Exp $ -*- makefile -*-
#
# Copyright © 2006 Matthieu Herrb
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
.include <bsd.own.mk>
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
.endif
AUTOMAKE_VERSION= 1.9
AUTOCONF_VERSION= 2.59
# Where source lives
XENOCARA_TOP?= /usr/xenocara
# Where to build
XENOCARA_OBJDIR?= /usr/obj/xenocara
# Where to install
X11BASE?= /usr/X11R6
X11ETC?= /etc/X11
BINDIR?= ${X11BASE}/bin
LIBDIR= ${X11BASE}/lib
INCSDIR= ${X11BASE}/include
MANDIR= ${X11BASE}/man/cat
PKG_CONFIG_PATH= ${X11BASE}/lib/pkgconfig
_cache= --cache-file=${XENOCARA_OBJDIR}/xorg-config.cache.${MACHINE}
MAKE_ENV+= AUTOMAKE_VERSION="$(AUTOMAKE_VERSION)" \
AUTOCONF_VERSION="$(AUTOCONF_VERSION)" \
ACLOCAL="aclocal -I ${X11BASE}/share/aclocal" \
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
.if !target(.MAIN)
.MAIN: all
.endif
.if !target(includes)
includes:
.endif
.if defined(SHARED_LIBS)
_lt_libs=
.for _n _v in ${SHARED_LIBS}
_lt_libs+=lib${_n:S/+/_/g:S/-/_/g:S/./_/g}_ltversion=${_v}
.endfor
.endif
.if !target(all)
all: config.status
${MAKE_ENV} ${MAKE} ${_lt_libs}
.endif
.if !target(config.status)
.if defined(XENOCARA_RERUN_AUTOCONF) && ${XENOCARA_RERUN_AUTOCONF:L} == "yes"
config.status: _xenocara_obj
cd ${.CURDIR}; ${MAKE_ENV} autoreconf -v --install --force
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
${CONFIGURE_ENV} ${.CURDIR}/configure \
--enable-maintainer-mode --prefix=${X11BASE} \
--sysconfdir=/etc \
--mandir=${X11BASE}/man \
${_cache} \
${CONFIGURE_ARGS}
.else
config.status: _xenocara_obj
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
${CONFIGURE_ENV} ${.CURDIR}/configure --prefix=${X11BASE} \
--sysconfdir=/etc \
--mandir=${X11BASE}/man \
${_cache} \
${CONFIGURE_ARGS}
.endif
.endif
.if !target(depend)
depend:
@echo "no dependencies here yet"
.endif
.if !target(install)
install::
${MAKE_ENV} ${MAKE} ${_lt_libs} install
.endif
.if target(extra-install)
install::
cd ${.CURDIR} && ${MAKE_ENV} ${MAKE} -f Makefile.bsd-wrapper extra-install
.endif
.if !target(dist)
dist:
${MAKE_ENV} ${MAKE} ${_lt_libs} dist
.endif
.if !target(build)
.if exists(Makefile.bsd-wrapper)
_wrapper = -f Makefile.bsd-wrapper
.endif
build:
cd ${.CURDIR} && ${MAKE_ENV} ${MAKE} ${_wrapper} cleandir
cd ${.CURDIR} && ${MAKE_ENV} ${MAKE} ${_wrapper} depend
cd ${.CURDIR} && ${MAKE_ENV} ${MAKE} ${_wrapper} all
cd ${.CURDIR} && ${MAKE_ENV} ${SUDO} ${MAKE} ${_wrapper} install
.endif
.if !target(clean)
clean:
-@if [ -e Makefile ]; then ${MAKE_ENV} ${MAKE} clean; fi
.endif
.if !target(cleandir)
cleandir: clean
-@if [ -e Makefile ]; then ${MAKE_ENV} ${MAKE} distclean; fi
.endif
#
# Obj dir rules for xenocara
#
.if !target(_xenocara_obj)
. if defined(NOOBJ)
_xenocara_obj:
. else
. if defined(OBJMACHINE)
__objdir= obj.$(MACHINE)
. else
__objdir= obj
. endif
. if defined(XENOCARA_OBJMACHINE)
__xobjdir= $(XENOCARA_OBJDIR).$(MACHINE)
__xobjdirpf=
. else
__xobjdir= $(XENOCARA_OBJDIR)
. if defined(OBJMACHINE)
__xobjdirpf= .$(MACHINE)
. else
__xobjdirpf=
. endif
. endif
_SUBDIRUSE:
_xenocara_obj! _SUBDIRUSE
@cd $(.CURDIR); \
here=`/bin/pwd`; xenocara_top=`cd $(XENOCARA_TOP); /bin/pwd`; \
subdir=$${here#$${xenocara_top}/}; \
if test $$here != $$subdir ; then \
dest=${__xobjdir}/$$subdir${__xobjdirpf}; \
echo "$$here/${__objdir} -> $$dest"; \
if test ! -L ${__objdir} -o \
X`readlink ${__objdir}` != X$$dest; then \
if test -e ${__objdir}; then rm -rf ${__objdir}; fi; \
ln -sf $$dest ${__objdir}; \
fi; \
if test -d ${__xobjdir} -a ! -d $$dest; then \
mkdir -p $$dest; \
else \
true; \
fi; \
else \
dest=$$here/${__objdir}; \
if test ! -d ${__objdir}; then \
echo "making $$dest"; \
mkdir $$dest; \
fi ; \
fi
. endif
.endif
.if !target(obj)
obj: _xenocara_obj
.endif
|