home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / perl / Perl / x2p / Makefile < prev    next >
Makefile  |  1995-12-06  |  2KB  |  105 lines

  1. # $RCSfile: Makefile.SH,v 9388Revision: 4.1 9388Date: 92/08/07 18:29:07 $
  2. #
  3. # $Log:    Makefile.SH,v $
  4.  
  5. CC = cc
  6. BYACC = byacc
  7. LDFLAGS = -dynamic -prebind
  8. SMALL = 
  9. LARGE =  
  10. MAB = -arch m68k -arch i386 -arch hppa -arch sparc
  11. mallocsrc = 
  12. mallocobj = 
  13. shellflags = 
  14.  
  15. libs =  
  16.  
  17. CCCMD = `sh $(shellflags) cflags $@`
  18.  
  19. public = a2p s2p find2perl
  20.  
  21. private = 
  22.  
  23. manpages = a2p.man s2p.man
  24.  
  25. util =
  26.  
  27. sh = Makefile.SH cflags.SH find2perl.SH s2p.SH
  28.  
  29. addedbyconf = Makefile cflags find2perl s2p
  30.  
  31. h = EXTERN.h INTERN.h ../config.h handy.h hash.h a2p.h str.h util.h
  32.  
  33. c = hash.c $(mallocsrc) str.c util.c walk.c
  34.  
  35. obj = hash.o $(mallocobj) str.o util.o walk.o
  36.  
  37. lintflags = -phbvxac
  38.  
  39. # grrr
  40. SHELL = /bin/sh
  41.  
  42. .c.o:
  43.     $(CCCMD) $(MAB) $*.c
  44.  
  45. all: $(public) $(private) $(util)
  46.     touch all
  47.  
  48. a2p: $(obj) a2p.o
  49.     $(CC) $(MAB) $(LDFLAGS) $(obj) a2p.o $(libs) -o a2p
  50.  
  51. # I now supply a2p.c with the kits, so the following section is
  52. # used only if you force byacc to run by saying
  53. # make  run_byacc
  54.  
  55. run_byacc:    FORCE
  56.     @ echo Expect many shift/reduce and reduce/reduce conflicts
  57.     $(BYACC) a2p.y
  58.     mv y.tab.c a2p.c
  59.  
  60. # We don't want to regenerate a2p.c, but it might appear out-of-date
  61. # after a patch is applied or a new distribution is made.
  62. a2p.c: a2p.y
  63.     -@touch a2p.c
  64.  
  65. a2p.o: a2p.c a2py.c a2p.h EXTERN.h util.h INTERN.h handy.h ../config.h str.h hash.h
  66.     $(CCCMD) $(MAB) $(LARGE) a2p.c
  67.  
  68. clean:
  69.     rm -f a2p *.o
  70.  
  71. realclean: clean
  72.     rm -f *.orig core $(addedbyconf) all malloc.c
  73.     rm -f makefile makefile.old
  74.  
  75. # The following lint has practically everything turned on.  Unfortunately,
  76. # you have to wade through a lot of mumbo jumbo that can't be suppressed.
  77. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message
  78. # for that spot.
  79.  
  80. lint:
  81.     lint $(lintflags) $(defs) $(c) > a2p.fuzz
  82.  
  83. depend: $(mallocsrc) ../makedepend
  84.     ../makedepend
  85.  
  86. clist:
  87.     echo $(c) | tr ' ' '\012' >.clist
  88.  
  89. hlist:
  90.     echo $(h) | tr ' ' '\012' >.hlist
  91.  
  92. shlist:
  93.     echo $(sh) | tr ' ' '\012' >.shlist
  94.  
  95. malloc.c: ../malloc.c
  96.     rm -f malloc.c
  97.     sed <../malloc.c >malloc.c \
  98.         -e 's/"perl.h"/"..\/perl.h"/' \
  99.         -e 's/my_exit/exit/'
  100.  
  101. # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE
  102. $(obj):
  103.     @ echo "You haven't done a "'"make depend" yet!'; exit 1
  104. makedepend: depend
  105.