ossp-pkg/iselect/Makefile.in
1.2
##
## Makefile -- iSelect Makefile
##
@SET_MAKE@
# ------------------------------------------------
# DEFINITIONS
# ------------------------------------------------
# compiler tools
CC = @CC@
CFLAGS = @CFLAGS@ -I.
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
debug = @debug@
# installation tools
SHTOOL = @SHTOOL@
NEWVERS = $(SHTOOL) version
INSTALL = $(SHTOOL) install
MKDIR = $(SHTOOL) mkdir
FIXPERM = $(SHTOOL) fixperm
# 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 acconfig.h
rm -f configure
autoconf configure.in >configure
chmod 770 configure
config_ac.h.in: configure.in acconfig.h
rm -f config_ac.h.in
autoheader configure.in >config_ac.h.in
# ------------------------------------------------
# THE RELEASE STUFF
# ------------------------------------------------
_GETDISTINFO = \
_version=`$(NEWVERS) -lc -dshort iselect_version.c`; \
_date=`date '+%y%m%d_%H%M'`
_BUILDDIST = \
echo "Creating tarball..."; \
tar cvf - * |\
tardy --user_number=1000 --user_name=rse \
--group_number=1000 --group_name=en \
--prefix=$${_distname} - |\
gzip >$${_tarball}; \
echo "Done"; \
ls -l $${_tarball}
_NEWVERS = \
$(NEWVERS) -lc -piSelect $$OPT iselect_version.c; \
V=`$(NEWVERS) -lc -dlong iselect_version.c`;\
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;
_UPDATEVERS = \
V=`$(NEWVERS) -lc -dshort iselect_version.c`;\
$(NEWVERS) -lc -piSelect -s $$V iselect_version.c; \
V=`$(NEWVERS) -lc -dlong iselect_version.c`;\
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;
release: distclean fixperm
@$(_GETDISTINFO) \
_distname="iselect-$${_version}"; \
_tarball="/tmp/$${_distname}.tar.gz"; \
echo "Release Distribution: iSelect Version $$_version"; \
$(_BUILDDIST); \
mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz; \
snap: distclean fixperm
@$(_GETDISTINFO) \
_distname="iselect-$${_version}-SNAP-$$_date"; \
_tarball="/tmp/$${_distname}.tar.gz"; \
echo "Snap of whole source tree: iSelect Version $$_version as of $$_date"; \
$(_BUILDDIST); \
mv /tmp/$${_distname}.tar.gz $${_distname}.tar.gz
new-version:
OPT="-iv"; $(_NEWVERS)
new-revision:
OPT="-ir"; $(_NEWVERS)
new-betalevel:
OPT="-ib"; $(_NEWVERS)
new-patchlevel:
OPT="-iP"; $(_NEWVERS)
new-release:
OPT="-s$(R)"; $(_NEWVERS)
update-version:
$(_UPDATEVERS)
fixperm:
$(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=`$(NEWVERS) -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=`$(NEWVERS) -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=`$(NEWVERS) -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
$(MKDIR) $(bindir)
$(MKDIR) $(mandir)/man1
$(INSTALL) -c -m 755 -s iselect $(bindir)/iselect
$(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##