Rev 2 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#!/bin/sh# This code assembles the table of statically loaded C and Fortran# code which is to be accessed via .C and .Fortran calls.ROUTINES="appl/ROUTINES"sed 's/F77_SUBROUTINE(\(.*\))/int \1_();/s/C_FUNCTION(\(.*\))/int \1();/' ${ROUTINES} > /tmp/ForeignDecl.hif test ! -f include/ForeignDecl.hthencp /tmp/ForeignDecl.h include/ForeignDecl.helseif diff /tmp/ForeignDecl.h include/ForeignDecl.hthen:elsecp /tmp/ForeignDecl.h include/ForeignDecl.hfifised 's/F77_SUBROUTINE(\(.*\))/ { "\1_", \1_},/s/C_FUNCTION(\(.*\))/ { "\1", \1 },/' ${ROUTINES} > /tmp/ForeignTab.hif test ! -f include/ForeignTab.hthencp /tmp/ForeignTab.h include/ForeignTab.helseif diff /tmp/ForeignTab.h include/ForeignTab.hthen:elsecp /tmp/ForeignTab.h include/ForeignTab.hfifirm -f /tmp/ForeignTab.h /tmp/ForeignDecl.h