1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161
|
##
## 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 = @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 ossp -g iselect \
-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##
|