ossp-pkg/rc/Makefile.in
##
## OSSP rc - Run-Command Processor
## Copyright (c) 2002-2003 Ralf S. Engelschall
## Copyright (c) 2002-2003 Cable & Wireless Deutschland GmbH
## Copyright (c) 2002-2003 The OSSP Project <http://www.ossp.org/>
##
## This file is part of OSSP rc, a portable run-command processor
## which can be found at http://www.ossp.org/pkg/lib/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
STRIP = strip
CHMOD = chmod
RMDIR = rmdir
SHTOOL = ./shtool
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_error.c rc_list.c rc_script.c rc_file.c rc_sect.c rc_config.c \
rc_filopt.c rc_cliopt.c rc_proc.c rc_version.c rc_pcre.c rc_util.c
OBJS = rc.o rc_error.o rc_list.o rc_script.o rc_file.o rc_sect.o rc_config.o \
rc_filopt.o rc_cliopt.o rc_proc.o rc_version.o rc_pcre.o rc_util.o
SUBDIRS = @SUBDIR_EX@ @SUBDIR_POPT@
#SUBDIRS = @SUBDIR_EX@ @SUBDIR_VAR@ @SUBDIR_VAL@ @SUBDIR_STR@ @SUBDIR_POPT@
.SUFFIXES:
.SUFFIXES: .c .cc .cpp .o
.c.o:
$(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.o: 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 $@ $(OBJS) $(LIBS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
$(CHMOD) 755 rc_test.sh > /dev/null 2>&1
rc.1: rc.pod
VS=`$(SHTOOL) version -lc -dshort rc_version.c`; \
VL=`$(SHTOOL) version -lc -dlong rc_version.c`; \
$(POD2MAN) --section=1 --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:
$(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 -s -c -m 755 rc $(DESTDIR)$(bindir)/rc
$(SHTOOL) install -c -m 644 rc.1 $(DESTDIR)$(mandir)/man1/rc.1
$(SHTOOL) install -c -m 644 rc-sample.5 $(DESTDIR)$(mandir)/man5/rc-sample.5
uninstall:
$(RM) $(DESTDIR)$(bindir)/rc
$(RM) $(DESTDIR)$(mandir)/man1/rc.1
$(RM) $(DESTDIR)$(mandir)/man5/rc-sample.5
clean:
$(RM) $(TARGET) $(OBJS) $(PROG_NAME).core rc_pcre.tab
distclean: clean
$(RM) config.log config.status config.cache # Generated by ./configure
$(RM) Makefile ac_config.h # Generated by ./configure
realclean: distclean
$(RM) configure ac_config.h.in # Generated by Autoconf
$(RM) shtool
check: test
test: $(PROG_NAME)
./rc_test.sh
.PHONY: install uninstall clean distclean realclean check test