OSSP CVS Repository

ossp - ossp-pkg/str/Makefile.in
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/str/Makefile.in
##
##  OSSP str - String Handling
##  Copyright (c) 1999-2005 Ralf S. Engelschall <rse@engelschall.com>
##  Copyright (c) 1999-2005 The OSSP Project <http://www.ossp.org/>
##
##  This file is part of OSSP str, a string handling and manipulation
##  library which can be found at http://www.ossp.org/pkg/lib/str/.
##
##  Permission to use, copy, modify, and distribute this software for
##  any purpose with or without fee is hereby granted, provided that
##  the above copyright notice and this permission notice appear in all
##  copies.
##
##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
##  SUCH DAMAGE.
##
##  Makefile.in: Autoconf Makefile skeleton
##

@SET_MAKE@

TOP         = .
prefix      = @prefix@
exec_prefix = @exec_prefix@
bindir      = @bindir@
libdir      = @libdir@
includedir  = @includedir@
mandir      = @mandir@

CC          = @CC@
CFLAGS      = @DEFS@ @CFLAGS@ -I.
LDFLAGS     = @LDFLAGS@ -L.
LIBS        = @LIBS@
AR          = @AR@
RANLIB      = @RANLIB@
RM          = rm -f
POD2MAN     = pod2man
SHTOOL      = ./shtool
LIBTOOL     = ./libtool

SRCS=\
str_pcre.c \
str_memory.c \
str_basic.c \
str_search.c \
str_token.c \
str_parse.c \
str_format.c \
str_hash.c \
str_base64.c \
str_version.c

OBJS=\
str_pcre.lo \
str_memory.lo \
str_basic.lo \
str_search.lo \
str_token.lo \
str_parse.lo \
str_format.lo \
str_hash.lo \
str_base64.lo \
str_version.lo

_VERSION_FILE = \
	str_version.c

_VERSION = \
	$(SHTOOL) version -lc -nStr -pstr_ $$OPT $(_VERSION_FILE);\
	V=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`;\
	sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README

_MANPAGE = \
	V1=`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`; \
	V2=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`; \
	D=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE) |\
	   sed -e 's;.*(;;' -e 's;).*;;'`; \
	$(POD2MAN) --section=$${SEC} --center="$${ONELINE}" \
	           --release="$$D" --date="$${NAME} $$V1" $${BASENAME}.pod |\
	sed -e "s;STR_VERSION_STR;$$V2;" >$${BASENAME}.$${SEC}

.SUFFIXES:
.SUFFIXES: .c .o .lo
.c.o:
	$(CC) -c $(CFLAGS) $<
.c.lo:
	$(LIBTOOL) --mode=compile --quiet $(CC) -c $(CFLAGS) $<

all: libstr.la str_test str.3 str-config.1

$(OBJS): Makefile

libstr.la: $(OBJS)
	$(LIBTOOL) --mode=link --quiet $(CC) -o libstr.la $(OBJS) -rpath $(libdir) \
	-version-info `$(SHTOOL) version -l c -d libtool str_version.c`

str_test: str_test.o ts.o libstr.la
	$(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o str_test str_test.o ts.o libstr.la $(LIBS)

str-config.1: str-config.pod $(_VERSION_FILE)
	BASENAME="str-config"; SEC=1; \
	NAME="Str"; ONELINE="String Library"; \
	$(_MANPAGE)
str.3: str.pod $(_VERSION_FILE)
	BASENAME="str"; SEC=3; \
	NAME="Str"; ONELINE="String Library"; \
	$(_MANPAGE)

str_pcre.lo: str_pcre.tab str_pcre.c
str_pcre.tab: str_pcre.c
	$(CC) $(CFLAGS) -DSTR_PCRE_TAB $(LDFLAGS) -o str_pcre.gen str_pcre.c $(LIBS)
	./str_pcre.gen >str_pcre.tab
	-rm -f str_pcre.gen

check: test
test: str_test
	$(LIBTOOL) --mode=execute ./str_test

install: all
	$(SHTOOL) mkdir -p -f -m 755 $(bindir)
	$(SHTOOL) mkdir -p -f -m 755 $(includedir)
	$(SHTOOL) mkdir -p -f -m 755 $(libdir)
	$(SHTOOL) mkdir -p -f -m 755 $(mandir)/man1
	$(SHTOOL) mkdir -p -f -m 755 $(mandir)/man3
	$(SHTOOL) install -c -m 755 str-config $(bindir)/str-config
	$(SHTOOL) install -c -m 644 str-config.1 $(mandir)/man1/str-config.1
	$(SHTOOL) install -c -m 644 str.3 $(mandir)/man3/str.3
	$(SHTOOL) install -c -m 644 str.h $(includedir)/str.h
	@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libstr.la $(libdir)/libstr.la

clean:
	$(RM) *.lo *.o
	$(RM) str_test.o str_test
	$(RM) libstr.la
	$(RM) -r .libs

distclean: clean
	$(RM) str-config
	$(RM) config.h
	$(RM) str_pcre.tab
	$(RM) config.log config.cache config.status
	$(RM) libtool
	$(RM) Makefile
	$(RM) str.h

realclean: distclean
	$(RM) config.guess config.sub ltmain.sh libtool.m4
	$(RM) configure config.h.in
	$(RM) str-config.1 str.3
	$(RM) shtool

dist: distclean
	@$(SHTOOL) fixperm -v .; \
	V=`$(SHTOOL) version -l c -d short str_version.c`; \
	$(SHTOOL) tarball -o str-$${V}.tar.gz -d str-$${V} -u rse -g str \
	                  -e 'CVS,\.cvsignore,\.[ao],^\.,autogen.sh' -c 'gzip --best' .

#   increase or update version information
new-version:
	@V="$(VERSION)"; \
	if [ ".$$V" != . ]; then \
		OPT="-s$$V"; \
	else \
		OPT="-e"; \
	fi; \
	$(_VERSION)
update-version:
	@OPT="-s`$(SHTOOL) version -lc -dshort $(_VERSION_FILE)`" && $(_VERSION)

#   create dependencies
depend: all
	cp Makefile.in Makefile.in.bak \
	&& sed -ne '1,/^#   AUTOMATICALLY GENERATED DEPENDENCY LIST/p' Makefile.in > Makefile.new \
	&& $(CC) -MM $(CPPFLAGS) $(CFLAGS) $(SRCS) |\
	   perl -e 'my $$d = ""; $$d .= $$_ while (<STDIN>); $$_ = $$d; \
	            s|\\\n\s*| |sg; s|\b?\S*/\S*\b?||g; s|\s{2,}| |g; \
	            print $$_;' >> Makefile.new \
	&& cp Makefile.new Makefile.in
	&& rm -f Makefile.new

#   AUTOMATICALLY GENERATED DEPENDENCY LIST - DO NOT EDIT
str_pcre.o: str_pcre.c str_pcre.h str_pcre.tab
str_memory.o: str_memory.c str_p.h str.h str_config.h str_pcre.h
str_basic.o: str_basic.c str_p.h str.h str_config.h str_pcre.h
str_search.o: str_search.c str_p.h str.h str_config.h str_pcre.h
str_token.o: str_token.c str_p.h str.h str_config.h str_pcre.h
str_parse.o: str_parse.c str_p.h str.h str_config.h str_pcre.h
str_format.o: str_format.c str_p.h str.h str_config.h str_pcre.h
str_hash.o: str_hash.c str_p.h str.h str_config.h str_pcre.h
str_base64.o: str_base64.c str_p.h str.h str_config.h str_pcre.h
str_version.o: str_version.c str_version.c

CVSTrac 2.0.1