Skip to content

Commit

Permalink
Addressed a similar issue with Makefile.ext and configure that was re…
Browse files Browse the repository at this point in the history
…ported by Sarat Sreepathi from ORNL.

git-svn-id: svn+ssh://software.sandia.gov/svn/hpcg/trunk@236 5e06a57e-6b39-4354-92a0-249a7d0c5410
  • Loading branch information
luszczek committed Nov 19, 2014
1 parent ee37c0c commit 98644f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
5 changes: 2 additions & 3 deletions Makefile.ext
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# -*- Makefile -*-

#arch = UNKNOWN
setup_file = UNKNOWN
arch = UNKNOWN
setup_file = setup/Make.$(arch)

#include setup/Make.$(arch)
include $(setup_file)


Expand Down
24 changes: 11 additions & 13 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,18 @@ bld_path=`pwd`

#FIXME: need to check whether src and bld are the same (test f1 -ef f2)

#if test x"$#" != x"1" -o x`echo "$1" | sed -e 's/arch=..*/arch=/'` != x"arch=" -o x`echo "$1" | sed -e 's/arch=//'` = "x" ; then
# echo
# echo Please specify '"'arch'"' argument, for example:
# echo
# echo $0 arch=Unix
# echo
# exit 127
#fi
if test x"$#" != x"1" -o x"$1" = "x" ; then
echo
echo Please specify '"'arch'"' argument, for example:
echo
echo $0 Unix
echo
exit 127
fi

#arg_arch=`echo "$1" | sed -e 's/arch=//'`
arg_arch="$1"

#setup_file=${src_path}/setup/Make.${arg_arch}
setup_file="$1"
setup_file=${src_path}/setup/Make.${arg_arch}

if test ! -f $setup_file ; then
echo
Expand All @@ -32,8 +31,7 @@ if test -d $mkfile -o -f $mkfile ; then
rm -rf $mkfile
fi

#sed -e "s:HPCG_ROOT_PATH:${bld_path}:g" ${src_path}/Makefile.ext | sed -e "s:HPCG_SRC_PATH:${src_path}:g" | sed -e "s:UNKNOWN:${arg_arch}:" > $mkfile
sed -e "s:HPCG_ROOT_PATH:${bld_path}:g" ${src_path}/Makefile.ext | sed -e "s:HPCG_SRC_PATH:${src_path}:g" | sed -e "s:UNKNOWN:${setup_file}:" > $mkfile
sed -e "s:HPCG_ROOT_PATH:${bld_path}:g" ${src_path}/Makefile.ext | sed -e "s:HPCG_SRC_PATH:${src_path}:g" | sed -e "s:UNKNOWN:${arg_arch}:" > $mkfile

# creating missing directories
for path in src testing bin setup
Expand Down

0 comments on commit 98644f3

Please sign in to comment.