view Makefile @ 1:848621fd0092 kono mh-6_8_4_JP3_05

MH pre UTF8
author kono
date Mon, 18 Apr 2005 23:46:02 +0900
parents bce86c4163a3
children 441a2190cfae
line wrap: on
line source

##############################################################################
#	Instructions to Make, for compilation of MH modules
#
#	This file is automatically generated.  Do not edit!
# @(#)$Id$
##############################################################################

MAKE	=	make DESTDIR=$(DESTDIR) $(MFLAGS) -k
SHELL	=	/bin/sh

# Targets to Make:
#    
#    all:	generate MH system, assumes configuration previously done
#
#    depend:	generate dependencies, for MH master maintainers only!
#
#    lint:	verify code, for MH master maintainers only!
#
#    compat-v7:	verify V7 restrictions, for MH master maintainers only!
#
#    install:	install system
#
#    inst-all:	install system
#
#    inst-lib:  install shared libraries
#
#    mkdirs:	make MH target directories
#
#    tar:	generate tar commands to move targets to other systems
#		    e.g., make TFLAGS="cf mh.tar" tar
#    
#    uninstall:	undo installation
#    
#    distribution:
#		revert source tree to MH distribution
#    unconfig:
#		removes configured files - for MH master maintainers only!
#    
#    checkout:	MH maintainers only!
#
#    clean:	remove all objects and targets plus clean up
#    
#    unclean:	remove scratch files and backups


##############################################################################
#	Generate MH system
##############################################################################

ALL	=	config sbr mts zotnet uip support doc

all:;		for d in $(ALL); do (cd $$d; $(MAKE) all); done

depend:;	for d in $(ALL); do (cd $$d; $(MAKE) depend); done

lint:;		for d in $(ALL); do (cd $$d; $(MAKE) lint); done

compat-v7:	all
		miscellany/tools/7limit */x* */*/x*
		miscellany/tools/8limit */*.o */*/*.o


INSTALL	=	zotnet support uip doc
BINDIR	=	$(DESTDIR)/usr/local/mh/bin
ETCDIR	=	$(DESTDIR)/usr/local/mh/lib
MANDIR	=	$(DESTDIR)/usr/local/man
SLIB	=	sbr

install:	inst-all

inst-all:	mkdirs inst-lib
		for d in $(INSTALL); do (cd $$d; $(MAKE) inst-all); done

inst-lib:;	for d in $(SLIB); do (cd $$d; $(MAKE) inst-lib); done

mkdirs:		$(BINDIR) $(ETCDIR) $(MANDIR)

$(BINDIR) $(ETCDIR) $(MANDIR):
		sh ./install-sh -d $@

tar:;		@for d in $(INSTALL); \
		    do (cd $$d; $(MAKE) TFLAGS="$(TFLAGS)" tar); done

uninstall:;	for d in $(INSTALL); do (cd $$d; $(MAKE) uninstall); done


##############################################################################
#	Miscellaneous tasks
##############################################################################

DISTRIBUTION=	dist conf config sbr mts zotnet support uip doc papers

distribution:	READ-ME CHANGES
		rm -f _* :*
		@if test -f tma/mh/files; \
		 then \
		    echo rm -f `cat tma/mh/files`; rm -f `cat tma/mh/files`; \
		    echo rm -rf tma; rm -rf tma; \
		 fi
		-rm -f support/pop/mmdfII/pop/lock.c
		-rm -f support/bboards/mmdfII/bboards/lock.c
		-rm -f zotnet/tws/tws.h
		-rm -f uip/pshsbr.c
		cd support/pop/mmdfII/pop ; ln ../../../../zotnet/mts/lock.c .
		cd support/bboards/mmdfII/bboards ; ln ../../../../zotnet/mts/lock.c .
		cd zotnet/tws ; ln ../tws.h .
		cd uip ; ln popsbr.c pshsbr.c
		for d in $(DISTRIBUTION); \
		    do (cd $$d; $(MAKE) distribution); done

READ-ME:	conf/mh-gen.8
		nroff -man conf/mh-gen.8 > read-me.tmp
		mv read-me.tmp $@

CHANGES:	papers/changes/mh-changes.ms
		nroff -ms papers/changes/mh-changes.ms > changes.tmp
		mv changes.tmp $@

unconfig:;	rm -f _* :* core *.core READ-ME
		-rm -f config.cache config.log config.status
		-rm -f support/pop/mmdfII/pop/lock.c
		-rm -f support/bboards/mmdfII/bboards/lock.c
		-rm -f zotnet/tws/tws.h
		-rm -f uip/pshsbr.c
		for d in $(DISTRIBUTION); do (cd $$d; $(MAKE) unconfig); done
		cp conf/makefiles/MH-Unconfig tmp
		mv tmp Makefile

checkout:	unclean lint compat-v7
		find . \( -name ":*" -o -name "_*" -o -name "#*" \) -a -print

clean:;		rm -f _* :* core *.core
		for d in $(DISTRIBUTION); do (cd $$d; $(MAKE) clean); done

unclean:;	rm -f _* :* core *.core
		for d in $(DISTRIBUTION); do (cd $$d; $(MAKE) unclean); done