#!/bin/bash
# $Id: w_i_e 728 2009-09-04 11:27:47Z bellier $
#-------------------------------------------------------------------#
#- w_i_e                                                21/07/2009 -#
#- Validate the correlation between the target and the environment -#
#-------------------------------------------------------------------#
shopt -s extglob
#-
WW_ast='****************************************************************'
#-
h_t=${1}; h_w=${2};
#-
echo -e "\n${WW_ast}" >&2;
echo "INFO -  This Makefile is for host type : ${h_t}" >&2;
echo "INFO -  Host used has type :             ${h_w}" >&2;
echo -e "${WW_ast}" >&2;
#-
if [ ${h_t} = ${h_w} ]; then
  r_c='OK';
else
  r_c='WN'; [[ ${h_t} = sx[89]mercure ]] && { r_c='NO'; }
fi
#-
if   [ ${r_c} = 'WN' ]; then
 echo "WARNING - This Makefile may not be compatible whith the host !" >&2;
 echo -e "${WW_ast}" >&2;
elif [ ${r_c} = 'NO' ]; then
 echo "ERROR - This Makefile is not compatible whith the host !" >&2;
 echo -e "${WW_ast}" >&2;
fi
#-
echo ${r_c};
unset h_t h_w r_c;
#-
exit 0;
