source: trunk/athena/bin/delete/Imakefile @ 11165

Revision 11165, 3.7 KB checked in by ghudson, 27 years ago (diff)
Assume any system's malloc(0) may return NULL.
Line 
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
18INSTALLDIR=     $(ATHBINDIR)
19TMPDIR=         /tmp
20DEFINES=        $(AFSDEFINES) $(OSDEFS) -DUSE_BLOCKS
21
22
23#ifdef DeleteDevelopment
24#ifdef UseInstalled
25IMAKE= imake
26IFLAGS= -I$(IRULESRC) -DTOPDIR=TOPDIR -DDeleteDevelopment
27#else
28UTILDIR=$(TOP)/util/bin/
29IMAKE= $(UTILDIR)imake
30IFLAGS= -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
41AFSLIBS=        -L$(AFSDIR)/lib -L$(AFSDIR)/lib/afs -lsys -lrx -llwp -lsys
42AFSDEFINES=     -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
49OSLIBS=         -lbsd
50#endif
51#ifdef __NetBSD__
52OSLIBS=         -lcompat
53#endif
54LIBS=           $(AFSLIBS) -lcom_err $(OSLIBS)
55SRCS=           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
58INCS=           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
61ETS=            delete_errs.h delete_errs.c
62ETSRCS=         delete_errs.et
63
64MANS=           man1/delete.1 man1/expunge.1 man1/lsdel.1 man1/purge.1\
65                man1/undelete.1
66
67ARCHIVE=        README Makefile PATCHLEVEL $(SRCS) $(INCS) $(MANS)\
68                $(ETSRCS) block-test.sh
69ARCHIVEDIRS=    man1
70
71DELETEOBJS=     delete.o util.o delete_errs.o errors.o
72UNDELETEOBJS=   undelete.o directories.o util.o pattern.o\
73                shell_regexp.o delete_errs.o errors.o stack.o
74EXPUNGEOBJS=    expunge.o directories.o pattern.o util.o col.o\
75                shell_regexp.o delete_errs.o errors.o stack.o
76LSDELOBJS=      lsdel.o util.o directories.o pattern.o col.o\
77                shell_regexp.o delete_errs.o errors.o stack.o
78
79DELETESRC=      delete.c util.c delete_errs.c errors.c
80UNDELETESRC=    undelete.c directories.c util.c pattern.c\
81                shell_regexp.c delete_errs.c errors.c stack.c
82EXPUNGESRC=     expunge.c directories.c pattern.c util.c col.c\
83                shell_regexp.c delete_errs.c errors.c stack.c
84LSDELSRC=       lsdel.c util.c directories.c pattern.c col.c\
85                shell_regexp.c delete_errs.c errors.c stack.c
86
87all:: delete_errs.h
88
89SimpleProgram(delete,$(DELETEOBJS),$(LIBS),$(INSTALLDIR))
90SimpleProgram(undelete,$(UNDELETEOBJS),$(LIBS),$(INSTALLDIR))
91SimpleProgram(expunge,$(EXPUNGEOBJS),$(LIBS),$(INSTALLDIR))
92SimpleProgram(lsdel,$(LSDELOBJS),$(LIBS),$(INSTALLDIR))
93
94install_man(man1/delete.1,delete.1)
95install_man(man1/expunge.1,expunge.1)
96install_man(man1/lsdel.1,lsdel.1)
97install_man(man1/purge.1,purge.1)
98install_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 */
104install::
105        -$(RM) $(DESTDIR)$(INSTALLDIR)/purge $(DESTDIR)$(ATHRBINDIR)/delete
106        -ln -s expunge $(DESTDIR)$(INSTALLDIR)/purge
107        -ln -s $(INSTALLDIR)/delete $(DESTDIR)$(ATHRBINDIR)/delete
108
109error_table(delete_errs)
110
111create_depend($(SRCS) delete_errs.c)
112
113tar: $(ARCHIVE)
114        tar cvf - $(ARCHIVE) | compress > delete.tar.Z
115
116shar: $(ARCHIVE)
117        makekit -oMANIFEST $(ARCHIVEDIRS) $(ARCHIVE)
118
119patch: $(ARCHIVE)
120        makepatch $(ARCHIVE)
121        mv patch delete.patch`cat PATCHLEVEL`
122        shar delete.patch`cat PATCHLEVEL` > delete.patch`cat PATCHLEVEL`.shar
123
124block-test: block-test.sh
125        CC=$(CC); TMPDIR=$(TMPDIR); export CC TMPDIR; . ./block-test.sh
Note: See TracBrowser for help on using the repository browser.