summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in78
1 files changed, 41 insertions, 37 deletions
diff --git a/Makefile.in b/Makefile.in
index d15fa3b..94edf49 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -17,7 +17,7 @@
# given in its arguments, or which it finds out for itself. #
#---------------------------------------------------------------------------#
-# BINDIR is the directory in which the pgrep command is installed.
+# BINDIR is the directory in which the pcregrep command is installed.
# INCDIR is the directory in which the public header file pcre.h is installed.
# LIBDIR is the directory in which the libraries are installed.
# MANDIR is the directory in which the man pages are installed.
@@ -35,11 +35,12 @@ MANDIR = @mandir@
CC = @CC@
CFLAGS = @CFLAGS@
RANLIB = @RANLIB@
+UTF8 = @UTF8@
-# LIBTOOL defaults to "", which cuts out the building of shared libraries.
-# If "configure" is called with --enable-shared-libraries, then LIBTOOL is
-# set to "./libtool", which causes shared libraries to be built, and LIBSUFFIX
-# is set to "la" instead of "a", which causes the shared libraries to be
+# LIBTOOL defaults to "./libtool", which enables the building of shared
+# libraries. If "configure" is called with --disable-shared-libraries, LIBTOOL
+# is set to "", which stops shared libraries from being built, and LIBSUFFIX
+# is set to "a" instead of "la", which causes the shared libraries not to be
# installed.
LIBTOOL = @LIBTOOL@
@@ -61,10 +62,11 @@ INSTALL_DATA = ${INSTALL} -m 644
#---------------------------------------------------------------------------#
# For almost all systems, the command to create a library is "ar cq", but #
-# there is at least one where it is different, to make this configurable. #
-# However, I haven't got round to learning how to make "configure" find #
-# this out for itself. It is necessary to use a command such as #
-# "make AR='ar -rc'" if you need to vary this. #
+# there is at least one where it is different, so this command must be #
+# configurable. However, I haven't got round to learning how to make #
+# "configure" find this out for itself. It is necessary to use a command #
+# such as "make AR='ar -rc'" if you need to vary this. The setting of AR is #
+# *not* passed over to ./ltconfig, because it does its own setting up. #
#---------------------------------------------------------------------------#
AR = ar cq
@@ -76,19 +78,19 @@ AR = ar cq
OBJ = maketables.o get.o study.o pcre.o
LOBJ = maketables.lo get.lo study.lo pcre.lo
-all: libtool libpcre.$(LIBSUFFIX) libpcreposix.$(LIBSUFFIX) pcretest pgrep
+all: libtool libpcre.$(LIBSUFFIX) libpcreposix.$(LIBSUFFIX) pcretest pcregrep
libtool: config.guess config.sub ltconfig ltmain.sh
@if test "$(LIBTOOL)" = "./libtool"; then \
echo '--- Building libtool ---'; \
- ./ltconfig ./ltmain.sh; \
+ CC=$(CC) CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)' ./ltconfig ./ltmain.sh; \
echo '--- Built libtool ---'; fi
-pgrep: libpcre.$(LIBSUFFIX) pgrep.o
+pcregrep: libpcre.$(LIBSUFFIX) pcregrep.o
@echo ' '
- @echo '--- Building pgrep utility'
+ @echo '--- Building pcregrep utility'
@echo ' '
- $(LIBTOOL) $(CC) $(CFLAGS) -o pgrep pgrep.o libpcre.$(LIBSUFFIX)
+ $(LIBTOOL) $(CC) $(CFLAGS) -o pcregrep pcregrep.o libpcre.$(LIBSUFFIX)
pcretest: libpcre.$(LIBSUFFIX) libpcreposix.$(LIBSUFFIX) pcretest.o
@echo ' '
@@ -128,7 +130,7 @@ libpcreposix.la: pcreposix.o
./libtool $(CC) -version-info '$(PCREPOSIXLIBVERSION)' -o libpcreposix.la -rpath $(LIBDIR) pcreposix.lo
pcre.o: chartables.c pcre.c pcre.h internal.h config.h Makefile
- $(LIBTOOL) $(CC) -c $(CFLAGS) pcre.c
+ $(LIBTOOL) $(CC) -c $(CFLAGS) $(UTF8) pcre.c
pcreposix.o: pcreposix.c pcreposix.h internal.h pcre.h config.h Makefile
$(LIBTOOL) $(CC) -c $(CFLAGS) pcreposix.c
@@ -140,13 +142,13 @@ get.o: get.c pcre.h internal.h config.h Makefile
$(LIBTOOL) $(CC) -c $(CFLAGS) get.c
study.o: study.c pcre.h internal.h config.h Makefile
- $(LIBTOOL) $(CC) -c $(CFLAGS) study.c
+ $(LIBTOOL) $(CC) -c $(CFLAGS) $(UTF8) study.c
pcretest.o: pcretest.c pcre.h config.h Makefile
- $(CC) -c $(CFLAGS) pcretest.c
+ $(CC) -c $(CFLAGS) $(UTF8) pcretest.c
-pgrep.o: pgrep.c pcre.h Makefile config.h
- $(CC) -c $(CFLAGS) pgrep.c
+pcregrep.o: pcregrep.c pcre.h Makefile config.h
+ $(CC) -c $(CFLAGS) $(UTF8) pcregrep.c
# An auxiliary program makes the default character table source
@@ -157,30 +159,30 @@ dftables: dftables.c maketables.c pcre.h internal.h config.h Makefile
$(CC) -o dftables $(CFLAGS) dftables.c
install: all
- $(LIBTOOL) $(INSTALL_DATA) libpcre.$(LIBSUFFIX) $(LIBDIR)/libpcre.$(LIBSUFFIX)
- $(LIBTOOL) $(INSTALL_DATA) libpcreposix.$(LIBSUFFIX) $(LIBDIR)/libpcreposix.$(LIBSUFFIX)
- $(INSTALL_DATA) pcre.h $(INCDIR)/pcre.h
- $(INSTALL_DATA) pcreposix.h $(INCDIR)/pcreposix.h
- $(INSTALL_DATA) doc/pcre.3 $(MANDIR)/man3/pcre.3
- $(INSTALL_DATA) doc/pcreposix.3 $(MANDIR)/man3/pcreposix.3
- $(INSTALL_DATA) doc/pgrep.1 $(MANDIR)/man1/pgrep.1
+ $(LIBTOOL) $(INSTALL_DATA) libpcre.$(LIBSUFFIX) $(DESTDIR)/$(LIBDIR)/libpcre.$(LIBSUFFIX)
+ $(LIBTOOL) $(INSTALL_DATA) libpcreposix.$(LIBSUFFIX) $(DESTDIR)/$(LIBDIR)/libpcreposix.$(LIBSUFFIX)
+ $(INSTALL_DATA) pcre.h $(DESTDIR)/$(INCDIR)/pcre.h
+ $(INSTALL_DATA) pcreposix.h $(DESTDIR)/$(INCDIR)/pcreposix.h
+ $(INSTALL_DATA) doc/pcre.3 $(DESTDIR)/$(MANDIR)/man3/pcre.3
+ $(INSTALL_DATA) doc/pcreposix.3 $(DESTDIR)/$(MANDIR)/man3/pcreposix.3
+ $(INSTALL_DATA) doc/pcregrep.1 $(DESTDIR)/$(MANDIR)/man1/pcregrep.1
@if test "$(LIBTOOL)" = "./libtool"; then \
echo ' '; \
- echo '--- Rebuilding pgrep to use installed shared library ---'; \
- echo $(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \
- $(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \
+ echo '--- Rebuilding pcregrep to use installed shared library ---'; \
+ echo $(CC) $(CFLAGS) -o pcregrep pcregrep.o -L$(DESTDIR)/$(LIBDIR) -lpcre; \
+ $(CC) $(CFLAGS) -o pcregrep pcregrep.o -L$(DESTDIR)/$(LIBDIR) -lpcre; \
echo '--- Rebuilding pcretest to use installed shared library ---'; \
- echo $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \
- $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \
+ echo $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(DESTDIR)/$(LIBDIR) -lpcre -lpcreposix; \
+ $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(DESTDIR)/$(LIBDIR) -lpcre -lpcreposix; \
fi
- $(INSTALL) pgrep $(BINDIR)/pgrep
- $(INSTALL) pcre-config $(BINDIR)/pcre-config
+ $(INSTALL) pcregrep $(DESTDIR)/$(BINDIR)/pcregrep
+ $(INSTALL) pcre-config $(DESTDIR)/$(BINDIR)/pcre-config
# We deliberately omit dftables and chartables.c from 'make clean'; once made
# chartables.c shouldn't change, and if people have edited the tables by hand,
# you don't want to throw them away.
-clean:; -rm -rf *.o *.lo *.a *.la .libs pcretest pgrep testtry
+clean:; -rm -rf *.o *.lo *.a *.la .libs pcretest pcregrep testtry
# But "make distclean" should get back to a virgin distribution
@@ -190,6 +192,8 @@ distclean: clean
check: runtest
+test: runtest
+
runtest: all
./RunTest
@@ -198,7 +202,7 @@ runtest: all
# This addition for mingw32 was contributed by Paul Sokolovsky
# <Paul.Sokolovsky@technologist.com>. I (PH) don't know anything about it!
-dll: _dll libpcre.dll.a pgrep_d pcretest_d
+dll: _dll libpcre.dll.a pcregrep_d pcretest_d
_dll:
$(MAKE) CFLAGS=-DSTATIC pcre.dll
@@ -206,8 +210,8 @@ _dll:
pcre.dll: $(OBJ) pcreposix.o pcre.def
libpcre.dll.a: pcre.def
-pgrep_d: libpcre.dll.a pgrep.o
- $(CC) $(CFLAGS) -L. -o pgrep pgrep.o -lpcre.dll
+pcregrep_d: libpcre.dll.a pcregrep.o
+ $(CC) $(CFLAGS) -L. -o pcregrep pcregrep.o -lpcre.dll
pcretest_d: libpcre.dll.a pcretest.o
$(PURIFY) $(CC) $(CFLAGS) -L. -o pcretest pcretest.o -lpcre.dll