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.
RevLine 
[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]18INSTALLDIR=     $(ATHBINDIR)
19TMPDIR=         /tmp
20DEFINES=        $(AFSDEFINES) $(OSDEFS) -DUSE_BLOCKS
[3596]21
[6402]22
[5040]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
[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]41AFSLIBS=        -L$(AFSDIR)/lib -L$(AFSDIR)/lib/afs -lsys -lrx -llwp -lsys
[6402]42AFSDEFINES=     -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]49OSLIBS=         -lbsd
[8126]50#endif
[10810]51#ifdef __NetBSD__
52OSLIBS=         -lcompat
53#endif
[8236]54LIBS=           $(AFSLIBS) -lcom_err $(OSLIBS)
[3596]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\
[4505]59                mit-copying.h pattern.h undelete.h util.h\
[3596]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)\
[11165]68                $(ETSRCS) block-test.sh
[3596]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
[5283]87all:: delete_errs.h
88
[5040]89SimpleProgram(delete,$(DELETEOBJS),$(LIBS),$(INSTALLDIR))
90SimpleProgram(undelete,$(UNDELETEOBJS),$(LIBS),$(INSTALLDIR))
91SimpleProgram(expunge,$(EXPUNGEOBJS),$(LIBS),$(INSTALLDIR))
92SimpleProgram(lsdel,$(LSDELOBJS),$(LIBS),$(INSTALLDIR))
[3596]93
[5040]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)
[3596]99
[5040]100/*
101 * The symlink from $(INSTALLDIR)/delete to
102 * $(DESTDIR)/$(ATHRBINDIR)/delete should probably eventually go away.
103 */
104install::
[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]109error_table(delete_errs)
[3596]110
[5040]111create_depend($(SRCS) delete_errs.c)
[3596]112
113tar: $(ARCHIVE)
[4430]114        tar cvf - $(ARCHIVE) | compress > delete.tar.Z
[3596]115
116shar: $(ARCHIVE)
[4430]117        makekit -oMANIFEST $(ARCHIVEDIRS) $(ARCHIVE)
[3596]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
[4629]124block-test: block-test.sh
[5045]125        CC=$(CC); TMPDIR=$(TMPDIR); export CC TMPDIR; . ./block-test.sh
Note: See TracBrowser for help on using the repository browser.