home *** CD-ROM | disk | FTP | other *** search
/ Media Depot 5 / mediadepotvolume51993.iso / FILES / 13 / FAQ202S.ZIP / faq / makefile < prev    next >
Encoding:
Makefile  |  1996-10-16  |  2.1 KB  |  73 lines

  1. # Makefile for generating DJGPP FAQ list in a variety of formats
  2.  
  3. SOURCES = djgppfaq.txi faqmacro.txi faq-addr.txi faq-vers.txi
  4.  
  5. all: djgppfaq.info faq.html djgppfaq.txt  # djgppfaq.dvi djgppfaq.ps
  6.  
  7. djgppfaq.inf: djgppfaq.info
  8.  
  9. djgppfaq.info: djgppfaq.num
  10.     makeinfo --no-split --fill-column 78 -o $@ $<
  11.  
  12. djgppfaq.num: $(SOURCES) enum
  13.     ./enum $< $@
  14.  
  15. enum: enum.c
  16.     gcc -Wall -O2 -s -o $@ $<
  17.  
  18. faq.htm: faq.html
  19.  
  20. faq.html: djgppfaq.html htmsplit
  21.     ./htmsplit djgppfaq.html faq
  22.  
  23. djgppfaq.html: djgppfaq.num htmlprep.sed concepts.idx programs.idx
  24.     sed -f htmlprep.sed $< > faq.tmp
  25.     makeinfo --no-validate --no-split --no-headers --fill-column 200 -Dhtml -o $@ faq.tmp
  26.  
  27. concepts.idx programs.idx: indices.sed htmlidx.sed djgppfaq.info
  28.     sed -n -f indices.sed djgppfaq.info
  29.     sed -n -f htmlidx.sed concepts.tmp > concepts.idx
  30.     sed -n -f htmlidx.sed programs.tmp > programs.idx
  31.  
  32. htmsplit: htmsplit.c
  33.     gcc -Wall -O2 -s -o $@ $<
  34.  
  35. djgppfaq.txt: djgppfaq.num chapxref.sed idxref.sed chapters.tmp contents.idx
  36.     sed -f chapxref.sed chapters.tmp > textprep.tmp
  37.     @echo 'The following command may take a long time.  Be patient.'
  38.     sed -f textprep.tmp $< > djgppfaq.tmp
  39.     makeinfo --no-split --no-headers --no-validate --fill-column 78 -Dtext -o txt.tmp djgppfaq.tmp
  40.     sed -f idxref.sed chapters.tmp > textpost.tmp
  41.     sed -f textpost.tmp txt.tmp > $@
  42.  
  43. contents.idx: djgppfaq.num contents.sed
  44.     sed -n -f contents.sed $< > $@
  45.  
  46. chapters.tmp: djgppfaq.num chapters.sed
  47.     sed -n -f chapters.sed $< > $@
  48.  
  49. macro.exp: makefile $(SOURCES) htmlprep.sed
  50.     sed -f htmlprep.sed djgppfaq.txi > faq.tmp
  51.     makeinfo --no-validate --no-split --no-headers --fill-column 100 -Dhtml -E macro.exp -o /dev/null faq.tmp
  52.  
  53. clean:
  54. ifdef COMSPEC
  55.     command > nul /c for %f in (*.tmp *.idx *.exe *.num enum htmsplit djgppfaq.htm) do if exist %f del %f
  56. else
  57.     rm -f *.tmp *.idx *.exe *.num enum htmsplit djgppfaq.htm*
  58. endif
  59.  
  60. distclean: clean
  61.  
  62. realclean: distclean
  63. ifdef COMSPEC
  64.     command > nul /c for %f in (*.htm *.inf *.ps *.dvi *.txt) do if exist %f del %f
  65. else
  66.     rm -f *.htm* *.inf* *.ps *.dvi *.txt
  67. endif
  68. love:
  69.     @echo 'Not war!'
  70.  
  71. coffee:
  72.     @echo 'Not yet.  Maybe in v3.x...'
  73.