home *** CD-ROM | disk | FTP | other *** search
/ Dream 45 / Amiga_Dream_45.iso / Amiga / Magazine / Dossier-LaTeX / AmiWeb2C.lha / source / web2c-6.1 / web2c / bibtex / SMakefile < prev   
Makefile  |  1995-04-12  |  4KB  |  153 lines

  1. # Makefile for BibTeX in its various incarnations.  It is appropriate
  2. # for the SAS/C Development System Version 6.x by SAS Institute Inc.
  3. # and was written by Andreas Scherer, March 23, 1995.
  4.  
  5. # With this SMakefile several different versions of MetaFont can be
  6. # created (one at a time!).  The standard is No20BibTeX.
  7. # It is as close to the Web2C implementation as possible.
  8. #
  9. #     CHANGEFILE = cbibtex.ch
  10. #     HEADERFILE = stamp-nomem
  11. #     DEFS       = cpu=ANY data=FAR code=FAR
  12. #     PS         = no20
  13. #     LOBJ       = lib:c.o
  14. #     LIBRARIES  = lib:scmieee.lib lib:scnb.lib
  15. #
  16. # An improved version for standard Amigas will provide a runtime
  17. # memory configuration and a resident version of BibTeX.
  18. #
  19. #     CHANGEFILE = mbibtex.ch
  20. #     HEADERFILE = stamp-mem
  21. #     DEFS       = cpu=ANY define=VARMEM code=FAR
  22. #     PS         = no20
  23. #     LOBJ       = lib:cres.o
  24. #     LIBRARIES  = lib:scmieee.lib lib:sc.lib
  25. #
  26. # Advanced hardware configurations work with BibTeX.  This uses
  27. # the runtime memory configuration as well.
  28. #
  29. CHANGEFILE = mbibtex.ch
  30. HEADERFILE = stamp-mem
  31. DEFS       = cpu=68020 define=VARMEM code=FAR
  32. PS         =
  33. LOBJ       = lib:cres.o
  34. LIBRARIES  = lib:scmieee.lib lib:sc.lib
  35.  
  36. SED = sed
  37. SHELL = rx
  38. TIE = tie
  39. WMERGE = wmerge
  40. srcdir = .
  41. VPATH = .
  42.  
  43. # The missing `configure' mechanism requires this to be introduced by hand.
  44. bindir = TeXMF:bin/web2c61
  45. configdir = TeXMF:web2c61/config
  46.  
  47. # This is so kpathsea will get remade automatically if you change
  48. # something in it and recompile from the package directory.
  49. kpathsea_parent = ../..
  50. kpathsea_dir = $(kpathsea_parent)/kpathsea
  51. kpathsea = $(kpathsea_dir)/kpathsea.lib
  52. kpathsea_20 = $(kpathsea_dir)/kpathsea_20.lib
  53.  
  54. # Routines used everywhere.
  55. commondefines = $(srcdir)/../lib/common.defines $(srcdir)/../lib/texmf.defines
  56. commonh = $(srcdir)/../lib/andyconfig.h $(kpathsea_dir)/paths.h
  57. commono = ../lib/lib.lib $(kpathsea)
  58. commono_20 = ../lib/lib_20.lib $(kpathsea_20)
  59.  
  60. # Routines used in TeX, Metafont, and BibTeX.
  61. fileioc = ../lib/andyopeninout.c
  62. fileioo = openinout.o
  63.  
  64. # Routines for dynamic memory allocation.
  65. memoryh = $(srcdir)/../lib/bibtexmemory.h
  66.  
  67. program = $(PS)bibtex
  68.  
  69. CC = sc
  70. CFLAGS = $(DEFS) math=IEEE stackcheck noicons optimize
  71. CPPFLAGS = define=_STRICT_ANSI define=BibTeX idir=$(srcdir)/../lib idir=../..
  72.  
  73. CCLD = slink
  74. LN = copy
  75.  
  76. LDFLAGS = noicons $(XLDFLAGS)
  77. libs = $(fileioo) $(commono) $(LIBRARIES)
  78. libs_20 = $(fileioo) $(commono_20) $(LIBRARIES)
  79.  
  80. INSTALL = copy
  81. INSTALL_PROGRAM = copy
  82.  
  83. .SUFFIXES:
  84. .SUFFIXES: .o .c .p .ch
  85. .p.c:
  86.     $(SHELL) $(srcdir)/../bibtex/convert.rexx $*.p $*.c
  87. .ch.p:
  88.     ../web/tangle $*.web $(CHANGEFILE)
  89. .c.o:
  90.     $(CC) $(CPPFLAGS) $(CFLAGS) $*.c
  91.  
  92. default: all
  93. all: $(program)
  94.  
  95. bibtex: bibtex.o $(commono_20) $(fileioo)
  96.     $(CCLD) to $(program) from $(LOBJ) $(program).o \
  97.     lib $(libs_20) $(LDFLAGS)
  98. bibtex.o: bibtex.c $(commonh) $(HEADERFILE)
  99. bibtex.c: bibtex.p $(commondefines) convert.rexx
  100. bibtex.p: bibtex.web $(CHANGEFILE)
  101.  
  102. no20bibtex: no20bibtex.o $(commono) $(fileioo)
  103.     $(CCLD) to $(program) from $(LOBJ) $(program).o \
  104.     lib $(libs) $(LDFLAGS)
  105. no20bibtex.o: no20bibtex.c
  106. no20bibtex.c: bibtex.c $(commonh) $(HEADERFILE)
  107.     copy bibtex.c no20bibtex.c
  108.  
  109. stamp-nomem:
  110.     echo "" > stamp-nomem
  111.  
  112. stamp-mem: $(memoryh)
  113.     - delete bibtex.temp openinout.temp
  114.     $(SED) -f bibtexmemory.sed < bibtex.c > bibtex.temp
  115.     - delete bibtex.safe
  116.     rename bibtex.c bibtex.safe
  117.     rename bibtex.temp bibtex.c
  118.     echo "" > stamp-mem
  119.  
  120. cbibtex.ch: bibtex.ch bibtex.chch
  121.     - delete $@
  122.     $(TIE) -c $@ bibtex.web bibtex.ch bibtex.chch
  123.  
  124. mbibtex.ch: bibtex.ch bibtex.chch bibtexmemory.ch
  125.     - delete $@
  126.     $(TIE) -c $@ bibtex.web bibtex.ch bibtex.chch bibtexmemory.ch
  127.  
  128. openinout.o: openinout.c
  129. openinout.c: $(fileioc)
  130.     - delete openinout.c
  131.     $(LN) $(fileioc) openinout.c
  132.  
  133. c-sources: bibtex.c openinout.c
  134. .PHONY: c-sources
  135.  
  136. install: install-exec install-data
  137. install-exec: all
  138.     $(INSTALL_PROGRAM) $(program) $(bindir)/$(program)
  139. install-data: $(srcdir)/../config/bibtex.mcf
  140.     $(INSTALL) $(srcdir)/../config/bibtex.mcf $(configdir)/bibtex.mcf
  141.  
  142. clean:
  143.     - delete \#?.(bak|o|lnk|log|fmt)
  144.  
  145. veryclean: clean
  146.     - delete \#?.(dvi|pool|c|p|h|safe) cbibtex.ch mbibtex.ch
  147.  
  148. extraclean: veryclean
  149.     - delete \#?.(aux|bbl|blg|orig|pl|rej)
  150.     - delete \#?.(i|s|tfm|vf|vpl)
  151.     - delete CONTENTS.tex texput.\#? patch\#? mfput.\#? stamp-\#?
  152.     - delete $(program)
  153.