aboutsummaryrefslogtreecommitdiff
path: root/abstractions
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-16 00:15:14 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-16 00:15:14 +0000
commit3744a5716b517f6d9025f314c2562861d6eeb99d (patch)
treebb9e10a851a4863b2825eefe25468afbcfc88be4 /abstractions
parent31dd5b16c5f2acd88e8957c929f98d7f26c3521d (diff)
first stab at a nice abstractions build system
svn path=/trunk/; revision=3925
Diffstat (limited to 'abstractions')
-rw-r--r--abstractions/Makefile127
-rw-r--r--abstractions/README91
2 files changed, 177 insertions, 41 deletions
diff --git a/abstractions/Makefile b/abstractions/Makefile
index 33db1384..d9f17a89 100644
--- a/abstractions/Makefile
+++ b/abstractions/Makefile
@@ -1,31 +1,108 @@
-# Created by Hans-Christoph Steiner <hans@eds.org> to generate MacOS X packages
-# This Makefile does not generate a PDDP pkg, PDDP has its own Makefile
+#
+# Centralized build system for "abstractions".
+#
+# see README for instructions <hans@at.or.at>
+#
-current: darwin_pkg
+# these are setup to be overridden by the packages/*/Makefiles
+SRC_ROOT_DIR := $(shell pwd)/..
+INSTALL_PREFIX = build
+DOCS_BASE = $(INSTALL_PREFIX)/doc
-ABSTRACTIONS_VERSION = $(shell date +20%y.%m.%d)
-PKG_PREFIX = pd-abstractions
-PKG_NAME = $(PKG_PREFIX)-$(ABSTRACTIONS_VERSION)
+# sources
+ABSTRACTIONS_SRC = $(SRC_ROOT_DIR)/abstractions
+# destinations
+APPLICATIONS_DST = $(DOCS_BASE)/examples
+OBJECTS_DST = $(INSTALL_PREFIX)/extra
+DOCS_DST = $(DOCS_BASE)/5.reference
+MANUALS_DST = $(DOCS_BASE)/manuals
+
+#------------------------------------------------------------------------------#
+# DIRECTORY STRUCTURE TARGETS
+#------------------------------------------------------------------------------#
+# first make sure that the directory structure is setup
+$(INSTALL_PREFIX):
+ install -d $(INSTALL_PREFIX)
+
+$(APPLICATIONS_DST): $(INSTALL_PREFIX)
+ install -d $(APPLICATIONS_DST)
+
+$(OBJECTS_DST): $(INSTALL_PREFIX)
+ install -d $(OBJECTS_DST)
+
+$(DOCS_DST): $(INSTALL_PREFIX)
+ install -d $(DOCS_DST)
+
+$(MANUALS_DST): $(INSTALL_PREFIX)
+ install -d $(MANUALS_DST)
+
+
+#------------------------------------------------------------------------------#
+# OVERARCHING BUILD TARGETS
+#------------------------------------------------------------------------------#
+
+all: objects applications
+
+final_setup:
+ chmod -R ugo-w $(INSTALL_PREFIX)
+
+objects: $(OBJECTS_DST) $(DOCS_DST) $(MANUALS_DST)
+objects: objects_rradical objects_memento
+
+applications: $(APPLICATIONS_DST) $(MANUALS_DST)
+applications: applications_rradical
+
+
+#------------------------------------------------------------------------------#
+# PROJECT TARGETS
+#------------------------------------------------------------------------------#
+
+#------------------------------
+# RRADICAL
+objects_rradical:
+ install -d $(OBJECTS_DST)/memento
+
+applications_rradical:
+ install -d $(APPLICATIONS_DST)/RRADical
+ install -p $(ABSTRACTIONS_SRC)/rradical/usecases/*.* $(APPLICATIONS_DST)/RRADical
+ cp -rp $(ABSTRACTIONS_SRC)/rradical/usecases/showcase $(APPLICATIONS_DST)/RRADical/
+
+#------------------------------
+# MEMENTO
+objects_memento:
+ install -d $(OBJECTS_DST)/memento
+ install -p $(shell ls -1 $(ABSTRACTIONS_SRC)/rradical/memento/*.pd | \
+ grep -v -e '-help.pd$$') $(OBJECTS_DST)/memento
+ install -d $(DOCS_DST)/memento
+ install -p $(ABSTRACTIONS_SRC)/rradical/memento/*-help.pd $(DOCS_DST)/memento
+ install -d $(MANUALS_DST)/memento
+ install -p $(ABSTRACTIONS_SRC)/rradical/memento/tutorial/*.* \
+ $(MANUALS_DST)/memento
+ install -d $(APPLICATIONS_DST)/memento_tutorial
+ install -p $(ABSTRACTIONS_SRC)/rradical/memento/examples/*.* \
+ $(APPLICATIONS_DST)/memento_tutorial
+
+#------------------------------------------------------------------------------#
+# CLEAN TARGETS
+#------------------------------------------------------------------------------#
+objects_clean:
+ -rm -rf $(OBJECTS_DST) $(DOCS_DST)
+
+applications_clean:
+ -rm -rf $(APPLICATIONS_DST)
+
+
+clean: applications_clean objects_clean
+ -rm -f *~
+ rm -rf $(MANUALS_DST)
+ rmdir $(DOCS_BASE) $(INSTALL_PREFIX)
+
+
+#------------------------------------------------------------------------------#
+# LEGACY TARGETS
+#------------------------------------------------------------------------------#
+# this is a legacy clean target to get rid of cruft
darwin_pkg_clean:
-sudo rm -Rf installroot/ $(PKG_PREFIX)*.pkg/
-rm -f $(PKG_NAME).info 1
-
-# install into MSP's default: /usr/local/lib
-
-darwin_pkg:
-# set up installroot dir
- -chmod a-x */*.pd */*/*.pd */*/*/*.pd
- test -d installroot/abstractions || mkdir -p installroot/abstractions
- cp -Rf footils timestretch vadsr~ installroot/abstractions/
- cp -f pd-abstractions.info $(PKG_NAME).info
-# delete cruft
- -find installroot -name .DS_Store -delete
- -sudo rm -Rf installroot/*/*/CVS installroot/*/*/*/CVS installroot/*/*/*/*/CVS
-# set proper permissions
- sudo chown -R root:staff installroot/*
- package installroot $(PKG_NAME).info -d . -ignoreDSStore
-# install pkg docs
- install -m 644 Welcome.html $(PKG_NAME).pkg/Contents/Resources
- sudo chown -R root:staff $(PKG_NAME).pkg/Contents/Resources
-
diff --git a/abstractions/README b/abstractions/README
index 35112717..d2ecf324 100644
--- a/abstractions/README
+++ b/abstractions/README
@@ -1,28 +1,87 @@
Collection of abstractions for Pd
=================================
-This is a collection of abstractions for Pd. Pd is a
-language that is very low-level. There are several
-concepts that need a certain amount of work in order
-to be implemented. Instead of reimplementing these higher
-level concepts again and again, this collection of abstractions
-try to establish a layer of Pd abstractions that should grow
-into a reusable library that can be shared by Pd users.
+This is a collection of abstractions for Pd. Pd is a language that is very
+low-level. There are several concepts that need a certain amount of work in
+order to be implemented. Instead of reimplementing these higher level concepts
+again and again, this collection of abstractions try to establish a layer of
+Pd abstractions that should grow into a reusable library that can be shared by
+Pd users.
+
+What kind of abstractions?
+==========================
+
+ One of the problems with organizing all this is the vague definition of
+ "abstraction" and "external". "application" and "object" are much more
+ useful distinctions. Therefore, there are two sections to the build system,
+ one for Pd patches which are objects, and another for Pd patches that are
+ "applications" (also examples, demos, etc.).
How to add your abstractions ?
==============================
-First rule for adding an abstraction is that it is written
-in Pd (without using externals).
+First rule for adding an abstraction is that it is written in Pd, without
+using externals whenever possible. Otherwise, it should work with the
+Pd-extended builds.
-You can either send your abstarction with the request for
-adding it to the pd-dev list, or if you are a Pd developer
-already, you can add them by yourself.
+You can either send your abstraction with the request for adding it to the
+pd-dev list, or if you are a Pd developer already, you can add them by
+yourself.
If you have questions about how, feel free to ask.
-I hope that we can come up with a style guide for abstractions
-at some point, but we need to gather experience how this should
-look like before.
+I hope that we can come up with a style guide for abstractions at some point,
+but we need to gather experience how this should look like before.
+
+Explanations of Terms
+=====================
+
+$(APPLICATIONS_DST):
+ If your project is an application or patch that is meant to be run
+ directly, then it should go into this directory in its own subdirectory.
+ This directory is a browsable collection of applications. If your
+ application has a lot of files associated with it, put a main patch and
+ have the extra files in a subdirectory. rradical/usecases/showcase is a
+ good example of this. This is the only place were mixed or upper case is
+ appropriate in directory names.
+
+$(OBJECTS_DST):
+ If your project consists of objects that are meant to be reused in other
+ patches rather than used as a application, then they should go into this
+ directory.
+
+ They should be in a directory with a distinct name. This will be the name
+ of your library of objects, which can be added to the path, or called
+ directly (e.g. [mylibrary/myobject]).
+
+ The subdirectory name (e.g. mylibrary) should always be all lowercase.
+
+$(DOCS_DST):
+ All help patches should go into this directory in a subdirectory with the
+ same nameas the subdirectory for your objects. For example, for
+ [mylibrary/myobject] above, the helpfile would be "mylibrary/myobject-help.pd".
+
+ The subdirectory name (e.g. mylibrary) should always be all lowercase.
+
+$(MANUALS_DST):
+ If you have any other kinds of documentation, like a text or HTML manual,
+ or a Pd-based tutorial, then it should go into this directory, again in a
+ subdirectory with the same name as the library or application. Using the
+ previous example again, the "mylibrary" manual would be
+ "mylibrary/mylibrary.html".
+
+ The subdirectory name (e.g. mylibrary) should always be all lowercase.
+
+"objects" target:
+ To add your objects to this build system, first make your own target and
+ add it to the "objects" target. For example: for the RRADical objects,
+ there is a target called "objects_rradical:" which does everything needed
+ to install the RRADical objects. This includes installing help patches
+ and any other documentation.
+
+"applications" target:
+ This target is meant for any patch that is intended to be opened up and
+ used, played, ran, etc. The RRADical showcase is a good example
+
+
-Guenter