aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-28 06:54:19 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-28 06:54:19 +0000
commit8bdf80c000c87bdab993292ec0d995e51d4b61fc (patch)
treec0bab08aaac071bad8da9b449cb3cb2a1b40f4d0
parentc6102e81254e2ecd8286a58aa847bf2570c265aa (diff)
- finally got a Linux Pd-extended release out, RC5
- built a tar.bz2 package maker with a generated Makefile for installing and uninstalling - switched all Makefiles to follow GNU $(DESTDIR)/$(prefix) standards svn path=/trunk/; revision=4066
-rw-r--r--doc/Makefile2
-rw-r--r--doc/Makefile.buildlayout57
-rw-r--r--externals/Makefile3
-rw-r--r--externals/Makefile.buildlayout57
4 files changed, 81 insertions, 38 deletions
diff --git a/doc/Makefile b/doc/Makefile
index af7e396a..003d0185 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -11,7 +11,7 @@ CWD := $(shell pwd)
# these are designed to be overridden by the packages/Makefile
cvs_root_dir = $(CWD)/..
-prefix = build
+DESTDIR = $(CWD)/build/
BUILDLAYOUT_DIR = $(CWD)
# default target
diff --git a/doc/Makefile.buildlayout b/doc/Makefile.buildlayout
index 4e386afc..5bc5f28b 100644
--- a/doc/Makefile.buildlayout
+++ b/doc/Makefile.buildlayout
@@ -40,6 +40,7 @@ UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
OS_NAME = linux
EXTENSION = pd_linux
+ prefix = /usr/local
else
ifeq ($(UNAME),Darwin)
OS_NAME = darwin
@@ -75,13 +76,25 @@ scripts_src = $(cvs_root_dir)/scripts
# destinations
+bindir = $(DESTDIR)$(prefix)/bin
+includedir = $(DESTDIR)$(prefix)/include
+libdir = $(DESTDIR)$(prefix)/lib
+mandir = $(DESTDIR)$(prefix)/man
+
+ifeq ($(OS_NAME),darwin)
+ objectsdir = $(DESTDIR)$(prefix)/extra
+ pddocdir = $(DESTDIR)$(prefix)/doc
+ else
+ ifeq ($(OS_NAME),win)
+ objectsdir = $(DESTDIR)$(prefix)/extra
+ pddocdir = $(DESTDIR)$(prefix)/doc
+ else
+ objectsdir = $(libdir)/pd/extra
+ pddocdir = $(libdir)/pd/doc
+ endif
+endif
+
examplesdir = $(pddocdir)/examples
-bindir = $(prefix)/bin
-pddocdir = $(prefix)/doc
-includedir = $(prefix)/include
-libdir = $(prefix)/lib
-mandir = $(prefix)/man
-objectsdir = $(prefix)/extra
helpdir = $(pddocdir)/5.reference
manualsdir = $(pddocdir)/manuals
@@ -93,24 +106,31 @@ manualsdir = $(pddocdir)/manuals
#==============================================================================#
# first make sure that the directory structure is setup
-$(prefix):
- install -d $(prefix)
+$(DESTDIR):
+ install -d $(DESTDIR)
+
+$(bindir): $(DESTDIR)
+ install -d $(bindir)
-$(examplesdir): $(prefix)
+$(examplesdir): $(DESTDIR)
install -d $(examplesdir)
-$(pddocdir): $(prefix)
+$(includedir): $(DESTDIR)
+ install -d $(includedir)
+
+$(pddocdir): $(DESTDIR)
install -d $(pddocdir)
-$(helpdir): $(prefix)
+$(helpdir): $(DESTDIR)
install -d $(helpdir)
-$(manualsdir): $(prefix)
+$(manualsdir): $(DESTDIR)
install -d $(manualsdir)
-$(objectsdir): $(prefix)
+$(objectsdir): $(DESTDIR)
install -d $(objectsdir)
+installdirs: $(DESTDIR) $(bindir) $(examplesdir) $(pddocdir) $(includedir) $(helpdir) $(manualsdir) $(objectsdir)
#==============================================================================#
#
@@ -120,11 +140,11 @@ $(objectsdir): $(prefix)
PD_MAJOR_VERSION := $(shell grep 'Pd version' $(pd_src)/src/s_main.c | \
- sed 's/char pd_version\[\] = "Pd version \([0-9]\)\.[0-9]*[. TES-]*[0-9]*[0-9extndRC.-]*\\n";/\1/')
+ sed 's/char pd_version\[\] = "Pd version \([0-9]\)\.[0-9]*[. TES-]*[0-9]*[0-9extndRC.-]*.n";/\1/')
PD_MINOR_VERSION := $(shell grep 'Pd version' $(pd_src)/src/s_main.c | \
- sed 's/char pd_version\[\] = "Pd version [0-9]\.\([0-9]*\)[. TES-]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/')
+ sed 's/char pd_version\[\] = "Pd version [0-9]\.\([0-9]*\)[. TES-]*\([0-9]*\)[0-9extndRC.-]*.n";/\1/')
PD_BUGFIX_VERSION := $(shell grep 'Pd version' $(pd_src)/src/s_main.c | \
- sed 's/char pd_version\[\] = "Pd version [0-9]\.[0-9]*[. TES-]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/')
+ sed 's/char pd_version\[\] = "Pd version [0-9]\.[0-9]*[. TES-]*\([0-9]*\)[0-9extndRC.-]*.n";/\1/')
# the separators [.-] need to be the same as in s_main.c or the regexps break
PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION)
@@ -184,9 +204,10 @@ objects_clean:
install_clean: applications_clean help_clean manuals_clean objects_clean
-rmdir $(pddocdir)
- -rmdir $(prefix)
+ -rmdir $(DESTDIR)$(prefix)
+ -rmdir $(DESTDIR)
@echo " "
- @echo "Build destination cleaned: $(prefix)"
+ @echo "Build destination cleaned: $(DESTDIR)"
cruft_clean:
diff --git a/externals/Makefile b/externals/Makefile
index 5fcee3ba..8aa76724 100644
--- a/externals/Makefile
+++ b/externals/Makefile
@@ -12,7 +12,7 @@ CWD := $(shell pwd)
# these are setup to be overridden by the packages/Makefile
cvs_root_dir = $(CWD)/..
-prefix = $(CWD)/build
+DESTDIR = $(CWD)/build/
BUILDLAYOUT_DIR = $(CWD)
# default target
@@ -28,6 +28,7 @@ include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
# output to the same directory tree
DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \
cvs_root_dir=$(cvs_root_dir) \
+ DESTDIR=$(DESTDIR) \
prefix=$(prefix)
#==============================================================================#
diff --git a/externals/Makefile.buildlayout b/externals/Makefile.buildlayout
index 4e386afc..5bc5f28b 100644
--- a/externals/Makefile.buildlayout
+++ b/externals/Makefile.buildlayout
@@ -40,6 +40,7 @@ UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
OS_NAME = linux
EXTENSION = pd_linux
+ prefix = /usr/local
else
ifeq ($(UNAME),Darwin)
OS_NAME = darwin
@@ -75,13 +76,25 @@ scripts_src = $(cvs_root_dir)/scripts
# destinations
+bindir = $(DESTDIR)$(prefix)/bin
+includedir = $(DESTDIR)$(prefix)/include
+libdir = $(DESTDIR)$(prefix)/lib
+mandir = $(DESTDIR)$(prefix)/man
+
+ifeq ($(OS_NAME),darwin)
+ objectsdir = $(DESTDIR)$(prefix)/extra
+ pddocdir = $(DESTDIR)$(prefix)/doc
+ else
+ ifeq ($(OS_NAME),win)
+ objectsdir = $(DESTDIR)$(prefix)/extra
+ pddocdir = $(DESTDIR)$(prefix)/doc
+ else
+ objectsdir = $(libdir)/pd/extra
+ pddocdir = $(libdir)/pd/doc
+ endif
+endif
+
examplesdir = $(pddocdir)/examples
-bindir = $(prefix)/bin
-pddocdir = $(prefix)/doc
-includedir = $(prefix)/include
-libdir = $(prefix)/lib
-mandir = $(prefix)/man
-objectsdir = $(prefix)/extra
helpdir = $(pddocdir)/5.reference
manualsdir = $(pddocdir)/manuals
@@ -93,24 +106,31 @@ manualsdir = $(pddocdir)/manuals
#==============================================================================#
# first make sure that the directory structure is setup
-$(prefix):
- install -d $(prefix)
+$(DESTDIR):
+ install -d $(DESTDIR)
+
+$(bindir): $(DESTDIR)
+ install -d $(bindir)
-$(examplesdir): $(prefix)
+$(examplesdir): $(DESTDIR)
install -d $(examplesdir)
-$(pddocdir): $(prefix)
+$(includedir): $(DESTDIR)
+ install -d $(includedir)
+
+$(pddocdir): $(DESTDIR)
install -d $(pddocdir)
-$(helpdir): $(prefix)
+$(helpdir): $(DESTDIR)
install -d $(helpdir)
-$(manualsdir): $(prefix)
+$(manualsdir): $(DESTDIR)
install -d $(manualsdir)
-$(objectsdir): $(prefix)
+$(objectsdir): $(DESTDIR)
install -d $(objectsdir)
+installdirs: $(DESTDIR) $(bindir) $(examplesdir) $(pddocdir) $(includedir) $(helpdir) $(manualsdir) $(objectsdir)
#==============================================================================#
#
@@ -120,11 +140,11 @@ $(objectsdir): $(prefix)
PD_MAJOR_VERSION := $(shell grep 'Pd version' $(pd_src)/src/s_main.c | \
- sed 's/char pd_version\[\] = "Pd version \([0-9]\)\.[0-9]*[. TES-]*[0-9]*[0-9extndRC.-]*\\n";/\1/')
+ sed 's/char pd_version\[\] = "Pd version \([0-9]\)\.[0-9]*[. TES-]*[0-9]*[0-9extndRC.-]*.n";/\1/')
PD_MINOR_VERSION := $(shell grep 'Pd version' $(pd_src)/src/s_main.c | \
- sed 's/char pd_version\[\] = "Pd version [0-9]\.\([0-9]*\)[. TES-]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/')
+ sed 's/char pd_version\[\] = "Pd version [0-9]\.\([0-9]*\)[. TES-]*\([0-9]*\)[0-9extndRC.-]*.n";/\1/')
PD_BUGFIX_VERSION := $(shell grep 'Pd version' $(pd_src)/src/s_main.c | \
- sed 's/char pd_version\[\] = "Pd version [0-9]\.[0-9]*[. TES-]*\([0-9]*\)[0-9extndRC.-]*\\n";/\1/')
+ sed 's/char pd_version\[\] = "Pd version [0-9]\.[0-9]*[. TES-]*\([0-9]*\)[0-9extndRC.-]*.n";/\1/')
# the separators [.-] need to be the same as in s_main.c or the regexps break
PD_VERSION = $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION)
@@ -184,9 +204,10 @@ objects_clean:
install_clean: applications_clean help_clean manuals_clean objects_clean
-rmdir $(pddocdir)
- -rmdir $(prefix)
+ -rmdir $(DESTDIR)$(prefix)
+ -rmdir $(DESTDIR)
@echo " "
- @echo "Build destination cleaned: $(prefix)"
+ @echo "Build destination cleaned: $(DESTDIR)"
cruft_clean: