Various cleanups of recursive make invocations. Ok espie@, todd@.

This commit is contained in:
matthieu
2007-03-28 19:38:57 +00:00
parent a8d161e92a
commit 50d6fcc51b

View File

@@ -1,4 +1,4 @@
# $OpenBSD: bsd.xorg.mk,v 1.15 2007/03/25 16:52:54 matthieu Exp $ -*- makefile -*- # $OpenBSD: bsd.xorg.mk,v 1.16 2007/03/28 19:38:57 matthieu Exp $ -*- makefile -*-
# #
# Copyright <20> 2006 Matthieu Herrb # Copyright <20> 2006 Matthieu Herrb
# #
@@ -41,11 +41,13 @@ _cache= --cache-file=${XENOCARA_OBJDIR}/xorg-config.cache.${MACHINE}
CFLAGS+= $(COPTS) CFLAGS+= $(COPTS)
MAKE_ENV+= AUTOMAKE_VERSION="$(AUTOMAKE_VERSION)" \ CONFIGURE_ENV= PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" \
CFLAGS="$(CFLAGS:C/ *$//)"
AUTOTOOLS_ENV= AUTOMAKE_VERSION="$(AUTOMAKE_VERSION)" \
AUTOCONF_VERSION="$(AUTOCONF_VERSION)" \ AUTOCONF_VERSION="$(AUTOCONF_VERSION)" \
ACLOCAL="aclocal -I ${X11BASE}/share/aclocal" \ ACLOCAL="aclocal -I ${X11BASE}/share/aclocal" \
PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" \ $(CONFIGURE_ENV)
CFLAGS="$(CFLAGS:C/ *$//)"
.if !target(.MAIN) .if !target(.MAIN)
.MAIN: all .MAIN: all
@@ -64,7 +66,7 @@ _lt_libs+=lib${_n:S/+/_/g:S/-/_/g:S/./_/g}_ltversion=${_v}
.if !target(all) .if !target(all)
all: config.status all: config.status
${MAKE_ENV} ${MAKE} ${_lt_libs} exec ${MAKE} ${_lt_libs}
.endif .endif
@@ -73,7 +75,7 @@ REORDER_DEPENDENCIES += ${X11BASE}/share/mk/automake.dep
.if !target(config.status) .if !target(config.status)
config.status: config.status:
.if defined(XENOCARA_RERUN_AUTOCONF) && ${XENOCARA_RERUN_AUTOCONF:L} == "yes" .if defined(XENOCARA_RERUN_AUTOCONF) && ${XENOCARA_RERUN_AUTOCONF:L} == "yes"
cd ${.CURDIR}; ${MAKE_ENV} autoreconf -v --install --force cd ${.CURDIR}; ${AUTOTOOLS_ENV} exec autoreconf -v --install --force
.else .else
@sed -e '/^#/d' ${REORDER_DEPENDENCIES} | \ @sed -e '/^#/d' ${REORDER_DEPENDENCIES} | \
tsort -r|while read f; do \ tsort -r|while read f; do \
@@ -90,8 +92,7 @@ config.status:
;; \ ;; \
esac; done esac; done
.endif .endif
PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" CFLAGS="$(CFLAGS:C/ *$//)" \ ${CONFIGURE_ENV} exec sh ${.CURDIR}/configure --prefix=${X11BASE} \
${CONFIGURE_ENV} sh ${.CURDIR}/configure --prefix=${X11BASE} \
--sysconfdir=/etc \ --sysconfdir=/etc \
--mandir=${X11BASE}/man \ --mandir=${X11BASE}/man \
${_cache} \ ${_cache} \
@@ -112,7 +113,7 @@ afterinstall:
. endif . endif
. if !target(realinstall) . if !target(realinstall)
realinstall: realinstall:
${MAKE_ENV} ${MAKE} ${_lt_libs} install exec ${MAKE} ${_lt_libs} install
.endif .endif
install: maninstall install: maninstall
maninstall: afterinstall maninstall: afterinstall
@@ -120,30 +121,25 @@ afterinstall: realinstall
realinstall: beforeinstall realinstall: beforeinstall
.endif .endif
.if !target(dist)
dist:
${MAKE_ENV} ${MAKE} ${_lt_libs} dist
.endif
.if !target(build) .if !target(build)
.if exists(Makefile.bsd-wrapper) .if exists(Makefile.bsd-wrapper)
_wrapper = -f Makefile.bsd-wrapper _wrapper = -f Makefile.bsd-wrapper
.endif .endif
build: build:
cd ${.CURDIR} && ${MAKE_ENV} ${MAKE} ${_wrapper} cleandir cd ${.CURDIR} && exec ${MAKE} ${_wrapper} cleandir
cd ${.CURDIR} && ${MAKE_ENV} ${MAKE} ${_wrapper} depend cd ${.CURDIR} && exec ${MAKE} ${_wrapper} depend
cd ${.CURDIR} && ${MAKE_ENV} ${MAKE} ${_wrapper} all cd ${.CURDIR} && exec ${MAKE} ${_wrapper} all
cd ${.CURDIR} && ${MAKE_ENV} ${SUDO} ${MAKE} ${_wrapper} install cd ${.CURDIR} && exec ${SUDO} ${MAKE} ${_wrapper} install
.endif .endif
.if !target(clean) .if !target(clean)
clean: clean:
-@if [ -e Makefile ]; then ${MAKE_ENV} ${MAKE} clean; fi -@if [ -e Makefile ]; then exec ${MAKE} clean; fi
.endif .endif
.if !target(cleandir) .if !target(cleandir)
cleandir: clean cleandir: clean
-@if [ -e Makefile ]; then ${MAKE_ENV} ${MAKE} distclean; fi -@if [ -e Makefile ]; then exec ${MAKE} distclean; fi
.endif .endif
# #