[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / xsrc

Annotation of xsrc/Makefile, Revision 1.35

1.35    ! tron        1: #      $NetBSD: Makefile,v 1.34 2002/12/25 22:01:43 tron Exp $
1.1       mrg         2: #
1.9       fredb       3: # Targets & Variables
                      4: #
                      5: # build: Clean out xsrc, and build and install everything that goes
                      6: #      under /usr/X11R6.
                      7: #
                      8: #  DESTDIR -- Set to an alternative directory to install under.
                      9: #  UPDATE --  If set, don't make clean first, plus attempt to make
                     10: #      only the targets that are out of date.
                     11: #
                     12: # release snapshot: Same as build, plus tar up the X sets and install
                     13: #      them under the ${RELEASEDIR}/binary/sets directory.
                     14: #
                     15: #  DESTDIR -- Same as for build. Mandatory for building a release.
                     16: #  RELEASEDIR -- As explained above.
                     17: #  BUILD_DONE -- If set, assume build is already done.
                     18: #  INSTALL_DONE -- If set, assume binaries to tar up are to be found
                     19: #      in ${DESTDIR} already.
1.31      lukem      20: #  NETBSDSRCDIR -- Set to the full path to the main source tree, /usr/src
1.9       fredb      21: #      by default. Needed to find ./distrib/sets.
                     22: #
                     23: # cleandir distclean: Remove all generated files from under xsrc.
                     24: #
                     25: # clean: Remove object files, but keep imake generated makefiles.
                     26:
1.12      hubertf    27: .include <bsd.own.mk>
1.32      tron       28:
                     29: # Backwards compatibility with NetBSD 1.5 and 1.5.x where NETBSDSRCDIR
                     30: # doesn't get defined by  "bsd.own.mk".
                     31: NETBSDSRCDIR?= ${BSDSRCDIR}
1.12      hubertf    32:
1.24      tron       33: .if defined(USE_XF86_4) && (${USE_XF86_4} != no)
1.21      tron       34: XCDIR= xfree/xc
                     35: .else
                     36: XCDIR= xc
                     37: .endif
                     38:
1.19      fredb      39: .MAIN: all
1.29      jwise      40: .if defined(USE_XF86_4) && (${USE_XF86_4} != no)
                     41: all: all-xc all-local
                     42: .else
1.15      thorpej    43: all: all-xc all-contrib all-local
1.29      jwise      44: .endif
1.4       tv         45:
                     46: all-xc:
1.21      tron       47: .if exists(${XCDIR}/xmakefile) && defined(UPDATE)
                     48:        @cd ${XCDIR} && ${MAKE} Everything
1.4       tv         49: .else
1.21      tron       50:        @-rm -f ${XCDIR}/xmakefile
                     51:        @cd ${XCDIR} && ${MAKE} World
1.4       tv         52: .endif
1.1       mrg        53:
                     54: all-contrib:
1.8       fredb      55:        @if [ ! -f contrib/Makefile ]; then \
1.21      tron       56:          cd contrib && PATH=../${XCDIR}/config/imake:$$PATH \
1.23      tron       57:            sh ../${XCDIR}/config/util/xmkmf -a ../${XCDIR} \
                     58:               ${.CURDIR}/contrib; \
1.8       fredb      59:        fi
1.4       tv         60:        @cd contrib && ${MAKE}
1.1       mrg        61:
1.15      thorpej    62: all-local:
                     63:        @if [ ! -f local/Makefile ]; then \
1.21      tron       64:          cd local && PATH=../${XCDIR}/config/imake:$$PATH \
1.23      tron       65:            sh ../${XCDIR}/config/util/xmkmf -a ../${XCDIR} \
                     66:              ${.CURDIR}/local; \
1.15      thorpej    67:        fi
                     68:        @cd local && ${MAKE}
                     69:
1.29      jwise      70: .if defined(USE_XF86_4) && (${USE_XF86_4} != no)
                     71: install: install-xc install-local
                     72: .else
1.15      thorpej    73: install: install-xc install-contrib install-local
1.29      jwise      74: .endif
1.1       mrg        75:
                     76: install-xc:
1.27      fredb      77:        @cd ${XCDIR} && \
                     78:          ${MAKE} DESTDIR="${DESTDIR}" install && \
                     79:          ${MAKE} DESTDIR="${DESTDIR}" install.man
1.1       mrg        80:
                     81: install-contrib:
1.27      fredb      82:        @cd contrib && \
                     83:          ${MAKE} DESTDIR="${DESTDIR}" install && \
                     84:          ${MAKE} DESTDIR="${DESTDIR}" install.man
1.15      thorpej    85:
                     86: install-local:
1.27      fredb      87:        @cd local && \
                     88:          ${MAKE} DESTDIR="${DESTDIR}" install && \
                     89:          ${MAKE} DESTDIR="${DESTDIR}" install.man
1.3       mrg        90:
1.6       tron       91: clean:
1.29      jwise      92: .if defined(USE_XF86_4) && (${USE_XF86_4} != no)
                     93:        @-cd ${XCDIR} && ${MAKE} clean
                     94:        @-cd local && ${MAKE} clean
                     95: .else
1.21      tron       96:        @-cd ${XCDIR} && ${MAKE} clean
1.4       tv         97:        @-cd contrib && ${MAKE} clean
1.16      tron       98:        @-cd local && ${MAKE} clean
1.29      jwise      99: .endif
1.6       tron      100:
1.7       fredb     101: cleandir distclean: clean
1.21      tron      102:        find ${XCDIR} contrib local -name .depend | xargs rm
                    103:        find ${XCDIR} contrib local -name 'Makefile*' | \
1.17      simonb    104:            xargs grep -l "Makefile generated by imake" | xargs rm
1.21      tron      105:        -rmdir ${XCDIR}/exports
                    106:        rm -f ${XCDIR}/xmakefile
1.5       tv        107:
                    108: build:
1.7       fredb     109: .if defined(UPDATE)
1.28      mrg       110:        @${MAKE} all && ${MAKE} install
1.7       fredb     111: .else
1.28      mrg       112:        @${MAKE} cleandir && ${MAKE} all && ${MAKE} install
1.5       tv        113: .endif
1.9       fredb     114:
                    115: # release goo
                    116: #
                    117: .if !defined(DESTDIR)
                    118: release snapshot:
                    119:        @echo setenv DESTDIR before doing that!
                    120:        @false
                    121: .elif !defined(RELEASEDIR)
                    122: release snapshot:
                    123:        @echo setenv RELEASEDIR before doing that!
                    124:        @false
                    125: #
                    126: .else
                    127: #
                    128: .if defined(INSTALL_DONE)
                    129: release snapshot:
                    130: .elif defined(BUILD_DONE)
                    131: release snapshot: install
                    132: .else
                    133: release snapshot: build
                    134: #
                    135: .endif # INSTALL_DONE or BUILD_DONE
                    136: #
                    137:        ${INSTALL} -d -m 755 -o root -g wheel ${RELEASEDIR}/binary/sets
1.26      wiz       138: .if (${MACHINE} == "amiga") && !(defined(USE_XF86_4) && (${USE_XF86_4} != no))
1.21      tron      139:        cd ${XCDIR}/programs/Xserver/hw/netbsd/amiga && \
1.20      is        140:                ${INSTALL} -c -m 644 INSTALL.X11 ${RELEASEDIR}
1.18      is        141: .endif
1.35    ! tron      142: .if defined(METALOG.add) && !exists(${DESTDIR}/etc)
1.34      tron      143:        cd ${NETBSDSRCDIR}/distrib/sets && \
                    144:            sh ./maketars -x -d ${DESTDIR:S,^$,/,} -N ${NETBSDSRCDIR}/etc -t ${RELEASEDIR}/binary/sets
                    145: .else
1.31      lukem     146:        cd ${NETBSDSRCDIR}/distrib/sets && \
1.33      lukem     147:            sh ./maketars -x -d ${DESTDIR:S,^$,/,} -t ${RELEASEDIR}/binary/sets
1.34      tron      148: .endif
1.9       fredb     149:        cd ${RELEASEDIR}/binary/sets && \
                    150:                cksum -o 1 *.tgz >BSDSUM && \
                    151:                cksum *.tgz >CKSUM && \
                    152:                cksum -m *.tgz >MD5 && \
                    153:                cksum -o 2 *.tgz >SYSVSUM
                    154: #
1.13      fredb     155: .endif # DESTDIR and RELEASEDIR check

CVSweb <webmaster@jp.NetBSD.org>