[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / xenocara

Annotation of xenocara/Makefile, Revision 1.68

1.68    ! ajacouto    1: # $OpenBSD: Makefile,v 1.67 2015/08/23 18:50:33 deraadt Exp $
1.1       matthieu    2: .include <bsd.own.mk>
1.45      matthieu    3: .include <bsd.xconf.mk>
1.1       matthieu    4:
1.11      matthieu    5: LOCALAPPD=/usr/local/lib/X11/app-defaults
                      6: LOCALAPPX=/usr/local/lib/X11
                      7: REALAPPD=/etc/X11/app-defaults
1.20      matthieu    8: XCONFIG=${XSRCDIR}/etc/X11.${MACHINE}/xorg.conf
1.15      todd        9: RM?=rm
1.11      matthieu   10:
1.51      todd       11: .if ${MACHINE_ARCH} != "vax"
1.23      matthieu   12: XSERVER= xserver
1.28      matthieu   13: .endif
                     14:
1.46      matthieu   15: .if defined(XENOCARA_BUILD_PIXMAN)
1.52      miod       16: .if ${XENOCARA_BUILD_PIXMAN:L} == "yes" && \
1.54      miod       17:     ${XENOCARA_BUILD_GL:L} == "yes" && \
1.50      miod       18:     ${XENOCARA_HAVE_SHARED_LIBS:L} == "yes"
1.28      matthieu   19: XSERVER+= kdrive
1.46      matthieu   20: .endif
1.23      matthieu   21: .endif
                     22:
1.41      matthieu   23: SUBDIR= proto font/util data/bitmaps lib app data \
1.33      matthieu   24:        ${XSERVER} driver util doc
1.1       matthieu   25: .ifndef NOFONTS
                     26: SUBDIR+= font
                     27: .endif
1.18      todd       28: SUBDIR+= distrib/notes
1.1       matthieu   29:
1.10      matthieu   30: NOOBJ=
1.1       matthieu   31:
1.66      matthieu   32: .if defined(DESTDIR)
                     33: build:
                     34:        @echo "Cannot run ${MAKE} build with DESTDIR set"
                     35:        @exit 2
                     36: .else
1.47      espie      37: build:
                     38:        exec ${SUDO} ${MAKE} bootstrap-root
                     39:        cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper
                     40:        exec ${SUDO} ${MAKE} beforebuild
                     41:        exec ${MAKE} realbuild
                     42:        exec ${SUDO} ${MAKE} afterbuild
1.66      matthieu   43: .endif
1.47      espie      44:
                     45: realbuild: _SUBDIRUSE
                     46:        # that's all folks
1.1       matthieu   47:
                     48: bootstrap:
1.47      espie      49:        exec ${SUDO} ${MAKE} bootstrap-root
                     50:
                     51: bootstrap-root:
                     52:        exec ${MAKE} distrib-dirs
                     53:        exec ${MAKE} install-mk
                     54:
                     55: beforeinstall beforebuild:
                     56:        cd util/macros && exec ${MAKE} -f Makefile.bsd-wrapper install
                     57:        exec ${MAKE} includes
                     58:
                     59: afterinstall afterbuild:
                     60:        exec ${MAKE} fix-appd
1.57      schwarze   61:        /usr/sbin/makewhatis -Qv ${DESTDIR}/usr/X11R6/man
1.68    ! ajacouto   62:        touch ${DESTDIR}/var/sysmerge/xetcsum
1.63      ajacouto   63:        cd ${DESTDIR}/ && \
                     64:                sort ${.CURDIR}/distrib/sets/lists/xetc/{mi,md.${MACHINE}} | \
1.68    ! ajacouto   65:                xargs sha256 -h ${DESTDIR}/var/sysmerge/xetcsum || true
1.58      espie      66:        cd distrib/sets && exec ${MAKE}
1.3       matthieu   67:
1.14      matthieu   68: install-mk:
1.47      espie      69:        cd share/mk && exec ${MAKE} X11BASE=${X11BASE} install
1.10      matthieu   70:
1.11      matthieu   71: fix-appd:
                     72:        # Make sure /usr/local/lib/X11/app-defaults is a link
                     73:        if [ ! -L $(DESTDIR)${LOCALAPPD} ]; then \
                     74:            if [ -d $(DESTDIR)${LOCALAPPD} ]; then \
1.48      espie      75:                mv $(DESTDIR)${LOCALAPPD}/* $(DESTDIR)${REALAPPD} || true; \
1.11      matthieu   76:                rmdir $(DESTDIR)${LOCALAPPD}; \
                     77:            fi; \
                     78:            mkdir -p ${DESTDIR}${LOCALAPPX}; \
                     79:            ln -s ${REALAPPD} ${DESTDIR}${LOCALAPPD}; \
                     80:        fi
1.3       matthieu   81:
1.47      espie      82: font-cache:
                     83:        cd font/alias && exec ${MAKE} -f Makefile.bsd-wrapper afterinstall
                     84:
1.53      espie      85: .if ! ( defined(DESTDIR) && defined(RELEASEDIR) )
                     86: release:
                     87:        @echo You must set DESTDIR and RELEASEDIR for a release.; exit 255
                     88: .else
1.55      todd       89: release: sha
                     90:
                     91: sha: release-clean release-install dist hash
                     92:
                     93: hash: dist
                     94:        -cd ${RELEASEDIR}; \
1.56      sthen      95:                cksum -a sha256 x*tgz > SHA256
1.55      todd       96:
                     97: .ORDER: release-clean release-install dist hash
1.53      espie      98: .endif
1.3       matthieu   99:
                    100: release-clean:
                    101:        ${RM} -rf ${DESTDIR}/usr/X11R6/* ${DESTDIR}/usr/X11R6/.[a-zA-Z0-9]*
                    102:        ${RM} -rf ${DESTDIR}/var/cache/*
                    103:        ${RM} -rf ${DESTDIR}/etc/X11/*
                    104:        ${RM} -rf ${DESTDIR}/etc/fonts/*
                    105:        @if [ -d ${DESTDIR}/usr/X11R6 ] && [ "`cd ${DESTDIR}/usr/X11R6;ls`" ]; then \
                    106:                echo "Files found in ${DESTDIR}/usr/X11R6:"; \
                    107:                (cd ${DESTDIR}/usr/X11R6;/bin/pwd;ls -a); \
                    108:                echo "Cleanup before proceeding."; \
                    109:                exit 255; \
                    110:        fi
                    111:
                    112: release-install:
1.59      matthieu  113:        @exec ${MAKE} bootstrap-root
1.44      matthieu  114: .if ${MACHINE} == zaurus
1.3       matthieu  115:        @if [ -f $(DESTDIR)/etc/X11/xorg.conf ]; then \
                    116:         echo "Not overwriting existing" $(DESTDIR)/etc/X11/xorg.conf; \
                    117:        else set -x; \
                    118:         ${INSTALL} ${INSTALL_COPY} -o root -g wheel -m 644 \
                    119:                ${XCONFIG} ${DESTDIR}/etc/X11 ; \
                    120:        fi
                    121: .endif
1.61      matthieu  122:        @exec ${MAKE} install
1.3       matthieu  123:
                    124: dist-rel:
                    125:        ${MAKE} RELEASEDIR=`pwd`/rel DESTDIR=`pwd`/dest dist 2>&1 | tee distlog
                    126:
                    127: dist:
                    128:        cd distrib/sets && \
1.67      deraadt   129:                env MACHINE=${MACHINE} ksh ./maketars ${OSrev} ${OSREV}
1.3       matthieu  130:
1.64      deraadt   131: checkdist:
1.65      deraadt   132:        @cd distrib/sets && \
1.64      deraadt   133:                { env MACHINE=${MACHINE} ksh ./checkflist ${OSREV} || true ; }
1.1       matthieu  134:
                    135: distrib-dirs:
1.25      matthieu  136: .if defined(DESTDIR) && ${DESTDIR} != ""
1.47      espie     137:        # running mtree under ${DESTDIR}
1.31      matthieu  138:        mtree -qdef /etc/mtree/BSD.x11.dist -p ${DESTDIR} -U
1.25      matthieu  139: .else
1.47      espie     140:        # running mtree
1.31      matthieu  141:        mtree -qdef /etc/mtree/BSD.x11.dist -p / -U
1.25      matthieu  142: .endif
                    143:
1.1       matthieu  144:
1.9       matthieu  145: .PHONY: all build beforeinstall install afterinstall release clean cleandir \
1.47      espie     146:        dist distrib-dirs fix-appd beforebuild bootstrap afterbuild realbuild \
                    147:        install-mk bootstrap-root
1.1       matthieu  148:
1.11      matthieu  149: .include <bsd.subdir.mk>
1.1       matthieu  150: .include <bsd.xorg.mk>