Make 'obj' now can make symlinks to /usr/obj/xenocara (or any other
directory designed by XENOCARA_OBJDIR in /etc/mk.conf).
This commit is contained in:
parent
ff76f63180
commit
6a5579f8e8
6
README
6
README
@ -82,9 +82,7 @@ to any module sub-directory and run 'make build' from there.
|
||||
|
||||
Xenocara supports objdirs (and it's even the recommended way to build
|
||||
things). Just run 'make obj' at any level before 'make build' to make
|
||||
sure the object directory is created.
|
||||
|
||||
XXX support for objdirs needs to be improved! XXX
|
||||
sure that the object directories are created.
|
||||
|
||||
Shadow trees
|
||||
|
||||
@ -104,4 +102,4 @@ makefiles skeletons. For that use the following command:
|
||||
You can also set XENOCARA_RERUN_AUTOCONF in /etc/mk.conf to force
|
||||
regeneration of configure scripts in every component.
|
||||
|
||||
$OpenBSD: README,v 1.3 2006/11/30 17:58:48 matthieu Exp $
|
||||
$OpenBSD: README,v 1.4 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
@ -13,7 +13,7 @@ CFLAGS+= -I${X11BASE}/include -I${.CURDIR} -I${.CURDIR}/.. \
|
||||
FVWMLIBDIR= ${X11BASE}/lib/X11/fvwm
|
||||
MANDIR= ${X11BASE}/man/cat
|
||||
|
||||
.include <bsd.obj.mk>
|
||||
obj: _xenocara_obj
|
||||
|
||||
.if exists(${.CURDIR}/../libs/${__objdir})
|
||||
LDADD+= -L${X11BASE}/lib -L${.CURDIR}/../libs/${__objdir} -lfvwm
|
||||
|
@ -12,7 +12,7 @@ CFLAGS+= -I${X11BASE}/include -I${.CURDIR}/../.. -I${.CURDIR}/../../libs
|
||||
FVWMLIBDIR= ${X11BASE}/lib/X11/fvwm
|
||||
MANDIR= ${X11BASE}/man/cat
|
||||
|
||||
.include <bsd.obj.mk>
|
||||
obj: _xenocara_obj
|
||||
|
||||
.if exists(${.CURDIR}/../../libs/${__objdir})
|
||||
LDADD+= -L${X11BASE}/lib -L${.CURDIR}/../../libs/${__objdir} -lfvwm
|
||||
|
@ -1,7 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.2 2006/11/27 19:56:35 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
NOOBJ=Yes
|
||||
|
||||
depend:
|
||||
|
||||
all:
|
||||
|
@ -10,6 +10,8 @@ PROG= glxgears
|
||||
CPPFLAGS+= -I${X11BASE}/include
|
||||
LDADD+= -L${X11BASE}/lib -lGL -lXext -lX11 -lm
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
||||
|
@ -10,6 +10,8 @@ PROG= glxinfo
|
||||
CPPFLAGS+= -I${X11BASE}/include
|
||||
LDADD+= -L${X11BASE}/lib -lGL -lXext -lX11 -lm
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2006/11/29 11:33:14 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
X11BASE?= /usr/X11R6
|
||||
@ -35,5 +35,7 @@ afterinstall:
|
||||
|
||||
beforedepend: $(CLASS)_ad.h
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
@ -9,5 +9,7 @@ CPPFLAGS+= -I${X11BASE}/include
|
||||
LDADD+= -L${X11BASE}/lib -lXext -lX11
|
||||
MANDIR= ${X11BASE}/man/cat
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2006/11/26 10:57:44 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
X11BASE?= /usr/X11R6
|
||||
@ -11,5 +11,7 @@ LDADD+= -L${X11BASE}/lib -lXss -lXext -lX11
|
||||
|
||||
MANDIR= ${X11BASE}/man/cat
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.5 2006/11/29 11:33:49 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.6 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
||||
PROG= xsystrace
|
||||
MAN= xsystrace.1
|
||||
@ -19,6 +19,8 @@ afterinstall:
|
||||
X11BASE?= /usr/X11R6
|
||||
MANDIR= ${X11BASE}/man/cat
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2006/11/26 10:59:22 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
X11BASE?= /usr/X11R6
|
||||
@ -11,5 +11,7 @@ LDADD+=-L${X11BASE}/lib -lXv -lXext -lX11
|
||||
|
||||
MANDIR= ${X11BASE}/man/cat
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
@ -1,5 +1,5 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2006/11/29 18:03:09 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 2006/11/29 18:03:09 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2006/12/02 16:28:48 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2006/12/02 16:28:48 matthieu Exp $
|
||||
.include <bsd.own.mk>
|
||||
|
||||
DIST= ${.CURDIR}
|
||||
@ -23,6 +23,8 @@ includes:
|
||||
${DIST}/lib/expat_external.h \
|
||||
${DESTDIR}${X11BASE}/include/expat_external.h
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
NOPROFILE=
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2006/11/29 18:03:09 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
||||
FREETYPESRC= ${.CURDIR}/src
|
||||
|
||||
@ -18,9 +18,12 @@ CPPFLAGS+= -I${.CURDIR}/include -I${.CURDIR}/src/lzw -DFT2_BUILD_LIBRARY
|
||||
|
||||
CLEANFILES+= freetype-config freetype2.pc
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
build:
|
||||
cd ${.CURDIR} && ${MAKE} clean
|
||||
cd ${.CURDIR} && ${SUDO} ${MAKE} includes
|
||||
cd ${.CURDIR} && ${MAKE} depend
|
||||
cd ${.CURDIR} && ${MAKE} all
|
||||
cd ${.CURDIR} && ${SUDO} ${MAKE} install
|
||||
|
||||
|
@ -390,6 +390,8 @@ x86_xform4.o: matypes.h
|
||||
|
||||
NOPROFILE=
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
||||
|
@ -119,8 +119,7 @@ CPPFLAGS+= -I${DIST}/include \
|
||||
|
||||
NOPROFILE=
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
obj: _xenocara_obj
|
||||
|
||||
includes:
|
||||
@cmp -s ${DIST}/include/GL/glu.h \
|
||||
@ -128,6 +127,9 @@ includes:
|
||||
|| ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
|
||||
${DIST}/include/GL/glu.h ${DESTDIR}${X11BASE}/include/GL
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
.include <bsd.xorg.mk>
|
||||
|
||||
.PATH: ${GLU}/libutil
|
||||
.PATH: ${GLU}/libtess
|
||||
.PATH: ${GLU}/libnurbs/interface
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2006/11/29 18:03:09 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2006/12/02 16:28:48 matthieu Exp $
|
||||
|
||||
DIST= ${.CURDIR}/../../dist/Mesa
|
||||
GLW= ${DIST}/src/glw
|
||||
@ -17,6 +17,8 @@ INCS= \
|
||||
GLwMDrawA.h \
|
||||
GLwMDrawAP.h
|
||||
|
||||
obj: _xenocara_obj
|
||||
|
||||
includes:
|
||||
cd ${GLW}; for i in ${INCS}; do \
|
||||
j="cmp -s $$i ${DESTDIR}${INCSDIR}/GL/$$i || \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: bsd.xorg.mk,v 1.7 2006/11/29 21:51:46 matthieu Exp $ -*- makefile -*-
|
||||
# $OpenBSD: bsd.xorg.mk,v 1.8 2006/12/02 16:28:48 matthieu Exp $ -*- makefile -*-
|
||||
#
|
||||
# Copyright © 2006 Matthieu Herrb
|
||||
#
|
||||
@ -27,8 +27,8 @@ AUTOCONF_VERSION= 2.59
|
||||
# Where source lives
|
||||
XENOCARA_TOP?= /usr/xenocara
|
||||
|
||||
# Where to buid - not used?
|
||||
# XORG_BUILDDIR= ${XENOCARA_TOP}
|
||||
# Where to build
|
||||
XENOCARA_OBJDIR?= /usr/obj/xenocara
|
||||
|
||||
# Where to install
|
||||
X11BASE?= /usr/X11R6
|
||||
@ -41,7 +41,7 @@ MANDIR= ${X11BASE}/man/cat
|
||||
|
||||
PKG_CONFIG_PATH= ${X11BASE}/lib/pkgconfig
|
||||
|
||||
_cache= --cache-file=${XENOCARA_TOP}/xorg-config.cache.${MACHINE}
|
||||
_cache= --cache-file=${XENOCARA_OBJDIR}/xorg-config.cache.${MACHINE}
|
||||
|
||||
MAKE_ENV+= AUTOMAKE_VERSION="$(AUTOMAKE_VERSION)" \
|
||||
AUTOCONF_VERSION="$(AUTOCONF_VERSION)" \
|
||||
@ -70,7 +70,7 @@ all: config.status
|
||||
|
||||
.if !target(config.status)
|
||||
.if defined(XENOCARA_RERUN_AUTOCONF) && ${XENOCARA_RERUN_AUTOCONF:L} == "yes"
|
||||
config.status:
|
||||
config.status: _xenocara_obj
|
||||
cd ${.CURDIR}; ${MAKE_ENV} autoreconf -v --install --force
|
||||
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
|
||||
${CONFIGURE_ENV} ${.CURDIR}/configure \
|
||||
@ -80,7 +80,7 @@ config.status:
|
||||
${_cache} \
|
||||
${CONFIGURE_ARGS}
|
||||
.else
|
||||
config.status:
|
||||
config.status: _xenocara_obj
|
||||
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" \
|
||||
${CONFIGURE_ENV} ${.CURDIR}/configure --prefix=${X11BASE} \
|
||||
--sysconfdir=/etc \
|
||||
@ -131,4 +131,61 @@ cleandir: clean
|
||||
-@if [ -e Makefile ]; then ${MAKE_ENV} ${MAKE} distclean; fi
|
||||
.endif
|
||||
|
||||
.include <bsd.obj.mk>
|
||||
#
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user