Annotation of xsrc/Makefile, Revision 1.9
1.9 ! fredb 1: # $NetBSD: Makefile,v 1.8 1999/09/27 08:56:05 fredb 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.
! 20: # BSDSRCDIR -- Set to the full path to the main source tree, /usr/src
! 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:
! 27: BSDSRCDIR?= /usr/src
1.1 mrg 28:
1.4 tv 29: all: all-xc all-contrib
30:
31: all-xc:
1.7 fredb 32: .if exists(xc/xmakefile) && defined(UPDATE)
33: @cd xc && ${MAKE} Everything
1.4 tv 34: .else
1.7 fredb 35: @-rm -f xc/xmakefile
1.4 tv 36: @cd xc && ${MAKE} World
37: .endif
1.1 mrg 38:
39: all-contrib:
1.8 fredb 40: @if [ ! -f contrib/Makefile ]; then \
41: cd contrib && PATH=../xc/config/imake:$$PATH \
42: sh ../xc/config/util/xmkmf -a ../xc ../contrib; \
43: fi
1.4 tv 44: @cd contrib && ${MAKE}
1.1 mrg 45:
46: install: install-xc install-contrib
47:
48: install-xc:
1.4 tv 49: @cd xc && ${MAKE} install && ${MAKE} install.man
1.1 mrg 50:
51: install-contrib:
1.4 tv 52: @cd contrib && ${MAKE} install && ${MAKE} install.man
1.3 mrg 53:
1.6 tron 54: clean:
1.7 fredb 55: @-cd xc && ${MAKE} clean
1.4 tv 56: @-cd contrib && ${MAKE} clean
1.6 tron 57:
1.7 fredb 58: cleandir distclean: clean
1.6 tron 59: find xc contrib -name .depend | xargs rm
60: find xc contrib -name 'Makefile*' | \
61: xargs grep -l "Makefile generated by imake" | xargs rm
62: -rmdir xc/exports
63: rm -f xc/xmakefile
1.5 tv 64:
65: build:
1.7 fredb 66: .if defined(UPDATE)
67: @${MAKE} all install
68: .else
69: @${MAKE} cleandir all install
1.5 tv 70: .endif
1.9 ! fredb 71:
! 72: # release goo
! 73: #
! 74: .if !defined(DESTDIR)
! 75: release snapshot:
! 76: @echo setenv DESTDIR before doing that!
! 77: @false
! 78: .elif !defined(RELEASEDIR)
! 79: release snapshot:
! 80: @echo setenv RELEASEDIR before doing that!
! 81: @false
! 82: #
! 83: .else
! 84: #
! 85: .if defined(INSTALL_DONE)
! 86: release snapshot:
! 87: .elif defined(BUILD_DONE)
! 88: release snapshot: install
! 89: .else
! 90: release snapshot: build
! 91: #
! 92: .endif # INSTALL_DONE or BUILD_DONE
! 93: #
! 94: ${INSTALL} -d -m 755 -o root -g wheel ${RELEASEDIR}/binary/sets
! 95: sh ${BSDSRCDIR}/distrib/sets/maketars -x -s ../src/distrib/sets \
! 96: -d ${DESTDIR} -t ${RELEASEDIR}/binary/sets
! 97: cd ${RELEASEDIR}/binary/sets && \
! 98: cksum -o 1 *.tgz >BSDSUM && \
! 99: cksum *.tgz >CKSUM && \
! 100: cksum -m *.tgz >MD5 && \
! 101: cksum -o 2 *.tgz >SYSVSUM
! 102: #
! 103: .endif # maketars exists and DESTDIR and RELEASEDIR check
! 104:
! 105: .include "/etc/mk.conf"
CVSweb <webmaster@jp.NetBSD.org>