summaryrefslogtreecommitdiff
path: root/HACKING
diff options
context:
space:
mode:
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING95
1 files changed, 93 insertions, 2 deletions
diff --git a/HACKING b/HACKING
index 15c5beb..7963220 100644
--- a/HACKING
+++ b/HACKING
@@ -1,6 +1,6 @@
#!/bin/more
//////////////////////////////////////////////////////////////////////
- rvs 0.6.3
+ rvs 0.7.0
retroactive versioning system
a versioning system that allows you to check
in commit 2 before commit 1
@@ -14,6 +14,97 @@
hacking
+ build basics
+
+ One of the coolest things about rvs (imo) is how modular and
+ customizable it is. If you wish to create a fork of rvs, it would
+ be a good idea to give it a different name. This can be done
+ without even changing a single source file! Simply run configure
+ with `--name=NAME' option (variables that have `rvs' in the name
+ will not be renamed, but the user will never know this unless they
+ peek ath the code).
+
+ Other options to configure and their default values are:
+ name='rvs'
+ The name of the program. Note that unlike most
+ variables, you should NOT call this in Makefiles
+ (`$(name)'), but use $(rvs) instead.
+ RVS='$(bindir)/$(rvs)'
+ Where the exectuable will be. `$(rvs)' is the same as
+ `$(name)' (see above)
+ SHELL='/bin/sh'
+ The shell that will be used by make, and the shell
+ that scripts will run in. (Perhaps we should make
+ these separate variables?)
+ prefix='/usr/local'
+ Standard GNU variable. Many of you will want to
+ change this to `/usr', or `/home/USER_NAME'
+ exec_prefix='$(prefix)'
+ Standard GNU variable.
+ bindir='$(exec_prefix)/bin'
+ Standard GNU variable.
+ sbindir='$(exec_prefix)/sbin'
+ Standard GNU variable.
+ libexecdir='$(exec_prefix)/libexec'
+ Standard GNU variable. The plugins will be installed
+ at $(libexecdir)/$(name)
+ srcdir=$(readlink -f `dirname "$0"`)
+ Where the source code is. The default value evaluates
+ to the directory of the `configure' script.
+
+ These can either be changed by manually changing `configure' or by
+ running it like:
+ ./configure --VAR_NAME=VALUE
+
+ In this document, the `$(VAR_NAME)' refers to whatever you set the
+ value to.
+
+ The configure script will run on any instance of `Makefile.in' in
+ $(srcdir).
+
+ Currently, rvs is distributed with 2 pluggins. `repo'(sitory) is
+ the core of the rvs file database. `users' handles all usernames,
+ settings, and other info.
+
+ commands
+
+ By itself, rvs does almost nothing. All real functionality is
+ provided by plugins. When you invoke rvs, you do so in the format
+ `rvs COMMAND'. Plugins work by adding new commands.
+
+ Most commands are provided by plugins, however, a few are built in:
+ init
+ Initializes a repository in the current directory. It creates
+ `./.$(name)', and runs any initalizers for
+ plugins.
+ install PLUGIN DIR
+ Installs PLUGIN, for which the files are found in DIR. Unless
+ an older version is already installed, it adds the plugin to
+ have lowest priority (see `$(libexecdir)/$(rvs)/plugins').
+ uninstall PLUGIN
+ Uninstalls PLUGIN. Did that really need to be said?
+
+ A plugin is simply a collection of independant executable files.
+ When rvs is invoked, it looks for the COMMAND in a few places:
+ 1) checks if COMMAND is an built-in command
+ 2) looks at the file `$(libexecdir)/$(rvs)/plugins'. This is a
+ newline-delimited list of plugin names.
+ 3) loops through the directories `$(libexecdir)/$(rvs)/PLUGIN',
+ where PLUGIN is one of the values in
+ `$(libexecdir)/$(rvs)/plugins', in the order they appear in
+ the file.
+ 4) if rvs does not find the command, it reports an error
+
+
+ If you would like to contribute a plugin, or distribute one with a
+ fork, all you have to do is put it in `$(srcdir)/plugins/NAME'. The
+ main Makefile will recognize any directory in `$(srcdir)/plugins/'
+ as a plugin, and will run `make -C `plugins/NAME/Makefile'. It
+ should create a directory (mine use `plugins/NAME/out') to put ALL,
+ and ONLY the final files to be used by that plugin.
+
+========this is outdated but I don't really want to keep editing it ==
+
There are two main parts to rvs, the wrapper, and the core. The
wrapper is a small executable, located in the PATH, and is the one
called when you type `rvs'. The core is a set of many small
@@ -113,7 +204,7 @@
1. incompatible licences can be used for different modules
2. modules can be added/removed on the fly
3. one can use any language to write new modules, without
- having to worry about bindings
+ having to worry about bindings`$(libexecdir)/$(rvs)
$$libdir$$/lib/
THIS WAS WRITTEN FOR rvs 0.6.2