home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume32 / detex / part01 / Makefile < prev    next >
Makefile  |  1992-09-28  |  1KB  |  81 lines

  1. #    Makefile for detex and delatex
  2. #
  3. #    Daniel Trinkle
  4. #    Computer Science Department
  5. #    Purdue University
  6. #
  7. # Detex is a program to remove TeX and LaTeX constructs from text source.
  8.  
  9. # Installation directory
  10. #
  11. DESTDIR    = /usr/local/bin
  12.  
  13. # Compile time flags, just uncomment the necessary lines
  14. #
  15. DEFS    =
  16. #
  17. # Add -traditional for GNU cc on ISC 386/ix system and possibly others
  18. # (reported by pinard@iro.umontreal.ca)
  19. #
  20. #DEFS    = ${DEFS} -traditional
  21. #
  22. # Add -DUSG for the SysV string manipulation routines
  23. #
  24. #DEFS    = ${DEFS} -DUSG
  25. #
  26. # Add -DMAXPATHLEN=<length> if it is not defined in /usr/include/sys/param.h
  27. #
  28. #DEFS    = ${DEFS} -DMAXPATHLEN=1024
  29. #
  30. # Add -DNO_MALLOC_DECL if your system does not like the malloc() declaration
  31. # in detex.l (reported by pinard@iro.umontreal.ca)
  32. #
  33. #DEFS    = ${DEFS} -DNO_MALLOC_DECL
  34. #
  35. CFLAGS    = -O ${DEFS}
  36.  
  37. LPR    = lpr -p
  38.  
  39. # Program names
  40. #
  41. PROGS    = detex
  42.  
  43. # Header files
  44. #
  45. HDR    = detex.h
  46.  
  47. # Sources
  48. #
  49. SRC    = detex.l
  50.  
  51. # Objects for various programs
  52. #
  53. D_OBJ    = detex.o
  54.  
  55. all:    ${PROGS}
  56.  
  57. detex: ${D_OBJ}
  58.     ${CC} ${CFLAGS} -o $@ ${D_OBJ} -ll
  59.  
  60. detex.c:
  61.     sed -f states.sed detex.l | lex ${LFLAGS}
  62.     mv lex.yy.c detex.c
  63.  
  64. man-page:
  65.     troff -man detex.1l
  66.  
  67. install: detex
  68.     install -c -m 775 -o binary -g staff -s detex ${DESTDIR}
  69.  
  70. clean:
  71.     -rm -f a.out core *.s *.o ERRS errs .,* .emacs_[0-9]*
  72.     -rm -f ${PROGS} lex.yy.c
  73.  
  74. print:    ${HDR} ${SRC}
  75.     ${LPR} Makefile ${HDR} ${SRC}
  76.  
  77. # Dependencies
  78. #
  79. detex.c: detex.h
  80. detex.c: detex.l
  81.