/[MITgcm]/MITgcm_contrib/test_scripts/other/do_make_syntax.sh
ViewVC logotype

Contents of /MITgcm_contrib/test_scripts/other/do_make_syntax.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Mar 14 18:24:16 2012 UTC (13 years, 9 months ago) by jmc
Branch: MAIN
File MIME type: application/x-sh
more efficient way (only 1 genmake & 1 makedepend) to check S/R argument
consistency using a ad-hoc home wrapper script around "make".

1 #! /usr/bin/env bash
2
3 # $Header: $
4 # $Name: $
5
6 #- create a copy of current Makefile with additional FFLAGS
7 if test Makefile_syntax -ot Makefile ; then
8 echo -n '-- using new "Makefile_syntax",'
9 sed 's/^FFLAGS =.*$/& -syntax-only/' Makefile > Makefile_syntax
10 else
11 echo -n '-- use prev. "Makefile_syntax",'
12 fi
13 #- move away object files and remove "__genmod.mod" files:
14 ( mkdir tmp ; ~/bin/rn .o .oSv .c ; mv -f *.o tmp
15 ~/bin/rn .oSv .o ; rm -f *__genmod.mod ) > /dev/null 2>&1
16 #- make:
17 echo " exec 'make -f Makefile_syntax $*':"
18 make -f Makefile_syntax $*
19 RETVAL=$?
20 #- move back object files:
21 ( mv -f tmp/* . ; rmdir tmp ) > /dev/null 2>&1
22
23 exit $RETVAL

  ViewVC Help
Powered by ViewVC 1.1.22