2003-02-21 01:04:39 -05:00
|
|
|
SHELL = /bin/sh
|
2003-02-24 13:48:44 -05:00
|
|
|
|
2003-03-12 22:38:30 -05:00
|
|
|
prefix = /usr/local
|
2003-02-24 13:48:44 -05:00
|
|
|
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-05-19 22:07:05 -04:00
|
|
|
version := 0.5
|
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 \
|
2003-02-25 10:08:51 -05:00
|
|
|
! -name interfaces.scm \
|
|
|
|
! -name packages.scm \
|
2003-02-24 13:48:44 -05:00
|
|
|
-name "*.scm")
|
|
|
|
s48-docs := $(shell find s48 \
|
|
|
|
-mindepth 2 \
|
|
|
|
-name README)
|
2003-03-11 01:13:58 -05:00
|
|
|
s48-authors := $(shell find s48 \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name AUTHORS)
|
|
|
|
s48-blurbs := $(shell find s48 \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name BLURB)
|
2003-02-24 13:48:44 -05:00
|
|
|
|
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 \
|
2003-02-25 10:08:51 -05:00
|
|
|
! -name interfaces.scm \
|
|
|
|
! -name packages.scm \
|
2003-02-24 13:48:44 -05:00
|
|
|
-name "*.scm")
|
|
|
|
scsh-docs := $(shell find scsh \
|
|
|
|
-mindepth 2 \
|
|
|
|
-name README)
|
2003-03-11 01:13:58 -05:00
|
|
|
scsh-authors := $(shell find scsh \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name AUTHORS)
|
|
|
|
scsh-blurbs := $(shell find scsh \
|
|
|
|
-maxdepth 2 -mindepth 2 \
|
|
|
|
-name BLURB)
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-05-07 14:06:12 -04:00
|
|
|
s48-targets := s48-interfaces.scm s48-packages.scm sunterlib-s48.scm
|
|
|
|
scsh-targets := interfaces.scm packages.scm sunterlib.scm
|
2003-03-11 01:13:58 -05:00
|
|
|
targets := $(s48-targets) $(scsh-targets) DETAILS
|
2003-01-27 17:09:05 -05:00
|
|
|
|
2003-01-28 22:44:23 -05:00
|
|
|
.PHONY: all s48 scsh
|
2003-03-12 22:38:30 -05:00
|
|
|
all : s48 scsh DETAILS
|
2003-01-28 22:44:23 -05:00
|
|
|
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-03-12 22:38:30 -05:00
|
|
|
cat build/header.scm > s48-interfaces.scm
|
|
|
|
for interface in $(s48-interfaces) ; \
|
|
|
|
do \
|
|
|
|
cat $${interface} >> s48-interfaces.scm ; \
|
|
|
|
done
|
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-03-12 22:38:30 -05:00
|
|
|
cat build/header.scm > interfaces.scm
|
|
|
|
for interface in $(s48-interfaces) $(scsh-interfaces) ; \
|
|
|
|
do \
|
|
|
|
cat $${interface} >> interfaces.scm ; \
|
|
|
|
done
|
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-05-07 14:06:12 -04:00
|
|
|
sunterlib-s48.scm : s48-interfaces.scm s48-packages.scm
|
|
|
|
cat s48-interfaces.scm s48-packages.scm > sunterlib-s48.scm
|
|
|
|
|
|
|
|
sunterlib.scm : interfaces.scm packages.scm
|
|
|
|
cat interfaces.scm packages.scm > sunterlib.scm
|
|
|
|
|
2003-03-11 01:13:58 -05:00
|
|
|
DETAILS : $(s48-authors) $(s48-blurbs) $(scsh-authors) $(scsh-blurbs)
|
|
|
|
build/details.scm
|
|
|
|
|
2003-02-24 13:48:44 -05:00
|
|
|
.PHONY : install uninstall
|
2003-03-12 22:38:30 -05:00
|
|
|
install : s48 scsh DETAILS
|
2003-02-24 13:48:44 -05:00
|
|
|
$(INSTALL) -d $(pkglibdir)
|
2003-05-07 14:06:12 -04:00
|
|
|
$(INSTALL_DATA) s48-interfaces.scm s48-packages.scm sunterlib-s48.scm $(pkglibdir)
|
|
|
|
$(INSTALL_DATA) interfaces.scm packages.scm sunterlib.scm $(pkglibdir)
|
2003-03-12 22:38:30 -05:00
|
|
|
$(INSTALL) -d $(pkgdocdir)
|
|
|
|
$(INSTALL_DATA) README $(pkgdocdir)
|
2003-11-19 15:00:53 -05:00
|
|
|
$(INSTALL_DATA) COPYING $(pkgdocdir)
|
2003-03-12 22:38:30 -05:00
|
|
|
$(INSTALL_DATA) DETAILS $(pkgdocdir)
|
|
|
|
for s48src in $(s48-srcs); \
|
|
|
|
do \
|
|
|
|
$(INSTALL) -d $(pkglibdir)/`dirname $${s48src}`; \
|
|
|
|
$(INSTALL_DATA) $${s48src} $(pkglibdir)/$${s48src}; \
|
|
|
|
done
|
|
|
|
for s48doc in $(s48-docs); \
|
|
|
|
do \
|
|
|
|
$(INSTALL) -d $(pkgdocdir)/`dirname $${s48doc}`; \
|
|
|
|
$(INSTALL_DATA) $${s48doc} $(pkgdocdir)/$${s48doc}; \
|
|
|
|
done
|
|
|
|
for scshsrc in $(scsh-srcs); \
|
|
|
|
do \
|
|
|
|
$(INSTALL) -d $(pkglibdir)/`dirname $${scshsrc}`; \
|
|
|
|
$(INSTALL_DATA) $${scshsrc} $(pkglibdir)/$${scshsrc}; \
|
|
|
|
done
|
|
|
|
for scshdoc in $(scsh-docs); \
|
|
|
|
do \
|
|
|
|
$(INSTALL) -d $(pkgdocdir)/`dirname $${scshdoc}`; \
|
|
|
|
$(INSTALL_DATA) $${scshdoc} $(pkgdocdir)/$${scshdoc}; \
|
|
|
|
done
|
2003-02-24 13:48:44 -05:00
|
|
|
|
|
|
|
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
|
2003-02-25 01:46:51 -05:00
|
|
|
find sunterlib-$(version)/ -name CVS | xargs rm -rf
|
|
|
|
find sunterlib-$(version)/ -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
|