home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / web2c / bibtex / Makefile.in < prev    next >
Makefile  |  1996-09-28  |  3KB  |  118 lines

  1. # Makefile for BibTeX.
  2.  
  3. SHELL = /bin/sh
  4. srcdir = @srcdir@
  5. VPATH = @srcdir@
  6.  
  7. # This is so kpathsea will get remade automatically if you change
  8. # something in it and recompile from the package directory.
  9. kpathsea_parent = ../..
  10. kpathsea_dir = $(kpathsea_parent)/kpathsea
  11. kpathsea = $(kpathsea_dir)/kpathsea.a
  12.  
  13. # Routines used everywhere.
  14. commondefines = $(srcdir)/../lib/common.defines $(srcdir)/../lib/texmf.defines
  15. commonh = $(srcdir)/../lib/config.h $(kpathsea_dir)/paths.h
  16. commono = ../lib/lib.a $(kpathsea)
  17.  
  18. # Routines used in TeX, Metafont, and BibTeX.
  19. fileioc = $(srcdir)/../lib/openinout.c
  20. fileioo = openinout.o
  21.  
  22. program = bibtex
  23.  
  24. CC = @CC@
  25. CFLAGS =
  26. CPPFLAGS = -DBibTeX -I../lib -I$(srcdir)/../lib -I../.. -I$(srcdir)/../..
  27.  
  28. CCLD = $(CC)
  29. LDFLAGS = $(CFLAGS) $(XLDFLAGS)
  30. LIBS = @LIBS@ $(extralibs)
  31. libs = $(fileioo) $(commono) $(LIBS)
  32.  
  33. INSTALL = @INSTALL@
  34. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  35.  
  36. LN = @LN_S@
  37.  
  38.  
  39. .SUFFIXES:
  40. .SUFFIXES: .o .c .p .ch
  41. .p.c:
  42.     $(SHELL) $(srcdir)/../bibtex/convert $< $*.tmp $(srcdir)
  43.     sed "s:^void main_body() {:void main_body() { standardoutput = stdout; standardinput = stdin;:" <$*.tmp >$*.c
  44. .ch.p:
  45.     ../web/tangle $(srcdir)/$*.web c$*.ch
  46.     cp $(srcdir)/$*.p $*.p
  47.     rm -f $(srcdir)/$*.p
  48. .c.o:
  49.     $(CC) $(CPPFLAGS) $(CFLAGS) -c $<
  50.  
  51.  
  52. default: all
  53. all: $(program)
  54.  
  55.  
  56. $(program): $(program).o $(commono) $(fileioo)
  57.     $(CCLD) -o $(program) $(LDFLAGS) $(program).o $(libs)
  58. $(program).o: $(program).c $(commonh)
  59. $(program).c: $(program).p $(commondefines) convert
  60. $(program).p: $(program).web cbibtex.ch
  61.  
  62. cbibtex.ch: bibtex.ch
  63.     rm -f $@
  64.     cp $(srcdir)/../bibtex/bibtex.ch cbibtex.ch
  65.  
  66. openinout.c: $(fileioc)
  67.     rm -f openinout.c
  68.     $(LN) $(fileioc) openinout.c
  69.  
  70.  
  71. Makefile: Makefile.in ../config.status
  72.     (cd ..; sh config.status)
  73.  
  74.  
  75. c-sources: bibtex.c openinout.c
  76. .PHONY: c-sources
  77.  
  78. install install-exec: all
  79.     $(INSTALL_PROGRAM) $(program) $(bindir)/$(program)
  80. install-data:
  81.  
  82.  
  83. TAGS: *.c *.h
  84.     etags -t *.c *.h
  85.  
  86.  
  87. mostlyclean::
  88.     rm -f *.o $(program) $(lib) $(programs)
  89.  
  90. clean:: mostlyclean
  91.     rm -f *.dvi *.pool
  92.  
  93. distclean:: clean
  94.     rm -f Makefile config.status c-auto.h
  95.  
  96. # Although we can remake configure and c-auto.h.in, we don't remove
  97. # them, since many people may lack Autoconf.  Use configclean for that.
  98. realclean:: distclean
  99.     rm -f TAGS *.info*
  100.  
  101. extraclean::
  102.     rm -f *.aux *.bak *.bbl *.blg *.dvi *.log *.orig *.pl *.rej
  103.     rm -f *.i *.s *.tfm *.vf *.vpl *\#* *gf *pk *~
  104.     rm -f CONTENTS.tex a.out core mfput.* patch* texput.*
  105.  
  106. configclean:
  107.     rm -f configure c-auto.h.in c-auto.h
  108.  
  109.  
  110. # Prevent GNU make 3 from overflowing arg limit on system V.
  111. .NOEXPORT:
  112.  
  113. clean::
  114.     rm -f *.p *.c *.h
  115.  
  116. distclean:: clean
  117.     rm -f cbibtex.ch
  118.