Commit 4263a3fd authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

prepared libaff to use new scheme of environment settings

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.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libenv201008
SVN Revision: 3138
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 559cba02
......@@ -53,4 +53,123 @@ clean: ;
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
#======================================================================
# dependencies
# ------------
#
# The compiler is used to create dependency files, which are included below.
%.d: %.cc
$(SHELL) -ec '$(CXX) -M $(CPPFLAGS) $< \
| sed '\''s,\($(notdir $*)\)\.o[ :]*,$(dir $@)\1.o $@ : ,g'\'' \
> $@; \
[ -s $@ ] || rm -f $@'
%.d: %.c
$(SHELL) -ec '$(CC) -M $(CPPFLAGS) $< \
| sed '\''s,\($(notdir $*)\)\.o[ :]*,$(dir $@)\1.o $@ : ,g'\'' \
> $@; \
[ -s $@ ] || rm -f $@'
-include $(patsubst %.cc,%.d,$(SRCFILES))
#======================================================================
# header files
# ------------
#
# Since we extensively document the class structures within the header files,
# these should be stripped for the production version (otherwise the compiler
# has to scan all comments on each compile). Stripping is done by the rule
# below and is controlled by the variables REMCMMNT and EMPTYPRINT (see
# above).
# comment stripping
# -----------------
$(call CHECKVARS,REMCMMNT EMPTYPRINT)
# awk rule assumes that the first non-comment line starts with '#'
# and that the first (copyright) comment end with pattern "^ */"
%.h.strip: %.h
awk 'BEGIN {hot=1;} /^ \*\// { if (hot) { hot=2; print; next;} }\
/^#/ { hot=0; } \
{ if (hot==2) { print ""; } else if (hot) { print; } }' $< > $@
$(REMCMMNT) $< | awk 'BEGIN {hot=0;} \
/^ *$$/ { if ((hot) && ($(EMPTYPRINT))) { print ""; } next; } \
/^#/ { hot=1; } { if (hot) print; }' >> $@
#----------------------------------------------------------------------
.PRECIOUS: %.h.strip
$(call CHECKVAR,INCINSTALLPATH)
$(INCINSTALLPATH)/%.h: %.h.strip
mkdir -vp $(dir $@)
-rm -fv $@
/bin/cp -vpd $< $@
# install header files
# INSTHEADER contains full qualified paths to library header files
# like /home/thof/include/aff/series.h
# usually then INCINSTALLPATH=/home/thof/include/aff
install-include: $(INSTHEADER)
echo $^ | tr ' ' '\n'
touch $@
#======================================================================
# create the binary library
# -------------------------
LIBOBS=$(ALLOBS) $(patsubst %.cc,%.o,$(SRC))
LIBOBS=$(patsubst %.cc,%.o,$(SRC))
# INSTHEADER contains full qualified paths to library header files
# like /home/thof/include/aff/series.h
libaff.a: $(INSTHEADER) $(LIBOBS)
ar rcv $@ $(LIBOBS)
ranlib $@
cp -vpf $@ $(LIBINSTALLPATH)
#======================================================================
# documentation part
# ------------------
#
# targets commonly used:
# ----------------------
#
# make doxyclean removes all documentation
# make doxydoc creates doxygen documentation in the DOXYWWWPATH
# make doxyview creates doxygen documentation and launches netscape to
# browse in the documentation
# make doxyconf edit the doxygen configuration file
#
# If you launch "make doxydoc" the documentation will be written to
# DOXYWWWPATH (see below). This is meant to export the documentation through
# your homepage. The doxyfull directory is just a symbolic link to this
# directory.
#
$(call CHECKVARS,WWWBASEDIR TF_BROWSER)
DOXYWWWPATH=$(WWWBASEDIR)/libaff
.PHONY: doxyclean doxyview doxydoc doxyconf
doxyclean: ;/bin/rm -rfv $(DOXYWWWPATH)
DOXYSRC=$(README) $(HEADERS) $(SRC) \
tests/f77procs.P tests/f77procs.f \
tests/f77common.inc tests/f77common_com.P
# create doxygen intermediate configuration
doxydoc.xxx: doxydoc.cfg
sed 's,<OUTPUTDIRECTORY>,$(DOXYWWWPATH),g;s,<STRIPFROMPATH>,$(PWD),g' \
$< > $@
$(DOXYWWWPATH)/html/index.html: doxydoc.xxx $(DOXYSRC)
mkdir -vp $(DOXYWWWPATH)
doxygen $<
doxydoc: $(DOXYWWWPATH)/html/index.html
doxyview: $(DOXYWWWPATH)/html/index.html
$(TF_BROWSER) file:$< &
# ----- END OF Makefile.buildingblocks -----
......@@ -108,6 +108,7 @@ export TF_PUBLICATIONPATH=$HOME/public_html/download/software
export TF_WWWBASEDIR=$HOME/public_html/txt/cxx
# path of Makefile.packages
# this should be set only for package maintainers
export TF_MAKEPKG=$HOME/work/src/pakete/Makefile.packages
# ----------------------------------------------------------------------------
......
......@@ -44,6 +44,7 @@
# 11/12/2007 V1.5 library and test programs compile well on a 64bit
# systems; the Fortran interface was tested with g77
# and f2c (not yet with gfortran)
# 17/08/2010 V1.6 prepare for new environment settings
#
# ============================================================================
#
......@@ -57,7 +58,7 @@
# the precompiler with the -I option.
# LOCLIBDIR Defines the path where the binary library will be
# placed.
# WWWBASEDIR Defines the path to your personal homepage. That's the
# TF_WWWBASEDIR Defines the path to your personal homepage. That's the
# place where doxygen output will be written too (see
# below).
#
......@@ -65,9 +66,20 @@
all: install doxydoc
install: install-include libaff.a
# ============================================================================
# a variable definition to check variable settings
# ------------------------------------------------
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
# files
# -----
# check for required variables
$(call CHECKVARS,LOCINCLUDEDIR LOCLIBDIR TF_WWWBASEDIR)
#======================================================================
# files and paths
# ---------------
# all header files used within this project
HEADERS=$(shell find . -name \*.h)
......@@ -94,26 +106,36 @@ STRIPHEADER=$(addsuffix .strip,$(notdir $(HEADERS)))
# include directory)
INSTHEADER=$(addprefix $(INCINSTALLPATH)/,$(filter-out ./tests/%,$(HEADERS)))
#======================================================================
# comments can be removed from headers
# ------------------------------------
# if defined, empty lines are kept in comment-stripped headers
# to synchronize line numbers (necessary during library debugging)
EMPTYPRINT=1
#EMPTYPRINT=0
# define this to be cat in case you do not have remcmmnt available
REMCMMNT=remcmmnt
ifndef REMCMMNT
REMCMMNT=cat
endif
#REMCMMNT=remcmmnt
#REMCMMNT=cat
#======================================================================
# compiler and preprocessor flags
# -------------------------------
FLAGS=
FLAGS+=$(MYFLAGS)
CXXFLAGS=-Wall $(FLAGS) -O3
LDFLAGS=-L$(LOCLIBDIR)
CPPFLAGS=-I$(LOCINCLUDEDIR) $(FLAGS)
CXXFLAGS+=-Wall $(FLAGS) -O3
LDFLAGS+=-L$(LOCLIBDIR)
CPPFLAGS+=-I$(LOCINCLUDEDIR) $(FLAGS)
# the following definition is needed to make the dependency command pass
# binarray.cc
TMPPARDEF=-D BIN_TYPE -D BIN_N -D BIN_REPR -D BIN_SUBS
#======================================================================
# targets
# -------
......@@ -213,7 +235,7 @@ binarray%.o: binarray.cc macro%.xxx
LIBOBS=$(ALLOBS) $(patsubst %.cc,%.o,$(SRC))
LIBOBS=$(patsubst %.cc,%.o,$(SRC))
libaff.a: install-include $(LIBOBS)
libaff.a: $(INSTHEADER) $(LIBOBS)
ar rcv $@ $(LIBOBS)
ranlib $@
cp -vpf $@ $(LIBINSTALLPATH)
......@@ -251,6 +273,7 @@ binarray_%.d: binarray.cc
# comment stripping
# -----------------
$(call CHECKVARS,REMCMMNT EMPTYPRINT)
# awk rule assumes that the first non-comment line starts with '#'
# and that the first (copyright) comment end with pattern "^ */"
......@@ -265,10 +288,11 @@ binarray_%.d: binarray.cc
#----------------------------------------------------------------------
.PRECIOUS: %.h.strip
$(call CHECKVAR,INCINSTALLPATH)
$(INCINSTALLPATH)/%.h: %.h.strip
mkdir -vp $(dir $@)
-rm -fv $@
ln -svf $$(pwd)/$< $@
/bin/cp -vpd $< $@
# install header files
install-include: $(INSTHEADER)
......@@ -286,44 +310,43 @@ install-include: $(INSTHEADER)
# make doxydoc creates doxygen documentation in the DOXYWWWPATH
# make doxyview creates doxygen documentation and launches netscape to
# browse in the documentation
# make doxyfullconf edit the doxygen configuration file
# make doxyconf edit the doxygen configuration file
#
# The targets are prepared for two documentation configurations. There is a
# "full" configuration defined in doxyfull.cfg and a "brief" configuration in
# doxybrief.cfg. However doxygen itself does not really support to distinguish
# between brief and full just due to the config-file. So just use the doxyfull
# target.
#
# If you launch "make doxyfull" the documentation will be written to
# If you launch "make doxydoc" the documentation will be written to
# DOXYWWWPATH (see below). This is meant to export the documentation through
# your homepage. The doxyfull directory is just a symbolic link to this
# directory.
#
$(call CHECKVARS,WWWBASEDIR TF_BROWSER)
DOXYWWWPATH=$(WWWBASEDIR)/libaff
.PHONY: doxyclean doxyview doxybriefview doxyfullconf doxybriefconf
.PHONY: doxyclean doxyview doxydoc doxyconf
doxyclean: ;/bin/rm -rfv docfull/* docbrief docfull
doxyclean: ;/bin/rm -rfv $(DOXYWWWPATH)
DOXYSRC=$(README) $(HEADERS) $(SRC) \
tests/f77procs.P tests/f77procs.f \
tests/f77common.inc tests/f77common_com.P
doc%/html/index.html: doxy%.cfg $(DOXYSRC)
# create doxygen intermediate configuration
doxydoc.xxx: doxydoc.cfg
sed 's,<OUTPUTDIRECTORY>,$(DOXYWWWPATH),g;s,<STRIPFROMPATH>,$(PWD),g' \
$< > $@
$(DOXYWWWPATH)/html/index.html: doxydoc.xxx $(DOXYSRC)
mkdir -vp $(DOXYWWWPATH)
ln -sfv $(DOXYWWWPATH) $(patsubst doxy%.cfg,doc%,$<)
doxygen $<
doxybriefconf doxyfullconf: doxy%conf:
doxywizard $(patsubst doxy%conf,doxy%.cfg,$@)
doxyfull doxybrief: doxy%: doxyclean doc%/html/index.html
doxydoc: doxyfull
doxydoc: $(DOXYWWWPATH)/html/index.html
doxyfullview doxybriefview: doxy%view: doxy%
$(TF_BROWSER) file:$(DOXYWWWPATH)/html/index.html &
doxyview: doxydoc doxyfullview
doxyview: $(DOXYWWWPATH)/html/index.html
$(TF_BROWSER) file:$< &
#----------------------------------------------------------------------
# kdoc (http://sirtaj.net/projects/kdoc/)
# added by Daniel
KDOCDIR=$(HOME)/tmp/affkdoc
kdoc:
mkdir -p $(KDOCDIR)
......@@ -366,28 +389,15 @@ compile-tests: \
#======================================================================
# create package
# --------------
# is delegated to Makefile.packages
# which still has to be coded
VERSIONCODE=$(shell date +'%Y%m%d')
PACKAGE=libaff$(VERSIONCODE)
PUBLICATIONPATH=$(HOME)/public_html/download/software
TMPPATH=$(HOME)/tmp/$(PACKAGE)
CVSSERVER=cvsserver:/home/tforb/CVSff
package:
/bin/rm -rfv $(TMPPATH); mkdir -pv $(TMPPATH)
cd $(TMPPATH)/..; cvs -d $(CVSSERVER) \
export -r HEAD -d $(PACKAGE) libaff
cd $(TMPPATH)/..; cvs export -r HEAD -d $(PACKAGE) thof/src/LICENSE.GPL
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.compile
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.1st
/bin/bash -c 'cd $(TMPPATH); \
export LOCINCLUDEDIR=include; export LOCLIBDIR=binlib; \
export WWWBASEDIR=doxydoc; export LOCBINDIR=bin; \
mkdir -vp include binlib bin doxydoc; \
make all; make clean; /bin/rm -rfv include binlib bin'
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
gzip --force -9 $(PUBLICATIONPATH)/$(PACKAGE).tar
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
bzip2 -f $(PUBLICATIONPATH)/$(PACKAGE).tar
ifdef TF_MAKEPKG
include $(TF_MAKEPKG)
endif
# ----- END OF Makefile -----
# Doxygen configuration generated by Doxywizard version 0.1
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = "AFF --- A container for numbers (array) by Friederich and Forbriger."
PROJECT_NUMBER =
OUTPUT_DIRECTORY = docbrief
OUTPUT_LANGUAGE = English
EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
BRIEF_MEMBER_DESC = NO
REPEAT_BRIEF = NO
ALWAYS_DETAILED_SEC = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/thof/ffwork/ \
/home/theo1/forbrig/ffwork/
INTERNAL_DOCS = NO
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = NO
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = YES
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
DISTRIBUTE_GROUP_DOC = YES
TAB_SIZE = 8
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ./
FILE_PATTERNS = README \
README.changelog \
*.h \
*.cc
RECURSIVE = YES
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH = tests
EXAMPLE_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
COMPACT_LATEX = YES
PAPER_TYPE = a4wide
EXTRA_PACKAGES = pslatex
LATEX_HEADER =
PDF_HYPERLINKS = NO
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = YES
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = YES
MAN_OUTPUT = man
MAN_EXTENSION = .3
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED = DOXYGEN_MUST_SKIP_THIS
EXPAND_AS_DEFINED =
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =
......@@ -9,6 +9,8 @@
# For lists items can also be appended using:
# TAG += value [value, ...]
# Values that contain spaces should be placed between quotes (" ")
#
# $Id$
#---------------------------------------------------------------------------
# General configuration options
......@@ -30,7 +32,7 @@ PROJECT_NUMBER =
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = docfull
OUTPUT_DIRECTORY = <OUTPUTDIRECTORY>
# The OUTPUT_LANGUAGE tag is used to specify the language in which all
# documentation generated by doxygen is written. Doxygen will use this
......@@ -143,8 +145,7 @@ FULL_PATH_NAMES = YES
# only done if one of the specified strings matches the left-hand part of
# the path. It is allowed to use relative paths in the argument list.
STRIP_FROM_PATH = /home/theo1/forbrig/ffwork/ \
/home/thof/ffwork/
STRIP_FROM_PATH = <STRIPFROMPATH>
# The INTERNAL_DOCS tag determines if documentation
# that is typed after a \internal command is included. If the tag is set
......
# this is <Makefile.packages>
# ----------------------------------------------------------------------------
# $Id: $
# $Id$
#
# Copyright (c) 2010 by Thomas Forbriger (BFO Schiltach)
#
......@@ -12,18 +12,25 @@
# ============================================================================
#
all:
flist: Makefile
echo $^ | tr ' ' '\n' | sort > $@
.PHONY: edit
edit: flist; vim $<
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist
ifdef THEFROZZLEHASDONEITALREADY
package:
/bin/rm -rfv $(TMPPATH); mkdir -pv $(TMPPATH)
cd $(TMPPATH)/..; cvs -d $(CVSSERVER) \
export -r HEAD -d $(PACKAGE) libaff
cd $(TMPPATH)/..; cvs export -r HEAD -d $(PACKAGE) thof/src/LICENSE.GPL
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.compile
cd $(TMPPATH)/..; cvs export -r HEAD \
-d $(PACKAGE) thof/src/README.1st
/bin/bash -c 'cd $(TMPPATH); \
export LOCINCLUDEDIR=include; export LOCLIBDIR=binlib; \
export WWWBASEDIR=doxydoc; export LOCBINDIR=bin; \
mkdir -vp include binlib bin doxydoc; \
make all; make clean; /bin/rm -rfv include binlib bin'
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
gzip --force -9 $(PUBLICATIONPATH)/$(PACKAGE).tar
cd $(TMPPATH)/..; tar cvf $(PUBLICATIONPATH)/$(PACKAGE).tar $(PACKAGE)
bzip2 -f $(PUBLICATIONPATH)/$(PACKAGE).tar
endif
# ----- END OF Makefile.packages -----
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