summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-25 14:56:33 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-11-25 14:56:33 +0000
commit1501c7c296a56b70d3068de3c22889e2c412c78c (patch)
treea7aad5f6597516a10d37a6af2213aa7a919b2260 /share
Makefile rules to help the build of the modular X.Org.
Diffstat (limited to 'share')
-rw-r--r--share/mk/Makefile13
-rw-r--r--share/mk/bsd.xorg.mk142
2 files changed, 155 insertions, 0 deletions
diff --git a/share/mk/Makefile b/share/mk/Makefile
new file mode 100644
index 000000000..0edfa94d1
--- /dev/null
+++ b/share/mk/Makefile
@@ -0,0 +1,13 @@
+# $OpenBSD: Makefile,v 1.1 2006/11/25 14:56:32 matthieu Exp $
+
+.include <bsd.own.mk>
+
+FILES= bsd.xorg.mk
+
+all:
+
+install::
+ ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
+ ${DESTDIR}${X11BASE}/share/mk
+
+.include <bsd.xorg.mk>
diff --git a/share/mk/bsd.xorg.mk b/share/mk/bsd.xorg.mk
new file mode 100644
index 000000000..b7bfc9fd2
--- /dev/null
+++ b/share/mk/bsd.xorg.mk
@@ -0,0 +1,142 @@
+# $OpenBSD: bsd.xorg.mk,v 1.1 2006/11/25 14:56:32 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 buid - not used?
+# XORG_BUILDDIR= ${XENOCARA_TOP}
+
+# Where to install
+X11BASE?= /usr/X11R6
+
+BINDIR= ${X11BASE}/bin
+LIBDIR= ${X11BASE}/lib
+INCSDIR= ${X11BASE}/include
+MANDIR= ${X11BASE}/man/cat
+
+PKG_CONFIG_PATH= ${X11BASE}/lib/pkgconfig
+
+DIST?= ${.CURDIR}
+
+AUTOGEN= ${DIST}/autogen.sh
+
+_cache= --cache-file=${XENOCARA_TOP}/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:
+ ${MAKE_ENV} ${CONFIGURE_ENV} ${AUTOGEN} --prefix=${X11BASE} \
+ --sysconfdir=/etc \
+ --mandir=${X11BASE}/man \
+ ${_cache} \
+ ${CONFIGURE_ARGS}
+.else
+config.status:
+ PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
+ ${CONFIGURE_ENV} ${DIST}/configure --prefix=${X11BASE} \
+ --sysconfdir=/etc \
+ --mandir=${X11BASE}/man \
+ ${_cache} \
+ ${CONFIGURE_ARGS}
+.endif
+.endif
+
+.if !target(depend)
+depend:
+ @echo "no dependencies here yet"
+.endif
+
+.if exists($(DIST)/.git)
+update:
+ cd $(DIST); git pull
+.else
+update:
+ @echo "no git repository to pull"
+.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
+
+.include <bsd.obj.mk>