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 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
|
##
## Makefile -- iSelect Makefile
##
@SET_MAKE@
# ------------------------------------------------
# DEFINITIONS
# ------------------------------------------------
# compiler tools
CC = @CC@
CFLAGS = @CFLAGS@ -I.
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
debug = @debug@
# installation tools
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
MKDIR = ./etc/mkinstalldirs
# 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=`./etc/newvers -lc -d 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 = \
./etc/newvers -lc -p iSelect $$OPT iselect_version.c; \
V=`./etc/newvers -lc -D 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=`./etc/newvers -lc -d iselect_version.c`;\
./etc/newvers -lc -p iSelect -r $$V iselect_version.c; \
V=`./etc/newvers -lc -D 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=-r$(R); $(_NEWVERS)
update-version:
$(_UPDATEVERS)
fixperm:
./etc/fixperm *
# ------------------------------------------------
# THE PROGRAM
# ------------------------------------------------
iselect: iselect_main.o iselect_browse.o iselect_getopt.o iselect_version.o iselect_help.o iselect_readme.o
$(CC) $(LDFLAGS) -o iselect iselect_main.o iselect_browse.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_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=`./etc/newvers -l c -D 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=`./etc/newvers -l c -D iselect_version.c`; \
./etc/asc2c iselect_readme.txt iselect_readme iSelect_README "$$V"
# ------------------------------------------------
# THE DOCUMENTATION
# ------------------------------------------------
iselect.1: iselect.pod iselect_version.c
V=`./etc/newvers -l c -D 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)
$(MKDIR) $(mandir)/man1
$(INSTALL_PROGRAM) iselect $(bindir)/iselect
$(INSTALL_DATA) iselect.1 $(mandir)/man1/iselect.1
# ------------------------------------------------
# CLEANUP
# ------------------------------------------------
clean:
-rm -f *.o
-rm -f iselect
-rm -f core *.core
distclean:
-@make clean
-rm -f config_ac.h config_sc.h
-rm -f config.status config.cache config.log
-rm -f Makefile
##EOF##
|