Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/system/smlnj/MLRISC/makeproxies
ViewVC logotype

Annotation of /sml/trunk/src/system/smlnj/MLRISC/makeproxies

Parent Directory Parent Directory | Revision Log Revision Log


Revision 819 - (view) (download)

1 : blume 819 #!/bin/sh
2 :     #
3 :     # This script is no longer necessary. -Matthias
4 :     #
5 : leunga 775 #!/usr/bin/perl
6 :     #
7 :     # This script is used to update the CM proxies so that the export lists
8 :     # are consistent with the cm files in MLRISC.
9 :     #
10 :     # -- Allen (leunga@cs.nyu.edu)
11 :     #
12 :    
13 : blume 819 echo Running $0 is no longer necessary.
14 :    
15 :     cat >/dev/null <<\stop
16 : leunga 775 foreach $filename (@ARGV)
17 :     { process($filename);
18 :     }
19 :    
20 :     sub process
21 :     { my($filename) = @_;
22 :     my($infile) = "../../../MLRISC/cm/$filename";
23 :     open(CM,$infile) || die ("$!: $infile\n");
24 :     my(@exports) = ();
25 :     while (<CM>)
26 :     { push @exports, $_ if (/structure (.*)/);
27 :     push @exports, $_ if (/functor (.*)/);
28 :     push @exports, $_ if (/signature (.*)/);
29 :     }
30 :     close(CM);
31 :     my($outfile) = "$filename";
32 :    
33 :     open(CM,">$outfile") || die("$!: $outfile\n");
34 :     print CM <<"END";
35 :     (* This file is generated by running 'perl makeproxies $filename' *)
36 :    
37 :     (*
38 :     * This is library \$smlnj/MLRISC/$filename -- a proxy providing the
39 :     * services of \$SMLNJ-MLRISC/$filename.
40 :     * The path anchor \$SMLNJ-MLRISC points to (implementation of the)
41 :     * version of MLRISC that is used by SML/NJ.
42 :     * This proxy takes care of binding path anchors internal to MLRISC
43 :     * in such a way that they consistently point to the same version
44 :     * of MLRISC.
45 :     *
46 :     * Copyright (c) 2000 by Lucent Bell Laboratories
47 :     *
48 :     * author: Matthias Blume (blume\@cs.princeton.edu)
49 :     *)
50 :     END
51 :     print CM "Library\n";
52 :     foreach $entry (@exports)
53 :     { print CM $entry;
54 :     }
55 :     print CM "is\n";
56 :     print CM "\t\$SMLNJ-MLRISC/$filename\n";
57 :     print CM <<'END';
58 :     (bind:(anchor:Control.cm value:$SMLNJ-MLRISC)
59 :     bind:(anchor:Lib.cm value:$SMLNJ-MLRISC)
60 : leunga 797 bind:(anchor:MLTREE.cm value:$SMLNJ-MLRISC)
61 : leunga 775 bind:(anchor:MLRISC.cm value:$SMLNJ-MLRISC))
62 :     END
63 :     print STDERR "[ $outfile written ]\n";
64 :     close(CM);
65 :     }
66 : blume 819 stop
67 :    
68 :     exit 1

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0