From f2380aab7fc0f86fb0ee0f90ffd36d9ba71e76a3 Mon Sep 17 00:00:00 2001 From: Jeremy Hughes Date: Sat, 11 Jul 2009 19:24:09 +1200 Subject: [PATCH] alien.inline.compiler: documentation --- .../inline/compiler/compiler-docs.factor | 77 +++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 basis/alien/inline/compiler/compiler-docs.factor diff --git a/basis/alien/inline/compiler/compiler-docs.factor b/basis/alien/inline/compiler/compiler-docs.factor new file mode 100644 index 0000000000..28e2538e1f --- /dev/null +++ b/basis/alien/inline/compiler/compiler-docs.factor @@ -0,0 +1,77 @@ +! Copyright (C) 2009 Jeremy Hughes. +! See http://factorcode.org/license.txt for BSD license. +USING: help.markup help.syntax kernel strings words.symbol sequences ; +IN: alien.inline.compiler + +HELP: C +{ $var-description "A symbol representing C source." } ; + +HELP: C++ +{ $var-description "A symbol representing C++ source." } ; + +HELP: compile-to-library +{ $values + { "lang" symbol } { "args" sequence } { "contents" string } { "name" string } +} +{ $description "Compiles and links " { $snippet "contents" } " into a shared library called " { $snippet "libname.suffix" } + "in " { $snippet "resource:alien-inline-libs" } ". " { $snippet "suffix" } " is OS specific. " + { $snippet "args" } " is a sequence of arguments for the linking stage." } +{ $notes + { $list + "C and C++ are the only supported languages." + { "Source and object files are placed in " { $snippet "resource:temp" } "." } } +} ; + +HELP: compiler +{ $values + { "lang" symbol } + { "str" string } +} +{ $description "Returns a compiler name based on OS and source language." } +{ $see-also compiler-descr } ; + +HELP: compiler-descr +{ $values + { "lang" symbol } + { "descr" "a process description" } +} +{ $description "Returns a compiler process description based on OS and source language." } +{ $see-also compiler } ; + +HELP: inline-library-file +{ $values + { "name" string } + { "path" "a pathname string" } +} +{ $description "Appends " { $snippet "name" } " to the " { $link inline-libs-directory } "." } ; + +HELP: inline-libs-directory +{ $values + { "path" "a pathname string" } +} +{ $description "The directory where libraries created using " { $snippet "alien.inline" } " are stored." } ; + +HELP: library-path +{ $values + { "str" string } + { "path" "a pathname string" } +} +{ $description "Converts " { $snippet "name" } " into a full path to the corresponding inline library." } ; + +HELP: library-suffix +{ $values + { "str" string } +} +{ $description "The appropriate shared library suffix for the current OS." } ; + +HELP: link-descr +{ $values + { "descr" sequence } +} +{ $description "Returns part of a process description. OS dependent." } ; + +ARTICLE: "alien.inline.compiler" "Inline C compiler" +{ $vocab-link "alien.inline.compiler" } +; + +ABOUT: "alien.inline.compiler"