home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / gnu / perl-4.036-src.lha / src / build / perl-4.036 / x2p / Makefile < prev    next >
Encoding:
Makefile  |  1993-09-28  |  2.8 KB  |  131 lines

  1. # : Makefile.SH,v 123379328Revision: 4.0.1.3 123379328Date: 92/06/08 16:11:32 $
  2. #
  3. # $Log:    Makefile.SH,v $
  4. # Revision 4.0.1.3  92/06/08  16:11:32  lwall
  5. # patch20: SH files didn't work well with symbolic links
  6. # patch20: cray didn't give enough memory to /bin/sh
  7. # patch20: makefiles now display new shift/reduce expectations
  8. # Revision 4.0.1.2  91/11/05  19:19:04  lwall
  9. # patch11: random cleanup
  10. # Revision 4.0.1.1  91/06/07  12:12:14  lwall
  11. # patch4: cflags now emits entire cc command except for the filename
  12. # Revision 4.0  91/03/20  01:57:03  lwall
  13. # 4.0 baseline.
  14.  
  15. CC = gcc
  16. YACC = bison -y
  17. bin = /usr/bin
  18. lib = 
  19. mansrc = /usr/man/man1
  20. manext = 1
  21. LDFLAGS = 
  22. SMALL = 
  23. LARGE =  
  24. mallocsrc = 
  25. mallocobj = 
  26. shellflags = 
  27.  
  28. libs = -lm -lgdbm
  29.  
  30. CCCMD = `sh $(shellflags) cflags $@`
  31.  
  32. public = a2p s2p find2perl
  33.  
  34. private = 
  35.  
  36. manpages = a2p.man s2p.man
  37.  
  38. util =
  39.  
  40. sh = Makefile.SH makedepend.SH
  41.  
  42. h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h
  43.  
  44. c = hash.c $(mallocsrc) str.c util.c walk.c
  45.  
  46. obj = hash.o $(mallocobj) str.o util.o walk.o
  47.  
  48. lintflags = -phbvxac
  49.  
  50. addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7
  51.  
  52. # grrr
  53. SHELL = /bin/sh
  54.  
  55. .c.o:
  56.     $(CCCMD) $*.c
  57.  
  58. all: $(public) $(private) $(util)
  59.     touch all
  60.  
  61. a2p: $(obj) a2p.o
  62.     $(CC) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
  63.  
  64. a2p.c: a2p.y
  65.     @ echo Expect 231 shift/reduce conflicts...
  66.     $(YACC) a2p.y
  67.     mv y.tab.c a2p.c
  68.  
  69. a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
  70.     $(CCCMD) $(LARGE) a2p.c
  71.  
  72. install: a2p s2p
  73. # won't work with csh
  74.     export PATH || exit 1
  75.     - mv $(bin)/a2p $(bin)/a2p.old 2>/dev/null
  76.     - mv $(bin)/s2p $(bin)/s2p.old 2>/dev/null
  77.     - if test `pwd` != $(bin); then cp $(public) $(bin); fi
  78.     cd $(bin); \
  79. for pub in $(public); do \
  80. chmod +x `basename $$pub`; \
  81. done
  82.     - if test `pwd` != $(mansrc); then \
  83. for page in $(manpages); do \
  84. cp $$page $(mansrc)/`basename $$page .man`.$(manext); \
  85. done; \
  86. fi
  87.  
  88. clean:
  89.     rm -f a2p *.o a2p.c
  90.  
  91. realclean: clean
  92.     rm -f *.orig */*.orig core $(addedbyconf) a2p.c s2p find2perl all cflags
  93.  
  94. # The following lint has practically everything turned on.  Unfortunately,
  95. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  96. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  97. # for that spot.
  98.  
  99. lint:
  100.     lint $(lintflags) $(defs) $(c) > a2p.fuzz
  101.  
  102. depend: $(mallocsrc) ../makedepend
  103.     ../makedepend
  104.  
  105. clist:
  106.     echo $(c) | tr ' ' '\012' >.clist
  107.  
  108. hlist:
  109.     echo $(h) | tr ' ' '\012' >.hlist
  110.  
  111. shlist:
  112.     echo $(sh) | tr ' ' '\012' >.shlist
  113.  
  114. config.sh: ../config.sh
  115.     rm -f config.sh
  116.     ln ../config.sh .
  117.  
  118. malloc.c: ../malloc.c
  119.     sed 's/"perl.h"/"..\/perl.h"/' ../malloc.c >malloc.c
  120.  
  121. # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  122. $(obj):
  123.     @ echo "You haven't done a "'"make depend" yet!'; exit 1
  124. makedepend: makedepend.SH
  125.     /bin/sh $(shellflags) makedepend.SH
  126.