# $Id: Makefile,v 3.7 1998/12/14 19:48:45 te3d Exp $ #################################################################################### # # File: Makefile # # Purpose: Automates builds, cleans, and conversions to HTML. # # Authors: # txe Travis Emmitt emmitt@virginia.edu # # Motifications: # 03-NOV-1998 txe (v1) Initial creation # 04-NOV-1998 txe Testing, submitted to RCS # 05-NOV-1998 txe Improved "intelligence", removed separate compilation # 06-NOV-1998 rgb Added version control header info # 06-NOV-1998 txe Fixed checkin, added test, added change_port.pl # 08-NOV-1998 txe Added fetch to "html" command, added ServerThread # 09-NOV-1998 txe Added backup, backup2, and new # 10-NOV-1998 txe Disabled -nowarn, improved fetch, change_port.pl, new -= html # # 13-NOV-1998 txe (v2) Added new version 2 files # 14-NOV-1998 txe Added "who", uses proj4.html, removed Drawable, DrawableDepend # 15-NOV-1998 txe Improved display of "who" command, added Exceptions # 16-NOV-1998 txe Added GUIException, MapException, StatsException # 18-NOV-1998 txe Version 2 build debugging... # 20-NOV-1998 txe Remove .fix during backup2, make client goes to bg # 23-NOV-1998 txe Added "demo" command # # 30-NOV-1998 txe (v3) Now use Client.html instead of proj4.html # 01-DEC-1998 txe Removed old maps from MAP_FILES # 07-DEC-1998 txe Added MapReadException # 08-DEC-1998 txe Removed port changing procedure # 09-DEC-1998 txe Don't fetch Client.html and DemonTest.html # 14-DEC-1998 txe Fixed html command # #################################################################################### #################################################################################### # Files: #################################################################################### CONTENTS = \ Node \ Module \ Depend \ Map \ \ DrawableNode \ DrawableModule \ DrawableMap \ \ ClientApplet \ ClientGUI \ ClientEngine \ ClientRMI \ ClientRMIIface \ \ DemonApplet \ DemonGUI \ DemonEngine \ DemonRMI \ DemonRMIIface \ \ Server \ ServerThread \ ServerEngine \ ServerRMI \ ServerRMItoClientIface \ ServerRMItoDemonIface \ \ ClientConnectStatus \ Connections \ \ Stats \ \ BoundsException \ EqualityException \ GraphicsException \ GUIException \ IndexException \ MapException \ MapReadException \ NewException \ NullException \ ParsingException \ StatsException SCRIPT_DIR = /home/te3d/scripts CLIENT_MAIN = ClientApplet CLIENT_PAGE = Client.html CLIENT_RMI = ClientRMI CLIENT_STUBS = ClientRMI_Skel.class ClientRMI_Stub.class DEMON_MAIN = DemonApplet DEMON_PAGE = DemonTest.html DEMON_RMI = DemonRMI DEMON_STUBS = DemonRMI_Skel.class DemonRMI_Stub.class SERVER_MAIN = Server SERVER_RMI = ServerRMI SERVER_STUBS = ServerRMI_Skel.class ServerRMI_Stub.class SOURCES = ${CONTENTS:=.java} CLASSES = ${CONTENTS:=.class} SOURCE_PAGES = ${CONTENTS:=.java.html} OFFICIAL_PAGES = spec.html spec.shared.html spec.client.html spec.server.html spec.demon.html source.html EXEC_PAGES = ${CLIENT_PAGE} ${DEMON_PAGE} RMI_FILES = ${CLIENT_RMI} ${DEMON_RMI} ${SERVER_RMI} RMI_STUBS = ${CLIENT_STUBS} ${DEMON_STUBS} ${SERVER_STUBS} TEMP_FILES = *.markup? *.state MAP_FILES = demo.map test.map TEST_MAP = test.map DEMO_MAP = demo.map FETCHABLES = ${SOURCES} ${MAP_FILES} ${OFFICIAL_PAGES} BUILDABLES = ${CLASSES} ${SOURCE_PAGES} ${RMI_STUBS} ${TEMP_FILES} #################################################################################### # Commands #################################################################################### BACK_UP = ${SCRIPT_DIR}/backup.pl JAVA2HTML = ${SCRIPT_DIR}/java2html.pl REPLACE_STR = ${SCRIPT_DIR}/replace.pl CHECK_IN = ci CHECK_OUT = co -l FETCH = co -q JAVAC = javac RM = /bin/rm -f RMIC = rmic RUN_JAVA = java VIEW_JAVA = appletviewer #################################################################################### # Rules #################################################################################### default : build backup : ALWAYS ${BACK_UP} backup2 : ALWAYS ${BACK_UP} @${RM} ${FETCHABLES} ${BUILDABLES} build : clean ${FETCHABLES} ${JAVAC} ${SERVER_MAIN}.java ${RMIC} ${SERVER_RMI} ${JAVAC} ${CLIENT_MAIN}.java ${RMIC} ${CLIENT_RMI} ${JAVAC} ${DEMON_MAIN}.java ${RMIC} ${DEMON_RMI} checkin : @echo "Checking in changed files..." ${CHECK_IN} ${FETCHABLES} clean : @echo "Removing compiled and temporary files" @${RM} ${BUILDABLES} @find . -name "*.class" -exec echo Warning: {} not deleted \; client : ${CLIENT_PAGE} ${MAP_FILES} ${VIEW_JAVA} ${CLIENT_PAGE} & demo : ALWAYS ${VIEW_JAVA} ${CLIENT_PAGE} & ${VIEW_JAVA} ${CLIENT_PAGE} & ${VIEW_JAVA} ${CLIENT_PAGE} & ${VIEW_JAVA} ${CLIENT_PAGE} & ${VIEW_JAVA} ${CLIENT_PAGE} & ${VIEW_JAVA} ${DEMON_PAGE} & ${RUN_JAVA} ${SERVER_MAIN} ${DEMO_MAP} demon : ${DEMON_PAGE} ${MAP_FILES} ${VIEW_JAVA} ${DEMON_PAGE} & fetch : ${FETCHABLES} html : fetch ${SOURCE_PAGES} ${OFFICIAL_PAGES} @${RM} ${TEMP_FILES} new : backup2 build server : ${MAP_FILES} ${RUN_JAVA} ${SERVER_MAIN} test : ALWAYS ${VIEW_JAVA} ${CLIENT_PAGE} & ${VIEW_JAVA} ${CLIENT_PAGE} & ${VIEW_JAVA} ${DEMON_PAGE} & ${RUN_JAVA} ${SERVER_MAIN} ${TEST_MAP} who : ALWAYS @echo "HERE ARE THE LOCKS THAT ARE CURRENTLY BEING HELD:" @grep "strict;" RCS/*,v | grep -v "locks; strict;" \ | sed "s/RCS\///; s/,v:./ /; s/:.*//;" help : @echo COMMANDS: @echo " make backup - backs up entire contents of current directory" @echo " make backup2 - same thing, except removes files afterwards" @echo " make build - build client and server" @echo " make checkin - check editted pages in to RCS" @echo " make clean - delete all .class files, temp files, and HTML pages" @echo " make client - start client in appletviewer" @echo " make fetch - fetch (copy) files from RCS" @echo " make help - print help info" @echo " make html - generate HTML pages for source code" @echo " make new - same as make backup2 build html" @echo " make server - start server" @echo " make test - runs server and enough applets for map.txt" @echo " make who - displays a list of currently held locks" #################################################################################### # Rules for handling specific file types #################################################################################### ${FETCHABLES} : $${@:%=RCS/%,v} @echo Fetching $@ @${FETCH} $@ ${SOURCE_PAGES} : $${@:.java.html=.java} ${JAVA2HTML} $? #################################################################################### ALWAYS : ####################################################################################