add a man page
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 18 Dec 2021 06:00:12 +0000 (17:00 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sat, 18 Dec 2021 06:00:12 +0000 (17:00 +1100)
Makefile
packnl.8.adoc [new file with mode: 0644]

index 3c81875b1860fb0a3acee564f132de75e286ddcd..174de1fd6c437862f4f1d1b62533d83e97bd8ba3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
+all: packnl packnl.8
+
 packnl: packnl.lsp incore.lsp main-args.lsp
        newlisp -x incore.lsp $@
        chmod a+x $@
        echo 'xxxxxxxxxxxxxxxxxxxxxx''xxxxxxxxxxxxxxxxxx' >> $@
        for F in $^ ; do echo "$$F\n$$(stat -c %s $$F)" ; cat $$F ; done >> $@
+
+packnl.8: packnl.8.adoc
+       a2x -d manpage -f manpage $V $^
diff --git a/packnl.8.adoc b/packnl.8.adoc
new file mode 100644 (file)
index 0000000..22abdc8
--- /dev/null
@@ -0,0 +1,98 @@
+packnl(8)
+=========
+:doctype: manpage
+:revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
+:COLON: :
+:EQUALS: =
+:NEWLINE: \n
+
+NAME
+----
+packnl - Pack newlisp scripts into an embedded binary.
+
+SYNOPSIS
+--------
+
+*packnl* -w _binary_ _member-option_*
+
+*packnl* -u _binary_ _path_
+
+*packnl* -t _binary_
+
+DESCRIPTION
+-----------
+
+*packnl* is a utility to pack a newlisp application into a binary
+using the embedding feature of newlisp. Such a packed binary will have
+the special +incore.lsp+ as embedded script, and it is then extended
+with the given application files in a "simple archive" format.
+
+The first application script is "main script" and it is loaded
+automatically. Additional application scripts and files are set up to
+be available as overriding filenames for the +load+, +read-file+ and
++file?+ functions.
+
+E.g., where the running script has the expression "(load _file_)" then
+_file_ is first looked up as being an embedded member (script), and
+only secondarily looked up in the filesystem.
+
+
+OPTIONS
+-------
+
+Command Options
+~~~~~~~~~~~~~~~
+
+*-w* _binary_ _members_::
+
+The *-w* command option is used for writing an embedded newlisp binary
+with the nominated scripts. The subseqent arguments nominate the
+scripts to include, and optionally nominate +ar+ style libraries of
+scripts to include from, or include a library in full, as well as
+optionally change the input directory for resolving subsequent script
+names. See *Member Options* below.
+
+*-u* _binary_ _path_::
+
+The *-u* command option is used for unpacking an embedded binary into
+the nominated directory.
+
+*t* _binary_::
+
+The *-t* command option is used for enlisting then names of the
+included members of an embedded binary.
+
+Member Otions
+~~~~~~~~~~~~~
+
+*_member_*::
+
+All member arguments other than the options below are undestood to
+nominate scripts to embed with file names as given.
+
+*-a* _library_::
+
+The *-a* option installs the script members from a given +ar+ style
+library to be available for embedding. The subsequent arguments
+nominate members to include.
+
+*-A* _library_::
+
+The *-A* option incorporates all the script members from the given
++ar+ style library into the embedding.
+
+*-C* _path_::
+
+The *-C* option changes the working directory for the program so that
+subsequent relative pathnames (file members and libraries) are found
+relative that working directory.
+
+SEE ALSO
+--------
+
+*newlisp*, *ar*
+
+AUTHOR
+------
+
+Ralph Ronnquist <ralph.ronnquist@gmail.com>