octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran)


From: John W. Eaton
Subject: MSVC compiler support [patch 11]: CRUFT.DLL exported symbols (Fortran)
Date: Wed, 25 Oct 2006 17:36:02 -0400

On 17-Oct-2006, Michael Goffioul wrote:

| To export symbols from the cruft DLL, I generate a .def file on the fly, 
| while converting
| fortran code to C code.
| 
| Index: configure.in
| ===================================================================
| RCS file: /cvs/octave/configure.in,v
| retrieving revision 1.526
| diff -p -c -r1.526 configure.in
| *** configure.in      13 Oct 2006 18:11:26 -0000      1.526
| --- configure.in      17 Oct 2006 11:07:41 -0000
| *************** elif $have_f2c; then
| *** 699,708 ****
|       AC_MSG_WARN($warn_f2c_no_lib)
|     fi
|     f77_rules_frag=Makefrag.f77
| !   cat << \EOF > $f77_rules_frag
|   
|   %.c : %.f
| !     $(F2C) $(F2CFLAGS) < $< > $(@F)
|   
|   %.o : %.f
|   
| --- 722,742 ----
|       AC_MSG_WARN($warn_f2c_no_lib)
|     fi
|     f77_rules_frag=Makefrag.f77
| !   f2c_rule_xtra=
| !   case "$canonical_host_type" in
| !     *-*-msdos)
| !     f2c_rule_xtra="@grep -i -E -e '^      .*(SUBROUTINE|FUNCTION|ENTRY)' $< 
\
| !       | sed -e 's/^      .*FUNCTION *\([[^ (]]*\).*\$\$/\1_/g' -e 's/^      
.*function *\([[^ (]]*\).*\$\$/\1_/g' \
| !             -e 's/^      .*SUBROUTINE *\([[^ (]]*\).*\$\$/\1_/g' -e 's/^    
  .*subroutine *\([[^ (]]*\).*\$\$/\1_/g' \
| !             -e 's/^      .*ENTRY *\([[^ (]]*\).*\$\$/\1_/g' -e 's/^      
.*entry *\([[^ (]]*\).*\$\$/\1_/g' \
| !             -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' 
>> ../cruft.def"
| !     ;;
| !   esac
| !   cat << EOF > $f77_rules_frag
|   
|   %.c : %.f
| !     \$(F2C) \$(F2CFLAGS) < \$< > \$(@F)
| !     $f2c_rule_xtra
|   
|   %.o : %.f

With this rule, it appears that an extra entry will be added to the
cruft.def file each time a file is compiled (it can happen more than
once if the object files are removed, or if the source file is
touched).  Is that a problem?  Perhaps we should instead create a
separate def file for each source file and then collect them all at
the end?  Also, I don't see any rule to remove the cruft.def file.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]