home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume22 / undel2 / part01 / Makefile < prev    next >
Makefile  |  1990-06-07  |  5KB  |  161 lines

  1. #     Copyright 1988 Massachusetts Institute of Technology.
  2. #
  3. #     For copying and distribution information, see the file
  4. #     "mit-copyright.h".
  5. #
  6. #     $Source: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v $
  7. #     $Author: jik $
  8. #     $Header: /afs/athena.mit.edu/user/j/jik/src/delete/RCS/Makefile,v 1.17 89/12/20 15:14:34 jik Exp $
  9. #
  10.  
  11. DESTDIR=
  12. TARGETS=     delete undelete expunge purge lsdel
  13. INSTALLDIR=     /bin/athena
  14. MANDIR=        /usr/man
  15. MANSECT=    1
  16. CC=         cc
  17. COMPILE_ET=     compile_et
  18. LINT=         lint
  19. DEFINES=    -DAFS_MOUNTPOINTS
  20. INCLUDES=    -I/usr/include\
  21.         -I/afs/athena.mit.edu/astaff/project/afsdev/build/$(MACHINE)/include
  22. CFLAGS=     -O $(INCLUDES) $(DEFINES) $(CDEBUGFLAGS)
  23. LDFLAGS=    -L/usr/athena/lib\
  24.         -L/afs/athena.mit.edu/astaff/project/afsdev/build/$(MACHINE)/lib/afs
  25. LIBS=         -lcom_err -lsys
  26. LINTFLAGS=    $(DEFINES) $(INCLUDES) $(CDEBUGFLAGS) -u
  27. LINTLIBS=    
  28. SRCS=         delete.c undelete.c directories.c pattern.c util.c\
  29.         expunge.c lsdel.c col.c shell_regexp.c\
  30.         errors.c stack.c
  31. INCS=         col.h delete.h directories.h expunge.h lsdel.h\
  32.         mit-copyright.h pattern.h undelete.h util.h\
  33.         shell_regexp.h errors.h stack.h
  34. ETS=        delete_errs.h delete_errs.c
  35. ETSRCS=        delete_errs.et
  36.  
  37. MANS=         man1/delete.1 man1/expunge.1 man1/lsdel.1 man1/purge.1\
  38.         man1/undelete.1
  39.  
  40. ETLIBSRCS=    et/Makefile et/com_err.3 et/compile_et.1\
  41.         et/com_err.texinfo.Z.uu et/error_table.y et/et_lex.lex.l\
  42.         et/texinfo.tex.Z.uu et/*.c et/*.h et/*.et
  43. ARCHIVE=    README Makefile PATCHLEVEL $(SRCS) $(INCS) $(ETSRCS)\
  44.         $(MANS) 
  45. ARCHIVEDIRS=     man1 et et/profiled
  46.  
  47. DELETEOBJS=     delete.o util.o delete_errs.o errors.o
  48. UNDELETEOBJS=     undelete.o directories.o util.o pattern.o\
  49.         shell_regexp.o delete_errs.o errors.o stack.o
  50. EXPUNGEOBJS=     expunge.o directories.o pattern.o util.o col.o\
  51.         shell_regexp.o delete_errs.o errors.o stack.o
  52. LSDELOBJS=     lsdel.o util.o directories.o pattern.o col.o\
  53.         shell_regexp.o delete_errs.o errors.o stack.o
  54.  
  55. DELETESRC=     delete.c util.c delete_errs.c errors.c
  56. UNDELETESRC=     undelete.c directories.c util.c pattern.c\
  57.         shell_regexp.c delete_errs.c errors.c stack.c
  58. EXPUNGESRC=     expunge.c directories.c pattern.c util.c col.c\
  59.         shell_regexp.c delete_errs.c errors.c stack.c
  60. LSDELSRC=     lsdel.c util.c directories.c pattern.c col.c\
  61.         shell_regexp.c delete_errs.c errors.c stack.c
  62.  
  63. .SUFFIXES: .c .h .et
  64.  
  65. .et.h: $*.et
  66.     ${COMPILE_ET} $*.et
  67. .et.c: $*.et
  68.     ${COMPILE_ET} $*.et
  69.  
  70. all: $(TARGETS)
  71.  
  72. lint_all: lint_delete lint_undelete lint_expunge lint_lsdel
  73.  
  74. install: bin_install man_install
  75.  
  76. # Errors are ignored on bin_install and man_install because make on
  77. # some platforms, in combination with the shell, does really stupid
  78. # things and detects an error where there is none.
  79.  
  80. man_install:
  81.     -for i in $(TARGETS) ; do\
  82.       install -c man1/$$i.1\
  83.         $(DESTDIR)$(MANDIR)/man$(MANSECT)/$$i.$(MANSECT);\
  84.     done
  85.  
  86. bin_install: $(TARGETS)
  87.     -for i in $(TARGETS) ; do\
  88.           if [ -f $(DESTDIR)$(INSTALLDIR)/$$i ]; then\
  89.             mv $(DESTDIR)$(INSTALLDIR)/$$i $(DESTDIR)$(INSTALLDIR)/.#$$i ; \
  90.           fi; \
  91.       install -c -s $$i $(DESTDIR)$(INSTALLDIR) ; \
  92.         done
  93.  
  94. delete: $(DELETEOBJS)
  95.     $(CC) $(LDFLAGS) $(CFLAGS) -o delete $(DELETEOBJS) $(LIBS)
  96.  
  97. saber_delete:
  98.     #setopt program_name delete
  99.     #load $(LDFLAGS) $(CFLAGS) $(DELETESRC) $(LIBS)
  100.  
  101. lint_delete: $(DELETESRC)
  102.     $(LINT) $(LINTFLAGS) $(DELETESRC) $(LINTLIBS)
  103.  
  104. undelete: $(UNDELETEOBJS)
  105.     $(CC) $(LDFLAGS) $(CFLAGS) -o undelete $(UNDELETEOBJS) $(LIBS)
  106.  
  107. saber_undelete:
  108.     #setopt program_name undelete
  109.     #load $(LDFLAGS) $(CFLAGS) $(UNDELETESRC) $(LIBS)
  110.  
  111. lint_undelete: $(UNDELETESRC)
  112.     $(LINT) $(LINTFLAGS) $(UNDELETESRC) $(LINTLIBS)
  113.  
  114. expunge: $(EXPUNGEOBJS)
  115.     $(CC) $(LDFLAGS) $(CFLAGS) -o expunge $(EXPUNGEOBJS) $(LIBS)
  116.  
  117. saber_expunge:
  118.     #setopt program_name expunge
  119.     #load $(LDFLAGS) $(CFLAGS) $(EXPUNGESRC) $(LIBS)
  120.  
  121. lint_expunge: $(EXPUNGESRC)
  122.     $(LINT) $(LINTFLAGS) $(EXPUNGESRC) $(LINTLIBS)
  123.  
  124. purge: expunge
  125.     ln -s expunge purge
  126.  
  127. lsdel: $(LSDELOBJS)
  128.     $(CC) $(LDFLAGS) $(CFLAGS) -o lsdel $(LSDELOBJS) $(LIBS)
  129.  
  130. lint_lsdel: $(LSDELSRC)
  131.     $(LINT) $(LINTFLAGS) $(LSDELSRC) $(LINTLIBS)
  132.  
  133. saber_lsdel:
  134.     #setopt program_name lsdel
  135.     #load $(LDFLAGS) $(CFLAGS) $(LSDELSRC) $(LIBS)
  136.  
  137. tar: $(ARCHIVE)
  138.     tar cvf - $(ARCHIVE) $(ETLIBSRCS) | compress > delete.tar.Z
  139.  
  140. shar: $(ARCHIVE)
  141.     makekit -oMANIFEST -h2 MANIFEST $(ARCHIVEDIRS) $(ARCHIVE) $(ETLIBSRCS)
  142.  
  143. patch: $(ARCHIVE)
  144.     makepatch $(ARCHIVE)
  145.     mv patch delete.patch`cat PATCHLEVEL`
  146.     shar delete.patch`cat PATCHLEVEL` > delete.patch`cat PATCHLEVEL`.shar
  147.  
  148. clean:
  149.     -rm -f *~ *.bak *.o delete undelete lsdel expunge purge\
  150.         delete_errs.h delete_errs.c
  151.  
  152. depend: $(SRCS) $(INCS) $(ETS)
  153.     /usr/athena/makedepend -v $(CFLAGS) -s'# DO NOT DELETE' $(SRCS)
  154.  
  155. $(DELETEOBJS): delete_errs.h
  156. $(EXPUNGEOBJS): delete_errs.h
  157. $(UNDELETEOBJS): delete_errs.h
  158. $(LSDELOBJS): delete_errs.h
  159.  
  160. # DO NOT DELETE THIS LINE -- makedepend depends on it
  161.