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

Annotation of xenocara/Makefile, Revision 1.78

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