home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / c / cpp2latx.zip / PRETTY.RUL < prev    next >
Text File  |  1991-12-16  |  2KB  |  113 lines

  1. /*
  2.  *    Pretty Print rules setup        -joke 07/06/91
  3.  */
  4. #ifndef TeXSuffix
  5. #define TeXSuffix tex
  6. #endif
  7.  
  8. #ifndef DviSuffix
  9. #define DviSuffix dvi
  10. #endif
  11.  
  12. #ifndef AuxSuffix
  13. #define AuxSuffix aux
  14. #endif
  15.  
  16. #ifndef LogSuffix
  17. #define LogSuffix log
  18. #endif
  19.  
  20. #ifndef LaTeXCmd
  21. #define LaTeXCmd latex
  22. #endif
  23.  
  24. #ifndef Cplusplus2LaTeXCmd
  25. #define Cplusplus2LaTeXCmd c++2latex
  26. #endif
  27.  
  28.  
  29. /*
  30.  *    Set up pretty printing facility.
  31.  */
  32.       TEXSUFFIX = TeXSuffix
  33.       DVISUFFIX = DviSuffix
  34.       AUXSUFFIX = AuxSuffix
  35.       LOGSUFFIX = LogSuffix
  36.  
  37.        LATEXCMD = LaTeXCmd
  38.  CPLUSPLUS2LATEXCMD = Cplusplus2LaTeXCmd
  39.  
  40.  
  41. /*
  42.  *    Make a Dvi file.
  43.  */
  44. #ifndef MakeDviRule
  45. #define MakeDviRule(dst,src)                        @@\
  46. dst.$(DVISUFFIX): src.$(TEXSUFFIX)                    @@\
  47.     @echo "LaTeXing src.$(TEXSUFFIX)"                @@\
  48.     $(RM) dst.$(DVISUFFIX)                        @@\
  49.     $(LATEXCMD) src.$(TEXSUFFIX)                    @@\
  50.     $(RM) src.$(TEXSUFFIX) src.$(AUXSUFFIX) src.$(LOGSUFFIX)
  51. #endif
  52.  
  53. /*
  54.  *    Make a LaTeX file.
  55.  */
  56. #ifndef MakeLaTeXRule
  57. #define MakeLaTeXRule(dst,src,flags)                    @@\
  58. dst.$(TEXSUFFIX): src                            @@\
  59.     @echo "C++2LaTeXing src"                    @@\
  60.     $(RM) dst.$(TEXSUFFIX)                        @@\
  61.     $(CPLUSPLUS2LATEXCMD) src flags -o dst.$(TEXSUFFIX)
  62. #endif
  63.  
  64. /*
  65.  *    Make a Dvi file from a C++ source with flags.
  66.  */
  67. #ifndef MakeDviFromSrcFlags
  68. #define MakeDviFromSrcFlags(file,flags)                    @@\
  69.     MakeLaTeXRule(file,file,flags)                    @@\
  70.     MakeDviRule(file,file)
  71. #endif
  72.  
  73. /*
  74.  *    Make a Dvi file from a C++ source.
  75.  */
  76. #ifndef MakeDviFromSrc
  77. #define MakeDviFromSrc(file)                        @@\
  78.     MakeDviFromSrcFlags(file,-h)
  79. #endif
  80.  
  81. /*
  82.  *    Make a LaTeX file from a C++ source with flags.
  83.  */
  84. #ifndef MakeLaTeXFromSrcFlags
  85. #define MakeLaTeXFromSrcFlags(file,flags)                @@\
  86.     MakeLaTeXRule(file,file,flags)
  87. #endif
  88.  
  89. /*
  90.  *    Make a LaTeX file from a C++ source.
  91.  */
  92. #ifndef MakeLaTeXFromSrc
  93. #define MakeLaTeXFromSrc(file)                        @@\
  94.     MakeLaTeXFromSrcFlags(file,/**/)
  95. #endif
  96.  
  97. /*
  98.  *    Build all Dvi files available.
  99.  */
  100. #ifndef BuildAllDviFiles
  101. #define BuildAllDviFiles(target,dvifiles)                @@\
  102. target:    dvifiles                            @@\
  103.     @echo ""
  104. #endif
  105.  
  106. /*
  107.  *    The simple dvi target: all Dvi files are stand-alone LaTeX.
  108.  */
  109. #ifndef SimpleDviTarget
  110. #define SimpleDviTarget(name)                        @@\
  111.     BuildAllDviFiles(name,$(DVIS))
  112. #endif
  113.