home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-05-10 | 7.7 KB | 272 lines |
- # Makefile for WorldWideWeb Line Mode browser (www)
- #
- # (c) CERN 1990, 1991 -- see Copyright.html for conditions
- #
- # This file should be invariant between systems.
- # DEPENDENCIES NOT COMPLETE @@
- #
- # make Compile and link the software (private version)
- # make install Copy it into the system (implies make)
- # make update Copy installed version into installed version
- # make uninstall Unlink installed version from the system
- # make clean Remove intermediate files
- # make cleanall Remove intremediate files and products
- #
- # Macros required to be defined already for make:
- #
- # CC The C compiler
- # CFLAGS Flags for $(CC)
- # LFLAGS Flags for ld
- # WWW Root of WWW source tree
- # USELIBDIR Directory in which libwww.a should be found
- #
- # Macros needed for make install:
- #
- # BINDIR Directory for installed binary
- #______________________________________________________________________
-
- # If this env var is set to something else Some makes will use that instead
- SHELL = /bin/sh
-
- # If this is actually run in a subdirectory.
- #
- # WWW = ../../..
-
- # If it is run in this directory:
- #
- # WWW = ../.. For [cernlib] build in this directory
-
- LM = $(WWW)/LineMode/Implementation/
- LMD = $(WWW)/LineMode/Defaults
- CMN = $(WWW)/Library/Implementation/
- DEFAULTS = $(WWW)/LineMode/Defaults
-
- CFLAGS2 = $(CFLAGS) -I$(CMN) -I$(LM)
-
- CERNLIBBIN = $(WWW)/bin
-
- # WTMP is either WWW or /tmp for example. It allows the
- # machine-dependent files to be put in a separate tree so that
- # - The source tree can be read-only
- # - The source tree can be shared across platforms
- #
- USELIBDIR = $(WTMP)/Library/$(WWW_MACH)
- OBJ = $(WTMP)/LineMode/$(WWW_MACH)
- BIN = $(WWW)/LineMode/$(WWW_MACH)
-
- OE = $(OBJ)/.created
-
- WWWLIB = -L$(USELIBDIR) -lwww
- OBJS = $(OBJ)/HTBrowse.o $(OBJ)/GridText.o $(OBJ)/DefaultStyles.o
- # Final main product
- PROD = www
-
- SOURCES = $(LM)HTBrowse.c $(LM)HTBrowse.h \
- $(LM)GridText.c $(LM)GridText.h \
- $(LM)HTFont.h $(LM)Version.make\
- $(LM)DefaultStyles.c $(LM)CommonMakefile
-
- SPECIFIC = \
- $(LM)apollo_m68k/Makefile \
- $(LM)decstation/Makefile \
- $(LM)next/Makefile \
- $(LM)pc-nfs/makefile \
- $(LM)pc-nfs/README \
- $(LM)pc-nfs/topc \
- $(LM)rs6000/Makefile \
- $(LM)sgi/Makefile \
- $(LM)snake/Makefile \
- $(LM)sun3/Makefile \
- $(LM)sun4/Makefile \
- $(LM)unix/Makefile \
- $(LM)vax_ultrix/Makefile \
- $(LM)vax_ultrix_cc/Makefile \
- $(LM)vms/descrip.mms \
- $(LM)vms/setup.com
-
- # Bug: This path, if relative, is taken relative to the directory
- # in which this makefile is, not the pwd. This screws up the
- # recursive invocation
- include $(ABS)$(LM)Version.make
-
- $(BIN)/$(PROD) : $(OBJS) $(USELIBDIR)/libwww.a
- $(CC) -o $(BIN)/$(PROD)_$(VL) $(OBJS) $(WWWLIB) $(WAISLIB) $(LFLAGS)
- -rm $(BIN)/$(PROD)
- ln -s $(PROD)_$(VL) $(BIN)/$(PROD)
-
- $(USELIBDIR)/libwww.a :
- @echo You must get and make the WWWLibrary product first!
- (cd $(WWW)/Library/$(WWW_MACH) && make)
-
- lib :
- (cd $(WWW)/Library/$(WWW_MACH) && make)
-
-
- # Make a copy of the binary and documentation on this machine
- install : $(PROD)
- cp $(PROD) $(BINDIR)/$(PROD)
- - mkdir /usr/local
- - mkdir /usr/local/lib
- - mkdir /usr/local/lib/WWW
- cp $(DEFAULTS)/*.html /usr/local/lib/WWW
-
- # Link system to the binary and documentation in this tree
-
- link : Works/$(PROD)
- ln -s `pwd`/$(PROD) $(BINDIR)/$(PROD)
- - mkdir /usr/local
- - mkdir /usr/local/lib
- ln -s $(DEFAULTS) /usr/local/lib/WWW
-
- uninstall :
- rm $(BINDIR)/$(PROD)
- rm -r /usr/local/lib/WWW
-
- # Clean up everything generatable except final products
- # Including obj directory UNLESS there is anything else in it
- clean :
- rm $(OBJ)/.created $(OBJ)/*.o
- -rmdir $(OBJ)
-
- # Clean up everything generatable including final products
-
- cleanall : clean
- rm $(PROD)
-
- # Binary release
- #
- # Must be done on anonymous FTP server!
- #
- # This makefile does not knw how to make $(PROD)_$(VL) so that trying
- # to make binay or asis on a weird machine doesn't try to build $(PROD)!
-
- binary : $(PROD)_$(VL)
- -mkdir /pub/www/bin/$(WWW_MACH)
- cp $(PROD)_$(VL) /pub/www/bin/$(WWW_MACH)/$(PROD)_$(VL)
-
- # ASIS installation
- # -----------------
- # Can only happen on an allocated ASIS development machine and
- # with uid of the controlling user for the project.
- #
- asis : /asis/share/usr.local/lib/WWW/default.html \
- /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)
- touch asis
- echo ASIS distribution is now up-to-date.
-
- /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD) : $(PROD)_$(VL)
- cp $(PROD)_$(VL) /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)_$(VL)
- rm -f /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)
- ln -s $(PROD)_$(VL) \
- /asis/specific/$(ASIS_MACH)/usr.local/bin/$(PROD)
-
- /asis/share/usr.local/lib/WWW/default.html : $(DEFAULTS)/cern.html
- - mkdir /asis/share/usr.local/lib/WWW
- cp $(DEFAULTS)/*.html /asis/share/usr.local/lib/WWW
- cp $(DEFAULTS)/cern.html /asis/share/usr.local/lib/WWW/default.html
- cp $(DEFAULTS)/default.html /asis/share/usr.local/lib/WWW/top.html
-
- # CERNLIB installation
- # --------------------
- # Assuming the cernlib-style directory structure
- # Warning: Not suitable for machine-shared file structure.
- #
- cernlib : $(PROD)
- - mkdir $(CERNLIBBIN)
- cp $(PROD) $(CERNLIBBIN)
-
-
- #_________________________________________________________________________
- # Compiling the Objects (Dependenies incomplete)
-
- # Check directory exists
- $(OE) :
- -mkdir $(WTMP)
- -mkdir $(WTMP)/LineMode
- -mkdir $(WTMP)/LineMode/$(WWW_MACH)
- touch $(OE)
-
- #
- $(OBJ)/HTBrowse.o : $(OE) $(LM)HTBrowse.c $(LM)GridText.h $(LM)Version.make \
- $(CMN)HTUtils.h $(CMN)HTAccess.h
- $(CC) -c -o $@ $(CFLAGS2) -DVL=\"$(VL)\" $(LM)HTBrowse.c
-
- $(OBJ)/GridText.o : $(OE) $(LM)GridText.c $(LM)GridText.h\
- $(CMN)HTAnchor.h $(CMN)HTStyle.h
- $(CC) -c -o $@ $(CFLAGS2) $(LM)GridText.c
-
- $(OBJ)/DefaultStyles.o : $(OE) $(LM)DefaultStyles.c $(CMN)HTStyle.h
- $(CC) -c -o $@ $(CFLAGS2) $(LM)DefaultStyles.c
-
- #_________________________________________________________________
- # For W3 Administrative use only:
-
-
- # W3 Source + documentation release
- # ---------------------------------
-
- distribute : /pub/www/README.txt /pub/www/Copyright.txt
- (cd $(WWW)/.. && WWW=WWW ABS=`pwd`/ make $(MFLAGS) \
- -f WWW/LineMode/Implementation/CommonMakefile \
- /pub/www/src/WWWLineMode_$(VL).tar.Z)
- echo Distribution of Line Mode version $(VC) up to date.
-
- # THIS MUST BE BUILT FROM THE DIRECTORY ABOVE WWW ! USE distribute above!
- /pub/www/src/WWWLineMode_$(VL).tar.Z : $(SOURCES) $(LMD)/line-mode-guide.txt
- tar cf /pub/www/src/WWWLineMode_$(VL).tar \
- $(SOURCES) $(LMD)/line-mode-guide.txt \
- $(WWW)/LineMode/*/Makefile $(LM)vms/descrip.mms
- compress /pub/www/src/WWWLineMode_$(VL).tar
-
-
- # Hypertext supplied in text format
- # ---------------------------------
-
- $(WWW)/README.txt : $(WWW)/../README.html
- www -n -p66 http://info.cern.ch/hypertext/README.html \
- > $(WWW)/README.txt
- /pub/www/README.txt : $(WWW)/README.txt
- cp $(WWW)/README.txt /pub/www/README.txt
-
- $(WWW)/Copyright.txt : $(WWW)/../Copyright.html
- www -n -p66 http://info.cern.ch/hypertext/Copyright.html \
- > $(WWW)/Copyright.txt
- /pub/www/Copyright.txt : $(WWW)/Copyright.txt
- cp $? $@
-
- # Line Mode Manual
- #
- QUICKGUIDE = \
- $(LMD)/QuickGuide.html \
- $(LMD)/Commands.html \
- $(LMD)/SourceExamples.html \
- $(LMD)/CommandLine.html \
- $(LMD)/Shortcuts.html \
- $(LMD)/VMS_Shortcuts.html \
- $(LMD)/Installation.html \
- $(LMD)/Installation_VMS.html \
- $(LMD)/Installation_VMS_NewTCP.html \
- $(LMD)/Distribution.html \
- $(LMD)/Porting.html \
- $(LMD)/MachineTypes.html \
- $(LMD)/InstallNotSU.html \
- $(LMD)/Path.html \
- $(LMD)/LoginScript.html \
- $(LMD)/Customisation.html \
- $(LMD)/EnvVariables.html \
- $(LMD)/GlobalV.html \
- $(LMD)/NewsServer.html \
- $(LMD)/Bugs.html \
- $(LMD)/Features.html
-
- doc : /pub/www/doc/line-mode-guide.txt
- echo line mode browser guide exists.
-
- /pub/www/doc/line-mode-guide.txt : $(LMD)/line-mode-guide.txt
- cp $? $@
-
- $(LMD)/line-mode-guide.txt : $(QUICKGUIDE)
- -rm $@
- for i in $(QUICKGUIDE) ; do www -n -na -p66 $$i >> $@; done
-
-