2003-02-21 01:04:39 -05:00
|
|
|
SHELL = /bin/sh
|
2003-02-24 13:48:44 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2003-02-21 01:04:39 -05:00
|
|
|
.SUFFIXES:
|
|
|
|
|
2003-02-24 14:16:56 -05:00
|
|
|
version := 0.2
|
2003-02-21 01:04:39 -05:00
|
|
|
|
2003-01-28 22:44:23 -05:00
|
|
|
s48-interfaces := $(shell find s48 \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name interfaces.scm)
|
|
|
|
s48-packages := $(shell find s48 \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name packages.scm)
|
2003-02-24 13:48:44 -05:00
|
|
|
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)
|
|
|
|
|
2003-01-28 22:44:23 -05:00
|
|
|
scsh-interfaces := $(shell find scsh \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name interfaces.scm)
|
|
|
|
scsh-packages := $(shell find scsh \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name packages.scm)
|
2003-02-24 13:48:44 -05:00
|
|
|
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)
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-01-28 22:44:23 -05:00
|
|
|
s48-targets := s48-interfaces.scm s48-packages.scm
|
|
|
|
scsh-targets := interfaces.scm packages.scm
|
|
|
|
targets := $(s48-targets) $(scsh-targets)
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-01-28 22:44:23 -05:00
|
|
|
.PHONY: all s48 scsh
|
|
|
|
all : s48 scsh
|
|
|
|
s48 : $(s48-targets)
|
|
|
|
scsh : $(scsh-targets)
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-02-21 01:04:39 -05:00
|
|
|
s48-interfaces.scm : $(s48-interfaces) build/header.scm
|
2003-01-29 11:58:34 -05:00
|
|
|
cat build/header.scm $(s48-interfaces) > s48-interfaces.scm
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-02-21 01:04:39 -05:00
|
|
|
s48-packages.scm : $(s48-packages) build/header.scm
|
2003-01-29 11:58:34 -05:00
|
|
|
build/xpackages.scm s48-packages.scm build/header.scm $(s48-packages)
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-02-21 01:04:39 -05:00
|
|
|
interfaces.scm : $(s48-interfaces) $(scsh-interfaces) build/header.scm
|
2003-01-29 11:58:34 -05:00
|
|
|
cat build/header.scm $(s48-interfaces) $(scsh-interfaces) > interfaces.scm
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-02-21 01:04:39 -05:00
|
|
|
packages.scm : $(s48-packages) $(scsh-packages) build/header.scm
|
2003-01-29 11:58:34 -05:00
|
|
|
build/xpackages.scm packages.scm build/header.scm $(s48-packages) $(scsh-packages)
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-02-24 13:48:44 -05:00
|
|
|
.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)
|
|
|
|
|
|
|
|
|
2003-02-21 01:04:39 -05:00
|
|
|
.PHONY : dist
|
|
|
|
dist :
|
|
|
|
mkdir sunterlib-$(version)
|
2003-02-24 14:48:12 -05:00
|
|
|
cp COPYING INSTALL Makefile NEWS README README.admin README.contrib sunterlib-$(version)/
|
2003-02-21 01:04:39 -05:00
|
|
|
cp -r build sunterlib-$(version)/build
|
|
|
|
cp -r s48 sunterlib-$(version)/s48
|
|
|
|
cp -r scsh sunterlib-$(version)/scsh
|
|
|
|
find sunterlib-0.1/ -name CVS | xargs rm -rf
|
2003-02-21 02:56:58 -05:00
|
|
|
find sunterlib-0.1/ -name "*~" | xargs rm -f
|
2003-02-21 01:04:39 -05:00
|
|
|
tar -czf sunterlib-$(version).tar.gz sunterlib-$(version)
|
|
|
|
rm -rf sunterlib-$(version)
|
|
|
|
|
|
|
|
.PHONY : clean distclean
|
2003-01-27 17:09:05 -05:00
|
|
|
clean :
|
|
|
|
-rm -f $(targets)
|
2003-02-21 01:04:39 -05:00
|
|
|
|
|
|
|
distclean : clean
|
|
|
|
-rm -rf sunterlib-$(version) sunterlib-$(version).tar.gz
|