OSSP CVS Repository

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

ossp-pkg/rc/Makefile.in 1.7
##
##  rc - OSSP Run-command processor
##  Copyright (c) 2002 Cable & Wireless Deutschland GmbH
##  Copyright (c) 2002 The OSSP Project <http://www.ossp.org/>
##  Copyright (c) 2002 Ralf S. Engelschall
##
##  This file is part of OSSP rc, a portable Run-command processor
##  which can be found at http://www.ossp.org/pkg/rc/
##
##  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: make(1) build procedure
##

@SET_MAKE@

DESTDIR         =
prefix          = @prefix@
exec_prefix     = @exec_prefix@
bindir          = @bindir@
sbindir         = @sbindir@
libdir          = @libdir@
includedir      = @includedir@
mandir          = @mandir@

CC              = @CC@
CFLAGS          = @CFLAGS@ @DEFS@
CPPFLAGS        = @CPPFLAGS@
LDFLAGS         = @LDFLAGS@
LIBS            = @LIBS@

RM              = rm -f
RMDIR           = rmdir
SHTOOL          = ./shtool
LIBTOOL         = ./libtool
POD2MAN         = pod2man
TRUE            = true

PROG_NAME       = rc

TARGET          = $(TARGET_PROGS) $(TARGET_MANS)
TARGET_PROGS    = rc
TARGET_MANS     = rc.1 rc-sample.5

SRCS            = rc.c rc_version.c rc_pcre.c
OBJS            = rc.o rc_version.o rc_pcre.lo

SUBDIRS         = @SUBDIR_EX@ @SUBDIR_VAR@ @SUBDIR_STR@ @SUBDIR_POPT@

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

all:            _SUBDIRS_all $(TARGET)

# Convinience rule calls _SUBDIRS with various make targets
_SUBDIRS_all _SUBDIRS_check _SUBDIRS_install _SUBDIRS_uninstall _SUBDIRS_clean \
_SUBDIRS_distclean _SUBDIRS_realclean _SUBDIRS_depend:
	@$(MAKE) $(MFLAGS) \
	         _SUBDIRS_TARGET=`echo $@ | sed -e 's/^_SUBDIRS_//'` \
	         _SUBDIRS_STEPDOWN 

# Nonrecursive rule makes the subdirs
_SUBDIRS_STEPDOWN:
	@for subdir in $(SUBDIRS); do \
	    test ! -f "$$subdir/Makefile" && continue; \
	    echo "===> $(_SUBDIRS_DP)$$subdir ($(_SUBDIRS_TARGET))"; \
	    (cd $$subdir; \
	     $(MAKE) $(MFLAGS) \
	             _SUBDIRS_DP="$(_SUBDIRS_DP)$$subdir/" \
	             $(_SUBDIRS_TARGET) || exit 1) || exit 1; \
	    echo "<=== $(_SUBDIRS_DP)$$subdir"; \
	done

# Build pcre regex library
rc_pcre.lo: rc_pcre.tab rc_pcre.c
rc_pcre.tab: rc_pcre.c
#	$(CC) $(CFLAGS) -DRC_PCRE_TAB $(LDFLAGS) -o rc_pcre.gen rc_pcre.c $(LIBS)
	$(CC) $(CFLAGS) -DRC_PCRE_TAB $(LDFLAGS) -o rc_pcre.gen rc_pcre.c
	./rc_pcre.gen >rc_pcre.tab
	$(RM) rc_pcre.gen

$(PROG_NAME): $(OBJS)
#	$(LIBTOOL) --mode=link --quiet $(CC) $(LDFLAGS) -o $(PROG_NAME) $(OBJS) $(LIBS)
	$(CC) $(LDFLAGS) -o $(PROG_NAME) $(OBJS) $(LIBS)

rc.1: rc.pod
	VS=`$(SHTOOL) version -lc -dshort rc_version.c`; \
	VL=`$(SHTOOL) version -lc -dlong rc_version.c`; \
	$(POD2MAN) --section=5 --center="Run-command processor" \
               --release="$$VS" --date="$$VL" \
               rc.pod >rc.1

rc-sample.5: rc-sample.pod
	VS=`$(SHTOOL) version -lc -dshort rc_version.c`; \
	VL=`$(SHTOOL) version -lc -dlong rc_version.c`; \
	$(POD2MAN) --section=5 --center="Run-command processor samples" \
               --release="$$VS" --date="$$VL" \
               rc-sample.pod >rc-sample.5

install: all
	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix)
	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man5
	$(SHTOOL) install -c -m 644 rc.1 $(mandir)/man1/rc.1
	$(SHTOOL) install -c -m 644 rc-sample.5 $(mandir)/man5/rc-sample.5

clean:
	$(RM) $(TARGET) $(OBJS)

distclean: clean
	$(RM) config.log config.status config.cache
	$(RM) Makefile rc_config.h rc_pcre.tab
	$(RM) config.log config.status config.cache
	$(RM) Makefile rc_config.h
	$(RM) libtool

realclean: distclean
	$(RM) ltmain.sh libtool.m4 config.guess config.sub
	$(RM) configure rc_config.h.in
	$(RM) shtool

check: test
test: rc
	@./test.sh

CVSTrac 2.0.1