PreviousUpNext

15.4.74  src/app/makelib/main/filename-policy.pkg

## filename-policy.pkg
## (C) 1999 Lucent Technologies, Bell Laboratories
## Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)

# Compiled by:
#     src/app/makelib/makelib.sublib


# This generic is compiletime invoked (only) in:
#     src/app/makelib/main/filename-policy.pkg

stipulate
    package ad  =  anchor_dictionary;                                                                   # anchor_dictionary             is from   src/app/makelib/paths/anchor-dictionary.pkg
    package mvi =  makelib_version_intlist;                                                             # makelib_version_intlist       is from   src/app/makelib/stuff/makelib-version-intlist.pkg
herein

    package   filename_policy
    :         Filename_Policy                                                                           # Filename_Policy               is from   src/app/makelib/main/filename-policy.api
    {
        Policy
            =
            { compiledfile: ad::File -> String,
              depends:      ad::File -> String,
              version:      ad::File -> String,
              index:        ad::File -> String,
              freeze:       ad::File -> String
            };

        # XXX BUGGO FIXME This doesn't belong here.
        #
        fun os_kind_to_string  platform_properties::os::BEOS  =>  "beos";
            os_kind_to_string  platform_properties::os::MACOS =>  "macos";
            os_kind_to_string  platform_properties::os::OS2   =>  "os2";
            os_kind_to_string  platform_properties::os::POSIX =>  "posix";
            os_kind_to_string  platform_properties::os::WIN32 =>  "win32";
        end;

        fun name prefix suffix path
            =
            {   (winix__premicrothread::path::split_path_into_dir_and_file  path)
                    ->
                    { dir, file };

                winix__premicrothread::path::make_path_from_dir_and_file
                    { dir, file => prefix + file + suffix };
            };

        policy
            =
            {   depends      =>  name "." ".module-dependencies-summary"  o   ad::os_string,
                version      =>  name "." ".version"                      o   ad::os_string,
                compiledfile =>  name ""  ".compiled"                     o   ad::os_string,
                index        =>  name ""  ".index"                        o   ad::os_string,
                freeze       =>  name ""  ".frozen"                       o   ad::os_string
            };




                                                            # anchor_dictionary         is from   src/app/makelib/paths/anchor-dictionary.pkg
                                                            # winix__premicrothread     is from   src/lib/std/winix--premicrothread.pkg
                                                            # winix_path_g              def in    src/lib/std/src/winix/winix-path-g.pkg

        fun make_compiledfile_name                     (p: Policy) path =   p.compiledfile  path;
        fun make_versionfile_name                      (p: Policy) path =   p.version       path;
        fun make_indexfile_name                        (p: Policy) path =   p.index         path;
        fun make_freezefile_name                       (p: Policy) path =   p.freeze        path;
        fun make_module_dependencies_summaryfile_name  (p: Policy) path =   p.depends       path;

    };
end;


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext