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

Annotation of xenocara/Makefile, Revision 1.71

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