From 8fdd221ec01362849907292954f240a8fb28099c Mon Sep 17 00:00:00 2001 From: Anthony Carrico Date: Mon, 24 Feb 2003 18:48:44 +0000 Subject: [PATCH] Added install/uninstall. --- INSTALL | 25 +++++++++++++++++++++++++ Makefile | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ README | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 INSTALL diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..985eb48 --- /dev/null +++ b/INSTALL @@ -0,0 +1,25 @@ +Scheme Untergrund Library + +REQUIREMENTS + +The Scheme Untergrund Library requires that scsh is installed on your +system. If you don't have it, please obtain and install it before +building sunterlib. See the webpage . + +CONFIGURING SUNTERLIB + +Sunterlib does not require configuration at this time. You may want to +adjust the Makefile's "prefix" variable to set the installation +directory. + +BUILDING SUNTERLIB + +Type 'make' to build the package. + +INSTALLATION + +Type 'make install' to install the package. + +UNINSTALLATION + +Type 'make uninstall' to uninstall the package. diff --git a/Makefile b/Makefile index 79e841d..4448b2b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,14 @@ SHELL = /bin/sh + +prefix = /usr/local +libdir = $(prefix)/lib +docdir = $(prefix)/share/doc +pkglibdir = $(libdir)/sunterlib +pkgdocdir = $(docdir)/sunterlib + +INSTALL = /usr/bin/install +INSTALL_DATA = $(INSTALL) -m 644 + .SUFFIXES: version := 0.1 @@ -9,12 +19,29 @@ s48-interfaces := $(shell find s48 \ s48-packages := $(shell find s48 \ -maxdepth 2 -mindepth 2 \ -name packages.scm) +s48-srcs := $(shell find s48 \ + -mindepth 2 \ + -not -name interfaces.scm \ + -not -name packages.scm \ + -name "*.scm") +s48-docs := $(shell find s48 \ + -mindepth 2 \ + -name README) + scsh-interfaces := $(shell find scsh \ -maxdepth 2 -mindepth 2 \ -name interfaces.scm) scsh-packages := $(shell find scsh \ -maxdepth 2 -mindepth 2 \ -name packages.scm) +scsh-srcs := $(shell find scsh \ + -mindepth 2 \ + -not -name interfaces.scm \ + -not -name packages.scm \ + -name "*.scm") +scsh-docs := $(shell find scsh \ + -mindepth 2 \ + -name README) s48-targets := s48-interfaces.scm s48-packages.scm scsh-targets := interfaces.scm packages.scm @@ -37,6 +64,32 @@ interfaces.scm : $(s48-interfaces) $(scsh-interfaces) build/header.scm packages.scm : $(s48-packages) $(scsh-packages) build/header.scm build/xpackages.scm packages.scm build/header.scm $(s48-packages) $(scsh-packages) +.PHONY : install uninstall +install : s48 scsh + $(INSTALL) -d $(pkglibdir) + $(INSTALL_DATA) s48-interfaces.scm s48-packages.scm $(pkglibdir) + $(INSTALL_DATA) interfaces.scm packages.scm $(pkglibdir) + $(foreach s48-src, \ + $(s48-srcs), \ + $(INSTALL) -d $(pkglibdir)/$(dir $(s48-src)); \ + $(INSTALL_DATA) $(s48-src) $(pkglibdir)/$(s48-src);) + $(foreach s48-doc, \ + $(s48-docs), \ + $(INSTALL) -d $(pkgdocdir)/$(dir $(s48-doc)); \ + $(INSTALL_DATA) $(s48-doc) $(pkgdocdir)/$(s48-doc);) + $(foreach scsh-src, \ + $(scsh-srcs), \ + $(INSTALL) -d $(pkglibdir)/$(dir $(scsh-src)); \ + $(INSTALL_DATA) $(scsh-src) $(pkglibdir)/$(scsh-src);) + $(foreach scsh-doc, \ + $(scsh-docs), \ + $(INSTALL) -d $(pkgdocdir)/$(dir $(scsh-doc)); \ + $(INSTALL_DATA) $(scsh-doc) $(pkgdocdir)/$(scsh-doc);) + +uninstall : + -rm -rf $(pkglibdir) $(pkgdocdir) + + .PHONY : dist dist : mkdir sunterlib-$(version) diff --git a/README b/README index e5878b9..6327246 100644 --- a/README +++ b/README @@ -5,3 +5,37 @@ Scsh. In addition to acting as host, the project provides a centralized way to access these packages from the languages' module system. +Sunterlib is hosted at Savannah: + http://savannah.nongnu.org/projects/sunterlib/ + +USE + +To use sunterlib, first make sure the library is installed (see +INSTALL). + +After installation, the library is available in + /usr/local/lib/sunterlib, +and the documentation is available in + /usr/local/share/doc/sunterlib +(or the corresponding subdirectories of the prefix used for +installation). + +The files "interfaces.scm" and "packages.scm", are the full sunterlib +for use with scsh. + +The files "s48-interfaces.scm" and "s48-packages.scm", are a sunterlib +subset for use with scheme48. + +A typical scsh script might start like this: + +#!/usr/local/bin/scsh \ +-lm /usr/local/lib/sunterlib/interfaces.scm -lm /usr/local/lib/sunterlib/packages.scm -o foo -s +!# + +where "foo" is a sunterlib package needed by your script. + +BUGS + +Please use the bug tracking system to report bugs: + http://savannah.nongnu.org/bugs/?group=sunterlib +