Source

camlspotter.bitbucket.org / omy / _sources / OMyExternal.txt

==========================
OMyExternal 
==========================
Functions to integrate non-OMake projects

Downloading
============================

.. index::
    WGet()

WGet(url, dir)

    Run wget and retrieve $(url) to $(dir)
    If the file is already downloaded, does nothing.

Files
============================

.. index::
    Files()

Files(dir)

    List up files in directory $(dir), without the prefix "$(dir)/"

.. index::
    OCamlModulesFromPath()

OCamlModulesFromPath(files)

    Get the OCaml module paths from OCaml object and interface file names: x.cmo, y.cmx => x, y
    
    CR : Defined but not useful


Functions for `External` projects
============================

General rule for commands
---------------------------------

.. index::
    OCamlExternal()

OCamlExternal(PACK)

    Add a rule to install non-omake project.
    
        Argument
            PACK (mandatory)
                Name of the package. Once installed, ``Installed($(PACK))`` is created.
        Environments
            URL (optional)
                URL of the source
            REQUIRED_PACKS (mandatory)
                List of install mark files of required package: ex. REQUIRED_PACKS=$(Installed type-conv)
            CONFIGURE (optional)
                Configure command: ex. (cd $(EXTRACT_DIR); ./configure --prefix $PREFIX)
                Command is executed at the directory where the function is called.
            INSTALL (mandatory)
                Install command: ex. (cd $(EXTRACT_DIR); make all install).
                Command is executed at the directory where the function is called.
            OBJS (optional?)
                The list of files installed
    
    CR jfuruse: this is pretty buggy





.. index::
    OCamlExternalPack()

OCamlExternalPack(PACK)

    Add a rule to install non-omake OCaml package.
    
        Argument
            PACK (mandatory)
                Name of the package. Once installed, ``Installed($(PACK))`` is created.
        Environments
            URL (optional)
                URL of the source
            REQUIRED_PACKS (mandatory)
                List of install mark files of required package: ex. REQUIRED_PACKS=$(Installed type-conv)
            CONFIGURE (optional)
                Configure command: ex. (cd $(EXTRACT_DIR); ./configure --prefix $PREFIX)
                Command is executed at the directory where the function is called.
            INSTALL (mandatory)
                Install command: ex. (cd $(EXTRACT_DIR); ocamlfind install ...).
                Command is executed at the directory where the function is called.
                ``ocamlfind remove $(PACK)`` is automatically done before the installation.
            OBJS (pretty optional?)
                The list of files installed
    
    CR jfuruse: this is pretty buggy
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.