Commit 449b4b19 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

replaced shell script incdep

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.
added documentation


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 3364
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 881f7356
......@@ -2,7 +2,7 @@
# ----------------------------------------------------------------------------
# $Id$
#
# Copyright (c) 2007 by Thomas Forbriger (BFO Schiltach)
# Copyright (c) 2007, 2010 by Thomas Forbriger (BFO Schiltach)
#
# refract Makefile
#
......@@ -26,23 +26,19 @@
# program refract. Targets are:
#
# refract: plot a section from an SFF data file
# refract77: the same, but uses g77 version of PGPLOT
#
# required libraries:
#
# libtf.a, libtf77.a: package libtf
# libsff.a, libsff77.a: package libsff
# libsffu.a, libsffu77.a: package libsffu
# libtime.a, libtime77.a: package libtime
# libts.a, libtszz.a: package libts
# libtf.a: package libtf
# libsff.a: package libsff
# libsffu.a: package libsffu
# libtime.a: package libtime
# libts.a: package libts
# These five packages can be obtained from where you got this package.
#
# PGPLOT Graphics Subroutine Library by T. J. Pearson version 5.2
# can be obtained from: www.astro.caltech.edu/~tjp/pgplot/
# libpgplot52.a: g77-version of library
# libf2cpgplot52.a: f2c-version of library
#
# f2c and libf2c.a can be obtained from Netlib: http://www.netlib.org/f2c/
# libpgplot.a: gfortran-version of library
#
# See also README.compile
#
......@@ -53,6 +49,8 @@
# 11/10/2010 V1.3 migrate to SVN environment
# - discard f2c option (fallback)
# - check environment
# 13/11/2010 V1.4 replaces shell script incdep
# added documentation
#
# ============================================================================
#
......@@ -60,7 +58,7 @@ all: refract
#----------------------------------------------------------------------
# standard edit targets
flist: *.f sub/*.f include/*.inc Makefile
flist: $(wildcard *.f sub/*.f include/*.inc) Makefile
echo $^ | tr ' ' '\n' > $@
edit: flist
......@@ -68,7 +66,10 @@ edit: flist
clean:
-/bin/rm flist
find . \( -name \*.o -o -name \*.bak -o -name \*.o77 \) | xargs rm -v
-find . \( -name \*.o -o -name \*.bak -o -name \*.o77 \) \
| xargs --no-run-if-empty rm -v
-find . \( -name \*.d -o -name \*.doc \) \
| xargs --no-run-if-empty rm -v
#----------------------------------------------------------------------
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
......@@ -92,16 +93,25 @@ REFSUB=refract_readdata.o refract_skipdata.o refract_setdefaults.o \
refract_pgdefaults.o
REFOBS=refract.o $(addprefix sub/, $(REFSUB))
include make.incdep
make.incdep: *.f sub/*.f
incdep > make.incdep
docs: $(DOCS)
# Fortran dependencies
# --------------------
%.d: %.f
echo $<: $(addprefix include/,$(patsubst include/%,%,$(shell cat $< | egrep '^ +include' | cut -f 2 -d \' | sort | uniq))) > $@
-include $(patsubst %.o,%.d,$(REFOBS))
%.doc: %.f
extractdoc.tcl $< > $(<:.f=.doc)
#======================================================================
# function documentation
functions.doc: $(patsubst %.o,%.f,$(REFOBS))
/usr/bin/awk 'BEGIN{ hot=0; } \
/^cS/ { hot=1; \
print FILENAME; \
print " c\n c -----------------------------------------\n c"; \
next; } \
/^cE/ { hot=0; } \
{ if (hot==1) { print " " $$0; } }' $^ > $@
#======================================================================
# compile and link
%.o: %.f
$(FC) -o $@ -c $< -O2 $(FFLAGS) -Iinclude
......
......@@ -2,7 +2,7 @@ c this is <refract.f>
c------------------------------------------------------------------------------
c $Id$
c
c 09/01/98 by Thomas Forbriger (IfG Stuttgart)
c Copyright 1998, 2010 by Thomas Forbriger (IfG Stuttgart)
c
c REFRACTion seismics - data interpretation
c
......@@ -57,12 +57,12 @@ c
& 'REFRACT V4.7 REFRACTion seismics - data interpretation')
c
c get common blocks
include 'include/refract_dim.inc'
include 'include/refract_data.inc'
include 'include/refract_para.inc'
include 'include/refract_pgpara.inc'
include 'include/refract_seipar.inc'
include 'include/refract_opt.inc'
include 'refract_dim.inc'
include 'refract_data.inc'
include 'refract_para.inc'
include 'refract_pgpara.inc'
include 'refract_seipar.inc'
include 'refract_opt.inc'
c
integer iargc, lastarg
character*80 argument
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment