# $Header:Makefile 12.0$ 
# $ACIS:Makefile 12.0$ 
# $Source: /ibm/acis/usr/src/new/notes/RCS/Makefile,v $ 

#	%M%	%I%	%E%
#
DESTDIR=
UTILITY=${DESTDIR}/usr/spool/notes/.utilities

all:    src
	cd src; make ${MFLAGS} DESTDIR=${DESTDIR} all

clean:
	cd src; make ${MFLAGS} clean
	@rm -f placehelp placebin
	@echo binaries and objects removed

install: placehelp
	cd src; make ${MFLAGS} DESTDIR=${DESTDIR} install
	cd Samples; make ${MFLAGS} DESTDIR=${DESTDIR} install
	cd man; make ${MFLAGS} DESTDIR=${DESTDIR} install
	@echo notefiles installed

placehelp:	help/access.help help/dir.help help/index.help
placehelp:	help/lim.help help/read.help
	cd src; make ${MFLAGS} DESTDIR=${DESTDIR} dirs
	install -c -o notes -m 644 help/access.help $(UTILITY)/access.help
	install -c -o notes -m 644 help/dir.help $(UTILITY)/dir.help
	install -c -o notes -m 644 help/index.help $(UTILITY)/index.help
	install -c -o notes -m 644 help/lim.help $(UTILITY)/lim.help
	install -c -o notes -m 644 help/read.help $(UTILITY)/read.help
	@echo ------ help installation done

placebin:
	cd src; make DESTDIR=${DESTDIR} placebin

# Run only at build time. Not needed to re-compile binaries.
bootstrap:
	cd src; make base DESTDIR=${DESTDIR}
	cd src; su notes -c "make boot DESTDIR=${DESTDIR}"

