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 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600
|
#=======================================================================
# UNIX version of Makefile for Fortran program checker ftnchek version 2.9
#
# Current target list:
# TAGS
# all build ftnchek and its documentation files
# blurb.txt
# check run validation test suite
# clean remove unnecessary intermediate files
# clobber make clean, and remove ftnchek executable
# dcl2inc.doc ASCII form of documentation
# dcl2inc.ps PostScript form of documentation
# dcl2inc Shell script to convert decls to includes
# distclean remove everything not in the distribution
# docs documentation files
# fortran.c translate yacc code to C
# ftnchek ftnchek executable program
# ftnchek.1 UNIX manual page document
# ftnchek.doc ASCII form of documentation
# ftnchek.hlp VAX/VMS HELP library source
# htmldocs hypertext form of documentation
# ftnchek.ps PostScript form of documentation
# install install ftnchek and dcl2inc and their man pages
# install-exe install ftnchek and dcl2inc executables
# install-man install only man pages
# install-man-sgi install only man pages on SGI systems
# install-lisp install only ftnchek.el
# lint run lint on source code
# mostlyclean same as clean
# prog same as ftnchek
# realclean same as clobber
# spotless make distclean, then remove formatted
# documentation (do NOT do this if you don't
# have groff or nroff/troff to recreate the
# documentation!)
# maintainer-clean distclean, then things maintainer can rebuild
# TAGS emacs editor tags file
# tags ex and vi editor tags file
# uninstall undo an ftnchek installation
# tar distribution tar file
#
# Object file targets:
# ftnchek.o
# exprtype.o
# forlex.o
# fortran.o
# pgsymtab.o
# plsymtab.o
# project.o
# symtab.o
#
#
#
# Copyright (c) 1999 by Robert K. Moniot.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# ROBERT K. MONIOT OR FORDHAM UNIVERSITY BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of ftnchek shall not be used
# in advertising or otherwise to promote the sale, use or other dealings in
# this Software without prior written authorization from the author.
#
#
# Acknowledgements and thanks to Nelson H. F. Beebe of the University
# of Utah for improvements to this Makefile.
# [25-Apr-1994]
#=======================================================================
# These definitions should be customized for your local conventions
# if you want to do "make install" or "make uninstall".
# prefix is the root of the destination for installing things.
# bindir is directory for executables, mandir for man pages.
# manext is the extension on man pages, including the dot.
# libdir is the directory for library files (dcl2inc.awk). It must
# agree with the libdir defined in dcl2inc as made by configure.
# lispdir is where to put ftnchek.el. filterdir is where to put ftnpp.
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
mandir = ${prefix}/man
manext = .1
sgimansubdir = /manl
libdir = ${exec_prefix}/lib/ftnchek
lispdir = ${prefix}/lib/emacs/site-lisp
filterdir = ${bindir}
# Define suffix for executables, for non-unix systems which have one.
EXE =
#EXE = .exe
# Define suffix for scripts, to go on the end of dcl2inc script.
CMD =
#CMD = .cmd
#CMD = .bat
# The following definitions are set for your system by configure
CC = cc
HAS_NROFF = true
MANtoPS = ./man2ps
MANtoHTML = rman -f HTML
NAWK = gawk
NROFF = nroff
STRIP = strip
YACC = bison -y
ZIP = zip
# The following is only used for targets ftnchek.doc and ftnchek.hlp
# which are not needed for unix platforms. It removes control chars
# and converts tabs to blanks. Normally COL=col -bx but if you don't
# have it, can make do with cat.
COL = col -bx
# Editor tags file support
CTAGS = ctags
CTAGSFLAGS = -t
ETAGS = etags
# The following suffixes are for making various forms of documentation
.SUFFIXES: .cat .catman .doc .man .ps
# These system utilities should be standard on all UNIX systems
CHMOD = chmod
CMP = cmp
CP = cp
DIFF = diff
EQN = eqn
GREP = grep
MKDIR = mkdir
MV = mv
PATCH = patch
PWD_PROG = pwd
RM = rm -f
RMDIR = rmdir
SED = sed
SHELL = sh
SOELIM = soelim
TBL = tbl
TAR = tar
# Pack is needed only for install-man-sgi target
PACK = pack
FTNCHEK = ./ftnchek$(EXE)
# The ftnpp filter can be built only on systems that support pipe
# and fork system calls. By default, it is not built.
# If ftnpp is built, it will be installed in filterdir.
FILTER_PROG = ftnpp$(EXE)
# OPTIONS is used to define various characteristics. Most commonly
# needed ones are given below; uncomment whichever you like.
# See ftnchek.h for others, with their defaults and explanations.
# OPTIONS shouldn't include things controlled by "configure".
# To include your own options without touching the Makefile, say
# make "OPTIONS= <your-list-of-options>"
# If you want -f77=all to be the default, uncomment this.
#OPTIONS = -DSTRICT_SYNTAX
# CFLAGS is used to define the operating system and options
# LDFLAGS gives linker options
# YFLAGS specifies yacc options
CFLAGS = -DUNIX -O $(OPTIONS)
LDFLAGS =
YFLAGS = -d
# fortran.o first because of possible remake if tokdefs.h changes (see below)
OBJS = fortran.o exprtype.o forlex.o ftnchek.o \
pgsymtab.o plsymtab.o project.o symtab.o
DOCS = README INSTALL LICENSE PATCHES FAQ project.magic \
average.f average.out correct.f \
blurb.txt dcl2inc.doc dcl2inc.man dcl2inc.ps \
ftnchek.doc ftnchek.hlp ftnchek.man ftnchek.ps html \
ftnpp.doc ftnpp.man ftnpp.ps \
macro-doc.txt project-doc.tex
UNIX_BUILDFILES = Makefile.in configure configure.in config.guess config.sub \
config.h.in configure.generic install-sh \
makefile.unix \
add_html_refs.sh make_html.sh \
VMS_BUILDFILES = build-alpha.com build.com cc.com \
link-alpha.com link.com
OS2_BUILDFILES = ftnchek.def makefile.os2 configure_os2.cmd
OTHER_BUILDFILES= makefile.bc makefile.djgpp \
makefile.generic makefile.mpw \
ftnchek210.dsp ftnchek210.dsw
BUILDFILES = $(UNIX_BUILDFILES) $(VMS_BUILDFILES) $(OS2_BUILDFILES) \
$(OTHER_BUILDFILES)
SRCS = exprtype.c forlex.c fortran.y fortran.c ftnchek.c \
config.h ftnchek.h intrins.h iokeywds.h keywords.h \
pgsymtab.c plsymtab.c project.c \
symtab.c symtab.h tokdefs.h
SCRIPTS = dcl2inc dcl2inc.awk dcl2inc.in man2ps ftnchek.el
TESTDIR = test
HTMLDIR = html
# The following defines all files to go into distribution tar file
DISTFILES = $(DOCS) $(BUILDFILES) $(SRCS) ftnpp.c $(SCRIPTS) $(TESTDIR)
# The following defines all files to go into MS-DOS distribution zip file
ZIPFILES = $(DISTFILES)
# The following defines all files that go into the auxiliary catman tar file
CATMAN = dcl2inc.catman ftnchek.catman ftnpp.catman
#=======================================================================
# N.B. dcl2inc is also a prog but it is made by configure. A generic
# copy of it is provided with the distribution also, in case the user
# doesn't want to or can't use configure.
prog: ftnchek$(EXE)
all: prog $(FILTER_PROG)
check:
cd $(TESTDIR); $(MAKE) NAWK="$(NAWK)" -s precheck
cd $(TESTDIR); $(MAKE) NAWK="$(NAWK)" -i -s check
lint:
lint $(LINTFLAGS) $(OBJS:.o=.c) -lm
# Remove intermediate files that are not required after the program is
# built.
clean mostlyclean:
-$(RM) *.o
-$(RM) \#*
-$(RM) a.out
-$(RM) *~
-$(RM) core
-$(RM) y.tab.h
-$(RM) config.status config.log config.cache
-$(RM) ftnchek.html.orig ftnchek.html.rej
# Remove almost everything that make can rebuild. We do not remove
# fortran.c since some places don't have yacc or bison.
clobber realclean: clean
-$(RM) ftnchek$(EXE) ftnpp
# Remove everything that make can rebuild, preparatory to making a
# distribution version. We intentionally do NOT remove .ps and .doc
# files, because some UNIX systems lack nroff/troff/groff.
distclean: realclean testclean htmlclean
-$(RM) *.dcl
-$(RM) cscope.out
-$(RM) tags
-$(RM) TAGS
-$(RM) ftnchek$(manext)
-$(RM) dcl2inc.cat ftnchek.cat ftnpp.cat
testclean:
cd $(TESTDIR); $(MAKE) distclean
htmlclean:
cd $(HTMLDIR); $(MAKE) -f ../Makefile clean
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
-$(RM) Makefile
-$(RM) configure
-$(RM) fortran.c
-$(RM) *.catman
ftnchek$(EXE): $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o ftnchek$(EXE) $(OBJS) -lm
# N.B. tokdefs.h is copy of y.tab.h used to avoid remaking stuff when
# grammar changes but not tokens.
# The following copies y.tab.h to tokdefs.h if changed, then aborts make,
# since dependencies may have changed.
fortran.c: fortran.y
$(YACC) $(YFLAGS) fortran.y
$(MV) y.tab.c fortran.c
@if $(CMP) -s y.tab.h tokdefs.h ; then true ; else \
echo; echo tokdefs.h changed -- repeat make ; \
$(CP) y.tab.h tokdefs.h; \
false ; \
fi
# Documentation targets: If you make changes to the documentation,
# you should edit only ftnchek.man and then re-make these targets.
# If ftnchek.1 fails to make, ftnchek.man is usable directly (after
# applying soelim) except that some troff-like processors may not
# give satisfactory results.
docs: average.out blurb.txt ftnchek.doc ftnchek.hlp \
htmldocs ftnchek.ps dcl2inc.doc dcl2inc.ps ftnpp.doc ftnpp.ps
# Following sed script trims out the if-else machinery contained in
# ftnchek.man to produce a clean nroff document. The lines of the
# sed script correspond to the following actions:
# 1. remove text between lines of form ``.if \nh \{'' or .ie \nh \{''
# and lines of form ``\}'' (these are the help-related additions)
# 2. remove lines of form ``.if !\nh \{'' (these preface man text)
# Also remove ``.if !\nb \{'' which are for blurb.
# 3. remove lines of form ``.el \{'' (start of the else sections of
# the .if's of step 1)
# 4. remove lines of form ``\}'' (closures of step 3 lines)
# 5. remove lines of form ``.ie \nh text'' (one-liner help text)
# 6. change lines of form ``.el \nh text'' to ``text'' (these are
# one-liner man text)
# 7. change lines of form ``.if !\nh text'' to ``text'' (ditto)
ftnchek$(manext): ftnchek.man average.f average.out correct.f
$(SOELIM) ftnchek.man | \
$(SED) -e '/^\.i[fe] \\nh \\{/,/^\\}$$/d' \
-e '/^\.if !\\n[bh] \\{/d' \
-e '/^\.el \\{/d' \
-e '/^\\}/d' \
-e '/^\.i[fe] \\nh /d' \
-e 's/^\.el *\(.*\)$$/\1/' \
-e 's/^\.if !\\nh *\(.*\)$$/\1/' \
> ftnchek$(manext)
# .doc files are ascii text form of documentation.
.man.doc:
$(NROFF) -man $< | $(COL) > $@
# ftnchek.ps is PostScript form of documentation. For ftnchek.ps we use
# cleaner ftnchek.1 rather than ftnchek.man.
ftnchek.ps: ftnchek$(manext)
$(TBL) <ftnchek$(manext) | $(EQN) | $(MANtoPS) >ftnchek.ps
# Other man files are clean enough as they are.
.man.ps:
$(TBL) < $< | $(EQN) | $(MANtoPS) > $@
# $(HTMLDIR)/toc.html represents all the files in the html directory. They
# are built from ftnchek.html by the script make_html.sh whenever
# ftnchek.html changes. Note: edits should be done to ftnchek.man if
# they affect content, to ftnchek.html if they affect html form. Do
# not edit anything in html directory.
htmldocs: $(HTMLDIR)/toc.html
$(HTMLDIR)/toc.html: ftnchek.html
./make_html.sh ftnchek.html
# ftnchek.html is produced from ftnchek.1 by MANtoHTML followed by a
# simple script to add internal links to option descriptions, then
# lightly edited. Edits were initially by hand, now are saved in
# ftnchek.html.patch (not distributed) to be re-applied each time.
# Any time new edits are done to ftnchek.html, the patch file should
# be remade. Also make ftnchek.html.patch after editing ftnchek.man,
# so that the patch offsets don't get too large for patch to succeed.
ftnchek.html: ftnchek.html.orig
$(CP) ftnchek.html.orig ftnchek.html
if test -f ftnchek.html.patch ; \
then \
$(PATCH) < ftnchek.html.patch ; \
fi
ftnchek.html.orig: ftnchek$(manext)
$(MANtoHTML) ftnchek$(manext) | ./add_html_refs.sh > ftnchek.html.orig
ftnchek.html.patch: ftnchek.html.orig ftnchek.html
@echo "It is normal for the next command to report an error"
-$(DIFF) -c ftnchek.html.orig ftnchek.html > ftnchek.html.patch
# blurb.txt is an ascii file for informational mailings.
blurb.txt: ftnchek.man
$(NROFF) -man -rb1 ftnchek.man | $(COL) >blurb.txt
# ftnchek.hlp is a VMS HELP library source document:
# create ftnchek.hlb with $ LIBR/CREATE/HELP FTNCHEK.HLB FTNCHEK.HLP
# The leading and trailing newlines in ftnchek.hlp should be removed.
ftnchek.hlp: ftnchek.man
$(SED) -e '1d' ftnchek.man | \
$(NROFF) -man -rh1 | $(COL) | \
$(SED) -e 's/^-\([a-zA-Z][a-zA-Z]*\)/\/\1/' \
-e 's/\([^a-zA-Z]\)-\([a-zA-Z][a-zA-Z]*\)/\1\/\2/g' \
>ftnchek.hlp
# Rebuild average.out when version changes. (We don't put the
# dependency on ftnchek to avoid building ftnchek just for docs.)
average.out: ftnchek.h
$(FTNCHEK) -list -symtab average > average.out
# Install program and documentation on system. Obsolete fcl2vcg script
# & doc is removed if present.
install: install-exe install-man install-lisp
install-exe: ftnchek$(EXE) dcl2inc$(CMD)
$(CP) ftnchek $(bindir)
-$(STRIP) $(bindir)/ftnchek$(EXE)
$(CHMOD) 755 $(bindir)/ftnchek$(EXE)
-$(MKDIR) $(libdir)
$(CP) dcl2inc.awk $(libdir)/dcl2inc.awk
$(CHMOD) 644 $(libdir)/dcl2inc.awk
$(CP) dcl2inc$(CMD) $(bindir)/dcl2inc$(CMD)
$(CHMOD) 755 $(bindir)/dcl2inc$(CMD)
-$(RM) $(bindir)/fcl2vcg
if test -x $(FILTER_PROG) ; \
then \
$(CP) $(FILTER_PROG) $(filterdir) ; \
$(CHMOD) 755 $(filterdir)/$(FILTER_PROG) ; \
fi
# Install man pages, taking care to remove old formatted ones, because
# many man implentations fail to compare time stamps of raw and
# formatted files, and will show out-of-date formatted files.
install-man: ftnchek$(manext)
$(CP) dcl2inc.man $(mandir)/man1/dcl2inc$(manext)
-$(RM) $(mandir)/cat1/dcl2inc$(manext)
$(CHMOD) 644 $(mandir)/man1/dcl2inc$(manext)
$(CP) ftnchek$(manext) $(mandir)/man1/ftnchek$(manext)
-$(RM) $(mandir)/cat1/ftnchek$(manext)
$(CHMOD) 644 $(mandir)/man1/ftnchek$(manext)
-$(RM) $(mandir)/man1/fcl2vcg$(manext)
-$(RM) $(mandir)/cat1/fcl2vcg$(manext)
if test -x $(FILTER_PROG) ; \
then \
$(CP) ftnpp.man $(mandir)/man1/ftnpp$(manext) ; \
$(CHMOD) 644 $(mandir)/man1/ftnpp$(manext) ; \
fi
# IRIX uses pre-formatted, packed man pages and nroff is not bundled with it.
install-man-sgi: catman
if $(PACK) dcl2inc.cat ; \
then \
$(MV) dcl2inc.cat.z $(mandir)$(sgimansubdir)/dcl2inc.z ; \
$(CHMOD) 644 $(mandir)$(sgimansubdir)/dcl2inc.z ; \
fi
if $(PACK) ftnchek.cat ; \
then \
$(MV) ftnchek.cat.z $(mandir)$(sgimansubdir)/ftnchek.z ; \
$(CHMOD) 644 $(mandir)$(sgimansubdir)/ftnchek.z ; \
fi
if test -x $(FILTER_PROG) && $(PACK) ftnpp.cat ; \
then \
$(MV) ftnpp.cat.z $(mandir)$(sgimansubdir)/ftnpp.z ; \
$(CHMOD) 644 $(mandir)$(sgimansubdir)/ftnpp.z ; \
fi
-$(RM) $(mandir)/fcl2vcg.z
# The catman target makes formatted ("cat") versions of the manpages
# for use in install-man-sgi. These files are not in the standard
# distribution but are available separately (with suffix catman) for
# sites that do not have nroff. If this Unix does not have nroff,
# then if user has obtained the catman versions, use them. Otherwise
# inform them and use the flat ascii files as fallback.
catman: dcl2inc.cat ftnchek.cat ftnpp.cat
.man.cat:
@if $(HAS_NROFF) ; then \
echo '$(TBL) $< | $(NROFF) -man > $@' ; \
$(TBL) $< | $(NROFF) -man > $@ ; \
else \
if test -f $*.catman ; then \
echo cp $*.catman $@ ; \
cp $*.catman $@ ; \
else \
echo "--> No catman documentation found -- see INSTALL." ; \
echo "Using plain text documentation instead." ; \
echo cp $*.doc $@ ; \
cp $*.doc $@ ; \
fi ; \
fi
# The emacs lisp file will be installed only if lispdir exists.
install-lisp:
@if test -d "$(lispdir)" ; \
then \
echo $(CP) ftnchek.el $(lispdir)/ftnchek.el ; \
if $(CP) ftnchek.el $(lispdir)/ftnchek.el ; \
then \
echo "If desired, use emacs to byte-compile $(lispdir)/ftnchek.el"; \
fi \
fi
# Remove everything that the install target installed.
uninstall:
-$(RM) $(bindir)/dcl2inc$(CMD)
-$(RM) $(bindir)/ftnchek$(CMD)
-$(RM) $(libdir)/dcl2inc.awk
-$(RM) $(filterdir)/$(FILTER_PROG)
-$(RM) $(mandir)/cat1/dcl2inc$(manext)
-$(RM) $(mandir)/cat1/ftnchek$(manext)
-$(RM) $(mandir)/cat1/ftnpp$(manext)
-$(RM) $(mandir)/dcl2inc.z $(mandir)/ftnchek.z $(mandir)/ftnpp.z # SGI
-$(RM) $(mandir)/man1/dcl2inc$(manext)
-$(RM) $(mandir)/man1/ftnchek$(manext)
-$(RM) $(lispdir)/ftnchek.el
-$(RMDIR) $(libdir)
# WARNING: do NOT execute this target, unless you have nroff/troff or groff
# to recreate the formatted documentation files.
spotless: distclean
$(RM) blurb.txt
$(RM) dcl2inc.doc ftnchek.doc ftnpp.doc
$(RM) dcl2inc.ps ftnchek.ps ftnpp.ps
$(RM) ftnchek.hlp
# ex and vi editor tags file
tags: $(SRCS)
$(CTAGS) $(CTAGSFLAGS) *.[chy]
# emacs editor tags file
TAGS: $(SRCS)
$(ETAGS) *.[chy]
#=======================================================================
# Object file dependencies on include files
ftnchek.o: config.h ftnchek.h
exprtype.o: config.h ftnchek.h symtab.h tokdefs.h
forlex.o: config.h ftnchek.h keywords.h symtab.h tokdefs.h
fortran.o: config.h ftnchek.h symtab.h fortran.c
pgsymtab.o: config.h ftnchek.h symtab.h
plsymtab.o: config.h ftnchek.h symtab.h
project.o: config.h ftnchek.h symtab.h
symtab.o: config.h ftnchek.h iokeywds.h intrins.h symtab.h tokdefs.h
ftnpp.o: config.h ftnchek.h
#=======================================================================
# The configure.generic script creates makefile.generic and config.h for
# users on deficient Unix systems or using GNU software on non-Unix
# platforms. It tries to put reasonably generic values in for all the
# things that the configure script is supposed to handle. Pathnames
# are removed since these may vary wildly. The rule also checks for
# any unsubstituted items indicating configure.generic needs to be
# updated. The config.h produced here will normally be overwritten
# when real configure script is run.
generic-config:
./configure.generic
@if $(GREP) \
'@[^*@]*@' makefile.generic config.h ; \
then \
echo "Fix configure.generic to substitute the above." ; \
fi
#=======================================================================
# Making the distribution tar file. Dirname is name of current
# directory. Makefile is not distributed because it is supposed
# to be created by local configure. Files to archive are explicitly
# named so that detritus from development will not be accidentally
# included. However, test files are not listed separately so one
# should make clean in $(TESTDIR)/ first.
#
# This target assumes GNU tar for the --exclude option. If you don't
# have it, remove test/Makefile manually and use ``make tar TAR_EXCLUDE=''
TAR_EXCLUDE = --exclude $$dirname/$(TESTDIR)/Makefile
tar:
dirname=`$(PWD_PROG)|$(SED) 's%.*/%%'` ; cd .. ; \
$(TAR) -cf $$dirname.tar $(TAR_EXCLUDE) \
`echo " "$(DISTFILES) | sed "s% % $$dirname/%g"`
# This target is for maintainer: generates the catman tar file for separate
# distribution.
catman.tar: $(CATMAN)
dirname=`$(PWD_PROG)|$(SED) 's%.*/%%'` ; \
$(TAR) -cf ../$$dirname.catman.tar $(CATMAN)
.cat.catman:
$(CP) $< $@
# Make a distribution zipfile for MS-DOS/Windows/OS2. The -l changes \n
# to \r\n. But configure_os2.cmd already has \r\n sequences in it.
# Note that unlike tar, zip file unpacks into current directory.
zip:
dirname=`$(PWD_PROG)|$(SED) -e 's%.*/%%' -e 's/\./_/g'` ; \
$(RM) ../$$dirname.zip ; \
$(ZIP) -lr ../$$dirname.zip $(ZIPFILES) ; \
$(ZIP) ../$$dirname.zip configure_os2.cmd
# Targets that should be freshened prior to making tar (so I don't put
# stale ones into the distribution).
pretar: docs generic-config distclean
|