Skip to content
Snippets Groups Projects
Commit 4a165cca authored by Louwrens Van Dellen's avatar Louwrens Van Dellen
Browse files

Add workaround for git describe and misplaced tags. Fixup for make dist. (IMAS-1676)

git-svn-id: https://spcsvn.epfl.ch/repos/interpos/trunk@302 c433e82f-1369-0410-b534-8797b8ea09d3
parent c631ffc9
No related branches found
No related tags found
No related merge requests found
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src/f90
##if ENABLE_EXAMPLES_F90
##SUBDIRS += examples/f90
##endif
##if ENABLE_EXAMPLES_MAT
##SUBDIRS += examples/matlab
##endif
##if ENABLE_EXAMPLES_PY
##SUBDIRS += examples/python
##endif
if ENABLE_TESTS
SUBDIRS += tests/f90
endif
# See build-aux/git-version-gen
EXTRA_DIST = $(top_srcdir)/.version
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
EXTRA_DIST += Code_transfer_INTERPOS_ITERandPartners.pdf LICENSE.pdf
#! /bin/sh
# Run ./bootstrap to generate the boilerplate scripts such as ./configure.
if autoreconf --version 2>&1 > /dev/null ;then
autoreconf -f -v -i
else
set -x
aclocal --force -I m4 \
&& autoconf --force \
&& automake --add-missing --copy --force-missing
fi
# Print a version into .version
# The tags follow SVN tags, which are empty commits that branch off.
# This means git describe only works if on such a commit, otherwise
# we'll use this workaround to populate .version.
# Traverse all tags,
# Find common ancestor of HEAD and tag,
# Count number of commits between this ancestor and HEAD
# Find tag with mininum count
# Produce a <tag>-<count>-g<hash> string a la git describe
if test "x`git describe 2>/dev/null`" = x ;then
TAGS=`git tag -l 2>/dev/null`
if test "x$TAGS" != x ;then
HD=`git describe --always --dirty`
for TAG in $TAGS ;do
MB=`git merge-base $TAG HEAD`
C=`git rev-list ${MB}..HEAD | wc -l`
# Count cannot be 0, git describe would have worked.
if test $C -gt 0 ;then
echo "$C $TAG-$C-g$HD"
fi
done | sort -n | head -n1 | cut -d' ' -f2 > .version
echo .version: `cat .version`
cp -v .version .tarball-version
fi
fi
*.log
*.trs
interpostest3
interpostest_eqdsk
interpostest_2Deqdsk
interpostest_profile
......@@ -12,16 +12,16 @@ LDADD += $(LAPACK_LIBS) $(BLAS_LIBS) $(LIBS) $(FCLIBS)
endif
if ENABLE_TESTS
check_PROGRAMS = interpostest3 interpostest_profile interpostest_eqdsk
check_PROGRAMS = interpostest3 interpostest_profile interpostest_2Deqdsk
endif
AM_DEFAULT_SOURCE_EXT = .f90
interpostest_eqdsk_SOURCES = interpostest_2Deqdsk.f90 indexx.f90
interpostest_2Deqdsk_SOURCES = interpostest_2Deqdsk.f90 indexx.f90
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
$(top_srcdir)/build-aux/tap-driver.sh
TESTS = $(check_PROGRAMS)
EXTRA_DIST = $(TESTS:%=%.f90)
EXTRA_DIST = $(TESTS:%=%.f90) $(interpostest_2Deqdsk_SOURCES)
# Treat all .f90 files as preprocessed Fortran.
PPFCCOMPILE = $(FC) $(FCDEFS) $(DEFAULT_INCLUDES) $(FCINCLUDES) $(AM_FCCPPFLAGS) $(FCCPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment