Replaced sed with configure_ac_files, since sed may not be available.

This commit is contained in:
Ward Fisher 2017-06-07 13:21:07 -06:00
parent 6da1539ff9
commit 3a0b0d5339
3 changed files with 10 additions and 8 deletions

View File

@ -1860,6 +1860,7 @@ SET(host_cpu "${cpu}")
SET(host_vendor "${osname}")
SET(host_os "${osrel}")
SET(abs_top_builddir "${CMAKE_BINARY_DIR}")
SET(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
SET(CC_VERSION "${CMAKE_C_COMPILER}")

View File

@ -1442,9 +1442,10 @@ abs_top_builddir=`pwd`
cd $srcdir
abs_top_srcdir=`pwd`
cd $abs_top_builddir
#AC_CONFIG_FILES(test_common.sh.in)
rm -f ${abs_top_builddir}/test_common.sh
sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${abs_top_srcdir}/test_common.in >${abs_top_builddir}/test_common.sh
AC_CONFIG_FILES(test_common.sh:test_common.in)
#rm -f ${abs_top_builddir}/test_common.sh
#sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${abs_top_srcdir}/test_common.in >${abs_top_builddir}/test_common.sh
#####
# End netcdf_meta.h definitions.

View File

@ -1,7 +1,7 @@
set -e
TOPSRCDIR=@TOPSRCDIR@
TOPBUILDDIR=@TOPBUILDDIR@
TOPSRCDIR=@abs_top_srcdir@
TOPBUILDDIR=@abs_top_builddir@
# Figure out various locations in the src/build tree.
# This is relatively fragile code and is essentially
@ -20,7 +20,7 @@ TOPBUILDDIR=@TOPBUILDDIR@
# the src and build trees are distinct.
# 4. Cmake on windows using cygwin or msys.
# The src and build trees are distinct.
#
#
# For now, an explicit build using the Visual C(++) compiler
# is not supported. The big issue is the handling of executables
# and the notion of a VS configuration/build type like Debug or Release.
@ -29,11 +29,11 @@ TOPBUILDDIR=@TOPBUILDDIR@
# Thus one finds ncdump.exe in $top_builddir/ncdump/Debug instead of
# $top_builddir/ncdump. An additional issue is the extension of an
# executable: .exe vs nothing. This code attempts to figure out which is used.
#
#
# For possible future fixes, a placeholder is left in place in the
# following code named VS. If it were set to the build type, then,
# in theory, this code would work with Visual C. It is disabled for now.
#
#
# The goal, then, of this common code is to set up some useful
#constants for use in test shell scripts.
# 1. srcdir - absolute path to the source dir (e.g. ${top_srcdir}/ncgen)