1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
# Makefile for GNU ed.
# Copyright (C) 1993, 1994 Free Software Foundation, Inc.
# Andrew Moore 1993, 1994.
# All Rights Reserved
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
SHELL = /bin/sh
srcdir = @srcdir@
testdir = $(srcdir)/testsuite
VPATH = @srcdir@
LN_S = @LN_S@
CC = @CC@
AR = ar
RANLIB = @RANLIB@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
CFLAGS = @CFLAGS@
DEFS = @DEFS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
infodir = $(prefix)/info
mandir = $(prefix)/man/man1
manext = .1
CPPFLAGS = -I. -I$(srcdir) $(DEFS) @CPPFLAGS@
.c.o:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $<
HEADERS = ed.h
SOURCES = buf.c glbl.c io.c main.c re.c signal.c sub.c undo.c version.c
OBJECTS = buf.o glbl.o io.o main.o re.o signal.o sub.o undo.o version.o
LIBHDRS = pathmax.h getopt.h regex.h
LIBSRCS = alloca.c error.c getopt.c getopt1.c regex.c xmalloc.c
LIBOBJS = @ALLOCA@ getopt.o getopt1.o regex.o @LIBOBJS@
DISTFILES = $(HEADERS) $(LIBHDRS) $(LIBSRCS) $(SOURCES) ChangeLog COPYING \
INSTALL Makefile.in NEWS POSIX README TODO THANKS \
configure configure.in stamp-h.in config.h.in mkinstalldirs install.sh \
ed.1 ed.info ed.texinfo texinfo.tex
all: ed
ed: $(OBJECTS) libed.a
$(CC) $(LDFLAGS) -o ed $(OBJECTS) libed.a $(LIBS)
buf.o: ed.h config.h regex.h
ed.o: ed.h config.h regex.h
main.o: ed.h config.h regex.h getopt.h pathmax.h
re.o: ed.h config.h regex.h
signal.o: ed.h config.h regex.h
libed.a: $(LIBOBJS)
rm -f libed.a
$(AR) cru libed.a $(LIBOBJS)
$(RANLIB) libed.a
getopt.o getopt1.o: getopt.h
regex.o: regex.h
check: ed
rootme=`pwd`; srcrootme=`cd $(srcdir); pwd`;\
test -r mkinstalldirs || cp $(srcdir)/mkinstalldirs .;\
cd $(testdir); \
make check objdir=$${rootme}
info: ed.info
ed.info: ed.texinfo
$(MAKEINFO) -I$(srcdir) --no-split ed.texinfo
dvi: ed.dvi
ed.dvi: ed.texinfo
$(TEXI2DVI) $(srcdir)/ed.texinfo
install: ed ed.info installdirs
$(INSTALL_PROGRAM) ed $(bindir)/$(binprefix)ed
rm -f $(bindir)/$(binprefix)red
cd $(bindir); \
$(LN_S) $(binprefix)ed $(binprefix)red
$(INSTALL_DATA) $(srcdir)/ed.info $(infodir)/$(binprefix)ed.info
$(INSTALL_DATA) $(srcdir)/ed.1 $(mandir)/$(binprefix)ed$(manext)
rm -f $(mandir)/$(binprefix)red$(manext)
cd $(mandir); \
$(LN_S) $(binprefix)ed$(manext) $(binprefix)red$(manext)
# Make sure all installation directories, e.g. $(bindir) actually exist by
# making them if necessary.
installdirs:
$(srcdir)/mkinstalldirs $(bindir) $(infodir) $(mandir)
uninstall: all
rm -f $(bindir)/$(binprefix)ed $(bindir)/$(binprefix)red
rm -f $(infodir)/$(binprefix)ed.info
rm -f $(mandir)/$(binprefix)ed.1 $(mandir)/$(binprefix)red.1
tags: $(HEADERS) $(SOURCES)
ctags $(HEADERS) $(SOURCES)
TAGS: $(HEADERS) $(SOURCES)
etags -t $(HEADERS) $(SOURCES)
texclean:
rm -f *.aux *.cp *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr
mostlyclean: texclean
rm -f *~ *.tmp core [Ee]rrs
clean: mostlyclean
rm -f ed *.o *.a ed.0
rootme=`pwd`; \
cd $(testdir); \
make clean objdir=$${rootme}
distclean: clean
rm -f tags TAGS Makefile config.h config.status config.log config.cache
realclean: distclean
rm -f ed.info
dist: $(DISTFILES)
echo > .fname \
ed-`sed -n -e '/version_/s/[^0-9.]*\([0-9.]*\).*/\1/p' version.c`
rm -rf `cat .fname`
mkdir `cat .fname`
chmod 777 `cat .fname`
ln $(DISTFILES) `cat .fname`
mkdir `cat .fname`/testsuite
find testsuite -type f -exec ln {} `cat .fname`/testsuite \;
chmod -R a+r `cat .fname`
chmod 777 `cat .fname`/testsuite
tar chof `cat .fname`.tar `cat .fname`
gzip `cat .fname`.tar
rm -rf `cat .fname` .fname
# For the justification of the following Makefile rules, see node
# `Automatic Remaking' in GNU Autoconf documentation.
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
configure: configure.in
cd $(srcdir); autoconf
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
touch stamp-h
config.h.in: stamp-h.in
stamp-h.in: configure.in
cd $(srcdir); autoheader
touch $(srcdir)/stamp-h.in
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
|