[5040] | 1 | /* |
---|
| 2 | * Copyright 1988 Massachusetts Institute of Technology. |
---|
| 3 | * |
---|
| 4 | * For copying and distribution information, see the file |
---|
| 5 | * "mit-copying.h". |
---|
| 6 | * |
---|
[11165] | 7 | * $Id: Imakefile,v 1.20 1998-02-25 22:27:21 ghudson Exp $ |
---|
[5040] | 8 | */ |
---|
[3596] | 9 | |
---|
[5040] | 10 | /* |
---|
| 11 | * If you are compiling on a system that has an st_blocks field in |
---|
| 12 | * the stat structure whose value represents the number of 512-byte |
---|
| 13 | * blocks taken up by the file, add -DUSE_BLOCKS to the DEFINES |
---|
| 14 | * variable below. If you don't know whether or not to define it, |
---|
| 15 | * run "make block-test". |
---|
| 16 | */ |
---|
[4629] | 17 | |
---|
[6402] | 18 | INSTALLDIR= $(ATHBINDIR) |
---|
| 19 | TMPDIR= /tmp |
---|
| 20 | DEFINES= $(AFSDEFINES) $(OSDEFS) -DUSE_BLOCKS |
---|
[3596] | 21 | |
---|
[6402] | 22 | |
---|
[5040] | 23 | #ifdef DeleteDevelopment |
---|
| 24 | #ifdef UseInstalled |
---|
| 25 | IMAKE= imake |
---|
| 26 | IFLAGS= -I$(IRULESRC) -DTOPDIR=TOPDIR -DDeleteDevelopment |
---|
| 27 | #else |
---|
| 28 | UTILDIR=$(TOP)/util/bin/ |
---|
| 29 | IMAKE= $(UTILDIR)imake |
---|
| 30 | IFLAGS= -I$(IRULESRC) -DDeleteDevelopment |
---|
| 31 | #endif |
---|
| 32 | #endif |
---|
[3596] | 33 | |
---|
[5040] | 34 | /* |
---|
| 35 | * These variables apply only if you want this program to recognize |
---|
| 36 | * Andrew File System mount points. If you don't want to support AFS, |
---|
| 37 | * then set all the variables starting with "AFS" to nothing. |
---|
| 38 | */ |
---|
[3596] | 39 | |
---|
[6402] | 40 | #ifdef AfsDir |
---|
[10810] | 41 | AFSLIBS= -L$(AFSDIR)/lib -L$(AFSDIR)/lib/afs -lsys -lrx -llwp -lsys |
---|
[6402] | 42 | AFSDEFINES= -I$(AFSDIR)/include -DAFS_MOUNTPOINTS |
---|
| 43 | #endif |
---|
[5079] | 44 | |
---|
[3596] | 45 | |
---|
[5040] | 46 | /* You probably won't have to edit anything below this line. */ |
---|
[3596] | 47 | |
---|
[8126] | 48 | #ifdef SOLARIS |
---|
[8236] | 49 | OSLIBS= -lbsd |
---|
[8126] | 50 | #endif |
---|
[10810] | 51 | #ifdef __NetBSD__ |
---|
| 52 | OSLIBS= -lcompat |
---|
| 53 | #endif |
---|
[8236] | 54 | LIBS= $(AFSLIBS) -lcom_err $(OSLIBS) |
---|
[3596] | 55 | SRCS= delete.c undelete.c directories.c pattern.c util.c\ |
---|
| 56 | expunge.c lsdel.c col.c shell_regexp.c\ |
---|
| 57 | errors.c stack.c |
---|
| 58 | INCS= col.h delete.h directories.h expunge.h lsdel.h\ |
---|
[4505] | 59 | mit-copying.h pattern.h undelete.h util.h\ |
---|
[3596] | 60 | shell_regexp.h errors.h stack.h |
---|
| 61 | ETS= delete_errs.h delete_errs.c |
---|
| 62 | ETSRCS= delete_errs.et |
---|
| 63 | |
---|
| 64 | MANS= man1/delete.1 man1/expunge.1 man1/lsdel.1 man1/purge.1\ |
---|
| 65 | man1/undelete.1 |
---|
| 66 | |
---|
| 67 | ARCHIVE= README Makefile PATCHLEVEL $(SRCS) $(INCS) $(MANS)\ |
---|
[11165] | 68 | $(ETSRCS) block-test.sh |
---|
[3596] | 69 | ARCHIVEDIRS= man1 |
---|
| 70 | |
---|
| 71 | DELETEOBJS= delete.o util.o delete_errs.o errors.o |
---|
| 72 | UNDELETEOBJS= undelete.o directories.o util.o pattern.o\ |
---|
| 73 | shell_regexp.o delete_errs.o errors.o stack.o |
---|
| 74 | EXPUNGEOBJS= expunge.o directories.o pattern.o util.o col.o\ |
---|
| 75 | shell_regexp.o delete_errs.o errors.o stack.o |
---|
| 76 | LSDELOBJS= lsdel.o util.o directories.o pattern.o col.o\ |
---|
| 77 | shell_regexp.o delete_errs.o errors.o stack.o |
---|
| 78 | |
---|
| 79 | DELETESRC= delete.c util.c delete_errs.c errors.c |
---|
| 80 | UNDELETESRC= undelete.c directories.c util.c pattern.c\ |
---|
| 81 | shell_regexp.c delete_errs.c errors.c stack.c |
---|
| 82 | EXPUNGESRC= expunge.c directories.c pattern.c util.c col.c\ |
---|
| 83 | shell_regexp.c delete_errs.c errors.c stack.c |
---|
| 84 | LSDELSRC= lsdel.c util.c directories.c pattern.c col.c\ |
---|
| 85 | shell_regexp.c delete_errs.c errors.c stack.c |
---|
| 86 | |
---|
[5283] | 87 | all:: delete_errs.h |
---|
| 88 | |
---|
[5040] | 89 | SimpleProgram(delete,$(DELETEOBJS),$(LIBS),$(INSTALLDIR)) |
---|
| 90 | SimpleProgram(undelete,$(UNDELETEOBJS),$(LIBS),$(INSTALLDIR)) |
---|
| 91 | SimpleProgram(expunge,$(EXPUNGEOBJS),$(LIBS),$(INSTALLDIR)) |
---|
| 92 | SimpleProgram(lsdel,$(LSDELOBJS),$(LIBS),$(INSTALLDIR)) |
---|
[3596] | 93 | |
---|
[5040] | 94 | install_man(man1/delete.1,delete.1) |
---|
| 95 | install_man(man1/expunge.1,expunge.1) |
---|
| 96 | install_man(man1/lsdel.1,lsdel.1) |
---|
| 97 | install_man(man1/purge.1,purge.1) |
---|
| 98 | install_man(man1/undelete.1,undelete.1) |
---|
[3596] | 99 | |
---|
[5040] | 100 | /* |
---|
| 101 | * The symlink from $(INSTALLDIR)/delete to |
---|
| 102 | * $(DESTDIR)/$(ATHRBINDIR)/delete should probably eventually go away. |
---|
| 103 | */ |
---|
| 104 | install:: |
---|
[8553] | 105 | -$(RM) $(DESTDIR)$(INSTALLDIR)/purge $(DESTDIR)$(ATHRBINDIR)/delete |
---|
[5040] | 106 | -ln -s expunge $(DESTDIR)$(INSTALLDIR)/purge |
---|
| 107 | -ln -s $(INSTALLDIR)/delete $(DESTDIR)$(ATHRBINDIR)/delete |
---|
[3596] | 108 | |
---|
[5040] | 109 | error_table(delete_errs) |
---|
[3596] | 110 | |
---|
[5040] | 111 | create_depend($(SRCS) delete_errs.c) |
---|
[3596] | 112 | |
---|
| 113 | tar: $(ARCHIVE) |
---|
[4430] | 114 | tar cvf - $(ARCHIVE) | compress > delete.tar.Z |
---|
[3596] | 115 | |
---|
| 116 | shar: $(ARCHIVE) |
---|
[4430] | 117 | makekit -oMANIFEST $(ARCHIVEDIRS) $(ARCHIVE) |
---|
[3596] | 118 | |
---|
| 119 | patch: $(ARCHIVE) |
---|
| 120 | makepatch $(ARCHIVE) |
---|
| 121 | mv patch delete.patch`cat PATCHLEVEL` |
---|
| 122 | shar delete.patch`cat PATCHLEVEL` > delete.patch`cat PATCHLEVEL`.shar |
---|
| 123 | |
---|
[4629] | 124 | block-test: block-test.sh |
---|
[5045] | 125 | CC=$(CC); TMPDIR=$(TMPDIR); export CC TMPDIR; . ./block-test.sh |
---|