OSSP CVS Repository

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

ossp-pkg/iselect/Makefile.in 1.3
##
##  Makefile -- iSelect Makefile
##
@SET_MAKE@

# ------------------------------------------------
#   DEFINITIONS
# ------------------------------------------------

#   compiler tools
CC      = @CC@
CFLAGS  = @CFLAGS@ -I.
LDFLAGS = @LDFLAGS@
LIBS    = @LIBS@
debug   = @debug@

#   installation tools
SHTOOL  = @SHTOOL@

#   installation paths
prefix          = @prefix@
exec_prefix     = @exec_prefix@
bindir          = @bindir@
mandir          = ${exec_prefix}/man

# ------------------------------------------------
#   THE DEFAULT TARGETS
# ------------------------------------------------

all: config iselect iselect.1

# ------------------------------------------------
#   THE CONFIGURATION SUPPORT
# ------------------------------------------------

config: configure config_ac.h.in

configure: configure.in aclocal.m4
	rm -f configure
	autoconf configure.in >configure
	chmod 770 configure

config_ac.h.in: configure.in
	rm -f config_ac.h.in
	autoheader configure.in >config_ac.h.in

# ------------------------------------------------
#   THE RELEASE STUFF
# ------------------------------------------------

_VERSION_FILE = \
	iselect_version.c

_VERSION = \
	echo "updating package version"; \
	$(SHTOOL) version -lc -n 'iSelect' -p iselect_ $$OPT $(_VERSION_FILE); \
	V=`$(SHTOOL) version -lc -dlong $(_VERSION_FILE)`; \
	sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README; \
	sed -e "s/Version .*(.*)/Version $$V/g" <iselect_readme.txt >iselect_readme.txt.n && mv iselect_readme.txt.n iselect_readme.txt

_TARBALL = \
	$(SHTOOL) tarball -o $${NAME}.tar.gz -d $${NAME} -u rse -g en \
	                  -e 'CVS,\.cvsignore,\.configure,\.\#.*,\.[ao]$$' -c 'gzip --best' .

dist: distclean fixperm
	@V=`$(SHTOOL) version -l c -d short $(_VERSION_FILE)`; NAME="iselect-$$V"; \
	$(ECHO) "Rolling RELEASE tarball $$NAME.tar.gz"; $(_TARBALL)
snap: distclean fixperm
	@V=`$(SHTOOL) version -l c -d short $(_VERSION_FILE)`; NAME="iselect-$$V-SNAP"; \
	$(ECHO) "Rolling SNAPSHOT tarball $$NAME.tar.gz"; $(_TARBALL)

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)

fixperm:
	$(SHTOOL) fixperm *

# ------------------------------------------------
#   THE PROGRAM
# ------------------------------------------------

iselect: iselect_main.o iselect_browse.o iselect_keys.o iselect_getopt.o iselect_version.o iselect_help.o iselect_readme.o
	$(CC) $(LDFLAGS) -o iselect iselect_main.o iselect_browse.o iselect_keys.o iselect_getopt.o iselect_version.o iselect_help.o iselect_readme.o @LIBS@

iselect_main.o: iselect_main.c
	$(CC) $(CFLAGS) -o iselect_main.o -c iselect_main.c

iselect_browse.o: iselect_browse.c
	$(CC) $(CFLAGS) -o iselect_browse.o -c iselect_browse.c

iselect_keys.o: iselect_keys.c
	$(CC) $(CFLAGS) -o iselect_keys.o -c iselect_keys.c

iselect_getopt.o: iselect_getopt.c
	$(CC) $(CFLAGS) -o iselect_getopt.o -c iselect_getopt.c

iselect_version.o: iselect_version.c
	$(CC) $(CFLAGS) -o iselect_version.o -c iselect_version.c

iselect_help.o: iselect_help.c
	$(CC) $(CFLAGS) -o iselect_help.o -c iselect_help.c

iselect_help.c: iselect_help.txt iselect_version.c
	V=`$(SHTOOL) version -l c -d long iselect_version.c`; \
	./etc/asc2c iselect_help.txt iselect_help iSelect_Help "$$V"

iselect_readme.o: iselect_readme.c
	$(CC) $(CFLAGS) -o iselect_readme.o -c iselect_readme.c

iselect_readme.c: iselect_readme.txt iselect_version.c
	V=`$(SHTOOL) version -l c -d long iselect_version.c`; \
	./etc/asc2c iselect_readme.txt iselect_readme iSelect_README "$$V"

# ------------------------------------------------
#   THE DOCUMENTATION
# ------------------------------------------------

iselect.1: iselect.pod iselect_version.c
	V=`$(SHTOOL) version -l c -d long iselect_version.c`; \
	sed -e "s|\@V\@|$$V|g" \
		<iselect.pod >/tmp/iselect.pod; \
	pod2man --section=1 \
	        --center="Ralf S. Engelschall" \
			--release="EN" \
			/tmp/iselect.pod >iselect.1 && \
	rm -f /tmp/iselect.pod

# ------------------------------------------------
#   INSTALLATION
# ------------------------------------------------

install: all
	$(SHTOOL) mkdir -f -p -m 755 $(bindir)
	$(SHTOOL) mkdir -f -p -m 755 $(mandir)/man1
	$(SHTOOL) install -c -m 755 -s iselect $(bindir)/iselect
	$(SHTOOL) install -c -m 644 iselect.1 $(mandir)/man1/iselect.1

# ------------------------------------------------
#   CLEANUP
# ------------------------------------------------

clean: 
	-rm -f *.o
	-rm -f iselect
	-rm -f core *.core

distclean: clean
	-rm -f config_ac.h config_sc.h
	-rm -f config.status config.cache config.log
	-rm -f Makefile

##EOF##

CVSTrac 2.0.1