#!/bin/bash
#set -x
set -o posix
#set -u
#set -e
#+
#
# ==================
# Fcheck_archfile.sh
# ==================
#
# --------------------------
# Check the compilation file
# --------------------------
#
# SYNOPSIS
# ========
#
# ::
#
#  $ Fcheck_archfile.sh
#
#
# DESCRIPTION
# ===========
#
#
# Check the choice of the compiler.
# Three cases :  

# - There was a previous choice
# - A new one has be specified
# - No information, exit 
#
# EXAMPLES
# ========
#
# ::
#
#  $ ./Fcheck_archfile.sh COMPILER
#
#
# TODO
# ====
#
# option debug
#
#
# EVOLUTIONS
# ==========
#
# $Id$
#
#
# - rblod 2010-06-20T16:11:47Z
#
#   * creation
#
#-

if [ ${#1} -eq 0 ]; then
   if [ ! -f ${TOOLS_DIR}/arch.fcm ]; then
   echo "Warning !!!"
   echo "NO compiler chosen"
   echo "Try makenemo_fcm -h for help"
   echo "EXITING..."
   exit 1 
   fi
else
   ln -sf ${MAIN_DIR}/ARCH/arch-${1}.fcm ${TOOLS_DIR}/arch.fcm
fi