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 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357
|
# Top level Makefile for tin
# - for configuration options read the doc/INSTALL file.
#
# Updated: 1998-02-15
#
PROJECT = tin
EXE = tin
MANEXT = 1
LVER = 1.4
PVER = 981002
VER = pre-$(LVER)-$(PVER)
# directory structure
TOPDIR = .
DOCDIR = ./doc
INCDIR = ./include
OBJDIR = ./src
SRCDIR = ./src
AMGDIR = ./amiga
VMSDIR = ./vms
PCREDIR = ./pcre
TOLDIR = ./tools
OLDDIR = ./old
HFILES = \
$(INCDIR)/bool.h \
$(INCDIR)/bugrep.h \
$(INCDIR)/config.h \
$(INCDIR)/extern.h \
$(INCDIR)/menukeys.h \
$(INCDIR)/nntplib.h \
$(INCDIR)/proto.h \
$(INCDIR)/stpwatch.h \
$(INCDIR)/tcurses.h \
$(INCDIR)/tin.h \
$(INCDIR)/tnntp.h \
$(INCDIR)/trace.h \
$(INCDIR)/version.h \
CFILES = \
$(SRCDIR)/active.c \
$(SRCDIR)/art.c \
$(SRCDIR)/attrib.c \
$(SRCDIR)/auth.c \
$(SRCDIR)/charset.c \
$(SRCDIR)/color.c \
$(SRCDIR)/config.c \
$(SRCDIR)/curses.c \
$(SRCDIR)/debug.c\
$(SRCDIR)/envarg.c \
$(SRCDIR)/feed.c \
$(SRCDIR)/filter.c \
$(SRCDIR)/getline.c \
$(SRCDIR)/group.c \
$(SRCDIR)/hashstr.c \
$(SRCDIR)/header.c \
$(SRCDIR)/help.c\
$(SRCDIR)/inews.c \
$(SRCDIR)/init.c \
$(SRCDIR)/joinpath.c \
$(SRCDIR)/lang.c \
$(SRCDIR)/list.c \
$(SRCDIR)/mail.c \
$(SRCDIR)/main.c \
$(SRCDIR)/makecfg.c \
$(SRCDIR)/memory.c \
$(SRCDIR)/misc.c \
$(SRCDIR)/newsrc.c\
$(SRCDIR)/nntplib.c \
$(SRCDIR)/nrctbl.c \
$(SRCDIR)/open.c \
$(SRCDIR)/page.c \
$(SRCDIR)/parsdate.y \
$(SRCDIR)/pgp.c \
$(SRCDIR)/post.c \
$(SRCDIR)/prompt.c \
$(SRCDIR)/read.c \
$(SRCDIR)/refs.c \
$(SRCDIR)/regex.c \
$(SRCDIR)/rfc1521.c \
$(SRCDIR)/rfc1522.c \
$(SRCDIR)/save.c \
$(SRCDIR)/screen.c \
$(SRCDIR)/search.c \
$(SRCDIR)/select.c \
$(SRCDIR)/sigfile.c \
$(SRCDIR)/signal.c \
$(SRCDIR)/strftime.c \
$(SRCDIR)/string.c \
$(SRCDIR)/tcurses.c \
$(SRCDIR)/thread.c \
$(SRCDIR)/trace.c \
$(SRCDIR)/wildmat.c \
$(SRCDIR)/xref.c
AMIGA = \
$(AMGDIR)/README \
$(AMGDIR)/tin.readme \
$(AMGDIR)/smakefile \
$(AMGDIR)/actived.c \
$(AMGDIR)/amiga.c \
$(AMGDIR)/amigatcp.c \
$(AMGDIR)/amiga.h \
$(AMGDIR)/amigatcp.h
VMS = \
$(VMSDIR)/dir.h \
$(VMSDIR)/filetypes.h \
$(VMSDIR)/getopt.c \
$(VMSDIR)/getopt.h \
$(VMSDIR)/getopt1.c \
$(VMSDIR)/getpass.c \
$(VMSDIR)/isxterm.c \
$(VMSDIR)/libvms.mms \
$(VMSDIR)/ndir.h \
$(VMSDIR)/parsdate.c \
$(VMSDIR)/parse.c \
$(VMSDIR)/parse.h \
$(VMSDIR)/pwd.h \
$(VMSDIR)/qsort.c \
$(VMSDIR)/select.h \
$(VMSDIR)/strings.h \
$(VMSDIR)/uaf.h \
$(VMSDIR)/vms.c \
$(VMSDIR)/vmsdir.c \
$(VMSDIR)/vmsfile.c \
$(VMSDIR)/vmspwd.c \
$(VMSDIR)/vmstimval.h
DOC = \
$(DOCDIR)/CHANGES \
$(DOCDIR)/DEBUG_REFS \
$(DOCDIR)/INSTALL \
$(DOCDIR)/TODO \
$(DOCDIR)/WHATSNEW \
$(DOCDIR)/auth.txt \
$(DOCDIR)/filtering \
$(DOCDIR)/internals.txt \
$(DOCDIR)/iso2asc.txt \
$(DOCDIR)/good-netkeeping-seal \
$(DOCDIR)/umlaute.txt \
$(DOCDIR)/tin.defaults \
$(DOCDIR)/$(EXE).$(MANEXT)
TOL = \
$(TOLDIR)/metamutt \
$(TOLDIR)/tinpp \
$(TOLDIR)/expand_aliases.tgz
TOP = \
$(TOPDIR)/Makefile \
$(TOPDIR)/MANIFEST \
$(TOPDIR)/README \
$(TOPDIR)/README.VMS \
$(TOPDIR)/aclocal.m4 \
$(TOPDIR)/conf-tin \
$(TOPDIR)/config.guess \
$(TOPDIR)/config.sub \
$(TOPDIR)/configure \
$(TOPDIR)/configure.in \
$(TOPDIR)/install.sh \
$(TOPDIR)/makefile.in \
$(TOPDIR)/mkdirs.sh
PCRE = \
$(PCREDIR)/ChangeLog \
$(PCREDIR)/Makefile.in \
$(PCREDIR)/Makefile.orig \
$(PCREDIR)/RunTest \
$(PCREDIR)/README \
$(PCREDIR)/Tech.Notes \
$(PCREDIR)/pgrep.1 \
$(PCREDIR)/pcre.3 \
$(PCREDIR)/pcreposix.3 \
$(PCREDIR)/maketables.c \
$(PCREDIR)/pcre.c \
$(PCREDIR)/pcreposix.c \
$(PCREDIR)/pgrep.c \
$(PCREDIR)/study.c \
$(PCREDIR)/internal.h \
$(PCREDIR)/pcre.h \
$(PCREDIR)/pcreposix.h \
$(PCREDIR)/pcretest.c \
$(PCREDIR)/perltest \
$(PCREDIR)/testinput \
$(PCREDIR)/testinput2 \
$(PCREDIR)/testoutput \
$(PCREDIR)/testoutput2
OLD = \
$(OLDDIR)/msmail.c \
$(OLDDIR)/nntpvms.c \
$(OLDDIR)/nntpw32.c \
$(OLDDIR)/os_2.c \
$(OLDDIR)/win32.c \
$(OLDDIR)/win32tcp.c \
$(OLDDIR)/msmail.h \
$(OLDDIR)/os_2.h \
$(OLDDIR)/win32.h \
$(OLDDIR)/win32tcp.h
MISC = \
$(INCDIR)/autoconf.hin \
$(SRCDIR)/Makefile.in \
$(SRCDIR)/ibm437_l1.tab \
$(SRCDIR)/ibm850_l1.tab \
$(SRCDIR)/l1_ibm437.tab \
$(SRCDIR)/l1_ibm850.tab \
$(SRCDIR)/l1_next.tab \
$(SRCDIR)/next_l1.tab \
$(SRCDIR)/tincfg.tbl \
$(SRCDIR)/descrip.mms \
$(PCREDIR)/pcre.mms
ALL_FILES = $(TOP) $(DOC) $(TOL) $(HFILES) $(CFILES) $(AMIGA) $(VMS) $(PCRE) $(MISC) $(OLD)
ALL_DIRS = $(TOPDIR) $(DOCDIR) $(SRCDIR) $(INCDIR) $(AMGDIR) $(VMSDIR) $(PCREDIR) $(OLDDIR)
# standard commands
CD = cd
CHMOD = chmod
CP = cp -p
ECHO = echo
LS = ls -l
MAKE = make
MV = mv
NROFF = groff -Tascii
RM = rm
SHELL = /bin/sh
TAR = gtar
BZIP2 = bzip2
WC = wc
SED = sed
TR = tr
all:
@$(ECHO) "Top level Makefile for the TIN v$(VER) Usenet newsreader."
@$(ECHO) " "
@$(ECHO) "To compile the source code change to the source directory by"
@$(ECHO) "typing 'cd src' and then type 'make' for more instructions."
@$(ECHO) " "
@$(ECHO) "This Makefile offers the following general purpose options:"
@$(ECHO) " "
@$(ECHO) " make clean [ Delete all object files & backup files ]"
@$(ECHO) " make install [ Install the binary & the manual page ]"
@$(ECHO) " make install_daemon [ Install the index daemon binary ]"
@$(ECHO) " make install_setuid [ Install the binary setuid & the manual page ]"
@$(ECHO) " make manpage [ Create nroff version of manual page ]"
@$(ECHO) " make manifest [ Create MANIFEST ]"
@$(ECHO) " make dist [ Create a gziped distribution tar file ]"
install:
@$(CD) $(SRCDIR) && $(MAKE) install
install_setuid:
@$(CD) $(SRCDIR) && $(MAKE) install_setuid
install_daemon:
@$(CD) $(SRCDIR) && $(MAKE) install_daemon
clean:
@-$(RM) -f *~
@-$(RM) -f $(DOCDIR)/*~
@-$(RM) -f $(INCDIR)/*~
@-$(RM) -f $(SRCDIR)/*~
@-$(RM) -f $(PCREDIR)/*~
@-test -e $(SRCDIR)/Makefile && $(CD) $(SRCDIR) && $(MAKE) clean
man:
@$(MAKE) manpage
manpage:
@$(ECHO) "Creating $(NROFF) man page for $(EXE)$(VER)..."
@$(NROFF) -man $(DOCDIR)/$(EXE).1 > $(DOCDIR)/$(EXE).nrf
# Use 2 passes for creating MANIFEST because its size changes (it's not likely
# that we'll need 3 passes, since that'll happen only when the grand total's
# digits change).
manifest:
@$(ECHO) "Creating MANIFEST..."
@$(ECHO) "MANIFEST for $(PROJECT)-$(VER) (`date`)" > MANIFEST.tmp
@$(ECHO) "----------------------------------------------------" >> MANIFEST.tmp
@$(CP) MANIFEST.tmp MANIFEST
@$(WC) -c $(ALL_FILES) >> MANIFEST
@$(WC) -c $(ALL_FILES) >> MANIFEST.tmp
@$(MV) MANIFEST.tmp MANIFEST
chmod:
@$(ECHO) "Setting the file permissions..."
@$(CHMOD) 644 $(ALL_FILES)
@$(CHMOD) 755 $(ALL_DIRS)
@$(CHMOD) 755 ./conf-tin ./config.guess ./config.sub ./configure ./install.sh ./mkdirs.sh
@$(CHMOD) 755 $(TOLDIR)/tinpp $(TOLDIR)/metamutt $(PCREDIR)/perltest
tar:
@$(ECHO) "Generating gzipped tar file..."
@-$(RM) $(PROJECT)$(VER).tgz > /dev/null 2>&1
@$(TAR) cvzf $(PROJECT)$(VER).tgz -C ../ \
`$(ECHO) $(ALL_FILES) \
| $(TR) -s '[[:space:]]' "[\012*]" \
| $(SED) 's,^\./,$(PROJECT)-$(PVER)/,' \
| $(TR) "[\012]" " "`
@$(CHMOD) 644 $(PROJECT)$(VER).tgz
@$(LS) $(PROJECT)$(VER).tgz
bzip2:
@$(ECHO) "Generating bzipped tar file..."
@-$(RM) $(PROJECT)$(VER).tgz > /dev/null 2>&1
@$(TAR) cvf $(PROJECT)$(VER).tar -C ../ \
`$(ECHO) $(ALL_FILES) \
| $(TR) -s '[[:space:]]' "[\012*]" \
| $(SED) 's,^\./,$(PROJECT)-$(PVER)/,' \
| $(TR) "[\012]" " "`
@$(BZIP2) $(PROJECT)$(VER).tar
@$(CHMOD) 644 $(PROJECT)$(VER).tar.bz2
@$(LS) $(PROJECT)$(VER).tar.bz2
#
# I know it's ugly, but it works
#
name:
@DATE=`date +%y%m%d`; if test `pwd | cut -d '-' -f 2` != $$DATE ; then \
$(MV) ../`basename \`pwd\`` ../tin-$$DATE ; \
$(SED) "s,^PVER[[:space:]]*=[[:print:]]*,PVER = $$DATE," ./Makefile > ./Makefile.tmp \
&& $(MV) ./Makefile.tmp ./Makefile ; \
$(SED) "s,RELEASEDATE[[:space:]]*\"[[:print:]]*\",RELEASEDATE \"$$DATE\"," $(INCDIR)/version.h > $(INCDIR)/version.h.tmp \
&& $(MV) $(INCDIR)/version.h.tmp $(INCDIR)/version.h ; \
$(SED) "s,^PVER[[:space:]]*=[[:print:]]*,PVER = $$DATE," ./makefile.in > ./makefile.in.tmp \
&& $(MV) ./makefile.in.tmp ./makefile.in ; \
fi
dist:
@$(MAKE) name
@$(MAKE) configure
@$(MAKE) manifest
@$(MAKE) chmod
@$(MAKE) tar
version :
@$(ECHO) "TIN $(VER)"
distclean:
@-$(MAKE) clean
@-$(RM) -f config.cache config.log config.status
@-$(RM) -f $(INCDIR)/autoconf.h
@-$(RM) -f $(PCREDIR)/maketables $(PCREDIR)/chartables.c
@-$(RM) -f $(PCREDIR)/Makefile
@-$(RM) -f $(SRCDIR)/Makefile
@-$(RM) -f td-conf.out
@-$(RM) -f makefile
configure: configure.in aclocal.m4
autoconf
config.status: configure
./config.status --recheck
|