1 | /* |
---|
2 | * Copyright 1988 Massachusetts Institute of Technology. |
---|
3 | * |
---|
4 | * For copying and distribution information, see the file |
---|
5 | * "mit-copying.h". |
---|
6 | * |
---|
7 | * $Id: Imakefile,v 1.20 1998-02-25 22:27:21 ghudson Exp $ |
---|
8 | */ |
---|
9 | |
---|
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 | */ |
---|
17 | |
---|
18 | INSTALLDIR= $(ATHBINDIR) |
---|
19 | TMPDIR= /tmp |
---|
20 | DEFINES= $(AFSDEFINES) $(OSDEFS) -DUSE_BLOCKS |
---|
21 | |
---|
22 | |
---|
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 |
---|
33 | |
---|
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 | */ |
---|
39 | |
---|
40 | #ifdef AfsDir |
---|
41 | AFSLIBS= -L$(AFSDIR)/lib -L$(AFSDIR)/lib/afs -lsys -lrx -llwp -lsys |
---|
42 | AFSDEFINES= -I$(AFSDIR)/include -DAFS_MOUNTPOINTS |
---|
43 | #endif |
---|
44 | |
---|
45 | |
---|
46 | /* You probably won't have to edit anything below this line. */ |
---|
47 | |
---|
48 | #ifdef SOLARIS |
---|
49 | OSLIBS= -lbsd |
---|
50 | #endif |
---|
51 | #ifdef __NetBSD__ |
---|
52 | OSLIBS= -lcompat |
---|
53 | #endif |
---|
54 | LIBS= $(AFSLIBS) -lcom_err $(OSLIBS) |
---|
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\ |
---|
59 | mit-copying.h pattern.h undelete.h util.h\ |
---|
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)\ |
---|
68 | $(ETSRCS) block-test.sh |
---|
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 | |
---|
87 | all:: delete_errs.h |
---|
88 | |
---|
89 | SimpleProgram(delete,$(DELETEOBJS),$(LIBS),$(INSTALLDIR)) |
---|
90 | SimpleProgram(undelete,$(UNDELETEOBJS),$(LIBS),$(INSTALLDIR)) |
---|
91 | SimpleProgram(expunge,$(EXPUNGEOBJS),$(LIBS),$(INSTALLDIR)) |
---|
92 | SimpleProgram(lsdel,$(LSDELOBJS),$(LIBS),$(INSTALLDIR)) |
---|
93 | |
---|
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) |
---|
99 | |
---|
100 | /* |
---|
101 | * The symlink from $(INSTALLDIR)/delete to |
---|
102 | * $(DESTDIR)/$(ATHRBINDIR)/delete should probably eventually go away. |
---|
103 | */ |
---|
104 | install:: |
---|
105 | -$(RM) $(DESTDIR)$(INSTALLDIR)/purge $(DESTDIR)$(ATHRBINDIR)/delete |
---|
106 | -ln -s expunge $(DESTDIR)$(INSTALLDIR)/purge |
---|
107 | -ln -s $(INSTALLDIR)/delete $(DESTDIR)$(ATHRBINDIR)/delete |
---|
108 | |
---|
109 | error_table(delete_errs) |
---|
110 | |
---|
111 | create_depend($(SRCS) delete_errs.c) |
---|
112 | |
---|
113 | tar: $(ARCHIVE) |
---|
114 | tar cvf - $(ARCHIVE) | compress > delete.tar.Z |
---|
115 | |
---|
116 | shar: $(ARCHIVE) |
---|
117 | makekit -oMANIFEST $(ARCHIVEDIRS) $(ARCHIVE) |
---|
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 | |
---|
124 | block-test: block-test.sh |
---|
125 | CC=$(CC); TMPDIR=$(TMPDIR); export CC TMPDIR; . ./block-test.sh |
---|