aboutsummaryrefslogtreecommitdiff
path: root/abstractions/Makefile
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/Makefile
parent31dd5b16c5f2acd88e8957c929f98d7f26c3521d (diff)
first stab at a nice abstractions build system
svn path=/trunk/; revision=3925
Diffstat (limited to 'abstractions/Makefile')
-rw-r--r--abstractions/Makefile127
1 files changed, 102 insertions, 25 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
-