From 030d2eec4fd115d8fa54c32873095420ce30ccad Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 28 Nov 2005 06:46:18 +0000 Subject: - 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=4064 --- packages/Makefile | 142 +++++++++++---------- packages/Makefile.buildlayout | 51 +++++--- packages/TODO | 21 +-- packages/darwin_app/Makefile | 5 +- packages/linux_make/Makefile | 57 +++++++++ packages/linux_make/generate_install_makefile.bash | 79 ++++++++++++ packages/patches/build_vars_4_makefile.in.patch | 91 ++++++------- packages/win32_inno/Makefile | 7 +- 8 files changed, 305 insertions(+), 148 deletions(-) create mode 100755 packages/linux_make/Makefile create mode 100755 packages/linux_make/generate_install_makefile.bash diff --git a/packages/Makefile b/packages/Makefile index e98d3814..b149cc43 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -10,7 +10,7 @@ CWD := $(shell pwd) cvs_root_dir = $(CWD)/.. -prefix = $(cvs_root_dir)/packages/build +DESTDIR = $(CWD)/build BUILDLAYOUT_DIR = $(CWD) @@ -90,6 +90,7 @@ ZEXY_VERSION := $(shell grep VERSION $(externals_src)/zexy/src/zexy.h | \ # output to the same directory tree DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ cvs_root_dir=$(cvs_root_dir) \ + DESTDIR=$(DESTDIR) \ prefix=$(prefix) \ UNAME=$(UNAME) @@ -120,11 +121,11 @@ externals: # flext flext: # nusmuk - cd $(externals_src)/nusmuk/msd && $(externals_src)/grill/flext/build.sh \ + -cd $(externals_src)/nusmuk/msd && $(externals_src)/grill/flext/build.sh \ pd gcc - cd $(externals_src)/nusmuk/msd2D && $(externals_src)/grill/flext/build.sh \ + -cd $(externals_src)/nusmuk/msd2D && $(externals_src)/grill/flext/build.sh \ pd gcc - cd $(externals_src)/nusmuk/msd3D && $(externals_src)/grill/flext/build.sh \ + -cd $(externals_src)/nusmuk/msd3D && $(externals_src)/grill/flext/build.sh \ pd gcc #------------------------------------------------------------------------------ @@ -135,44 +136,31 @@ gem: #------------------------------------------------------------------------------ # pd -# pd's makefile has some of its own variables that need to be remapped -# this relies on patches/build_vars_4_makefile.in.patch -DESTDIR = "" -ifeq ($(OS_NAME),darwin) - libpddir = $(prefix) - libpdbindir = $(bindir) -else - ifeq ($(OS_NAME),win) - libpddir = $(prefix) - libpdbindir = $(bindir) - else - libpddir = $(prefix)/lib/pd - libpdbindir = $(libpddir)/bin - endif -endif - -PD_DEST_PATHS = $(DEST_PATHS) DESTDIR=$(DESTDIR) \ - libpddir=$(libpddir) \ - libpdbindir=$(libpdbindir) +# pd's makefile has some of its own variables that need to be remapped, +# this relies on patches/build_vars_4_makefile.in.patch. PD_CONFIGURE_FLAGS = -PD_EXTRA_FLAGS = +PD_BUILD_FLAGS = # Pd sometimes needs a specific autoconf, which is labeled differently on different # machines #PD_AUTOCONF := ${shell ( test -x "`which autoconf-2.59`" && echo autoconf-2.59 ) || echo autoconf } PD_AUTOCONF = autoconf - pd: - echo "OS_NAME $(OS_NAME)" - echo "DESTDIR $(DESTDIR) libpdbindir $(libpdbindir)" - echo "DEST_PATHS $(DEST_PATHS)" - echo "PD_DEST_PATHS $(PD_DEST_PATHS)" - echo "PD_EXTRA_FLAGS $(PD_EXTRA_FLAGS)" + @echo "OS_NAME $(OS_NAME)" + @echo "===================================================================" + @echo "DESTDIR $(DESTDIR) libpdbindir $(libpdbindir)" + @echo "===================================================================" + @echo "DEST_PATHS $(DEST_PATHS)" + @echo "===================================================================" + @echo "DEST_PATHS $(DEST_PATHS)" + @echo "===================================================================" + @echo "PD_BUILD_FLAGS $(PD_BUILD_FLAGS)" + @echo "===================================================================" -cd $(pd_src)/src/ && $(PD_AUTOCONF) -cd $(pd_src)/src && ./configure $(PD_CONFIGURE_FLAGS) && \ - make $(PD_DEST_PATHS) $(PD_EXTRA_FLAGS) + make $(DEST_PATHS) $(PD_BUILD_FLAGS) #==============================================================================# @@ -182,9 +170,9 @@ pd: #==============================================================================# # this is used for installing into a pre-build Pd binary -extended_install: abstractions_install doc_install externals_install \ -flext_install gem_install readme_install welcome_install license_install \ -noncvs_install +extended_install: abstractions_install doc_install extensions_install \ +externals_install flext_install gem_install readme_install welcome_install \ +license_install noncvs_install #------------------------------------------------------------------------------ @@ -203,12 +191,19 @@ doc_install: cd $(doc_src) && make $(DEST_PATHS) install +#------------------------------------------------------------------------------ +# extensions_install +extensions_install: + cd $(extensions_src) && make $(DEST_PATHS) install + + #------------------------------------------------------------------------------ # externals_install externals_install: cd $(externals_src) && make $(DEST_PATHS) install + #------------------------------------------------------------------------------ # flext_install flext_install: @@ -225,30 +220,30 @@ flext_install: # ( \ # cp buildsys/mac/pd/config-gcc.def buildsys/config-mac-pd-gcc.txt && \ # echo Copied template sys config file \ - ) \ - ) && \ - ( \ - cat buildsys/config-mac-pd-gcc.txt | \ - sed "s/^PDPATH=.*/PDPATH=..\/..\/..\/pd/" > buildsys/config-mac-pd-gcc.txt \ - ) && \ - ( \ - cat package.txt | sed "s/^PRECOMPILE=.*/PRECOMPILE=/" > package.txt \ - ) && \ - ( \ - cat buildsys/mac/pd/gnumake-gcc-ext.inc | \ - sed "s/^LDFLAG\S +=.*/LDFLAG\S += -bundle -bundle_loader ..\/..\/..\/pd\/bin\/pd/" > buildsys/mac/pd/gnumake-gcc-ext.inc \ - ) && \ - ( \ - cat buildsys/mac/pd/gnumake-gcc-flext.inc | \ - sed "s/^LDFLAG\S +=.*/LDFLAG\S += -dynamiclib -undefined dynamic_lookup /" > buildsys/mac/pd/gnumake-gcc-flext.inc \ - ) && \ - ( \ - test -f config.txt || \ - ( \ - cp -f build/config-mac.def config.txt && \ - echo Copied template flext config file \ - ) \ - ) && \ +# ) \ +# ) && \ +# ( \ +# cat buildsys/config-mac-pd-gcc.txt | \ +# sed "s/^PDPATH=.*/PDPATH=..\/..\/..\/pd/" > buildsys/config-mac-pd-gcc.txt \ +# ) && \ +# ( \ +# cat package.txt | sed "s/^PRECOMPILE=.*/PRECOMPILE=/" > package.txt \ +# ) && \ +# ( \ +# cat buildsys/mac/pd/gnumake-gcc-ext.inc | \ +# sed "s/^LDFLAG\S +=.*/LDFLAG\S += -bundle -bundle_loader ..\/..\/..\/pd\/bin\/pd/" > buildsys/mac/pd/gnumake-gcc-ext.inc \ +# ) && \ +# ( \ +# cat buildsys/mac/pd/gnumake-gcc-flext.inc | \ +# sed "s/^LDFLAG\S +=.*/LDFLAG\S += -dynamiclib -undefined dynamic_lookup /" > buildsys/mac/pd/gnumake-gcc-flext.inc \ +# ) && \ +# ( \ +# test -f config.txt || \ +# ( \ +# cp -f build/config-mac.def config.txt && \ +# echo Copied template flext config file \ +# ) \ +# ) && \ # MACOSX_DEPLOYMENT_TARGET=10.3 bash build.sh pd gcc build-release-shared FLEXTLIB=@executable_path/../extra FLEXTINC=../flext/source FLEXTSYS=$(objectsdir) # ln -sf $(externals_src)/grill/flext/pd-darwin/release-shared/libflext-pd.$(FLEXT_VERSION).dylib $(externals_src)/grill/flext/pd-darwin/release-shared/libflext-pd.dylib # install -p $(externals_src)/grill/flext/pd-darwin/release-shared/libflext-pd.$(FLEXT_VERSION).dylib $(objectsdir) @@ -260,9 +255,12 @@ flext_install: $(externals_src)/grill/flext/license.txt \ $(manualsdir)/flext # FLEXTERNALS -######### +#------------------------------------------------------------------------------# # dyn~ - -cd $(externals_src)/grill/dynext && bash ../flext/build.sh pd gcc build-release-shared FLEXTLIB=../flext/pd-darwin/release-shared FLEXTINC=../flext/source FLEXTSYS=$(objectsdir) +# -cd $(externals_src)/grill/dynext && \ +# bash ../flext/build.sh pd gcc build-release-shared \ +# FLEXTLIB=../flext/pd-darwin/release-shared \ +# FLEXTINC=../flext/source FLEXTSYS=$(objectsdir) -install -p $(externals_src)/grill/dynext/pd-darwin/release-shared/*.$(EXTENSION) $(objectsdir) install -p $(externals_src)/grill/dynext/pd/*.pd $(helpdir) install -d $(manualsdir)/dynext @@ -272,7 +270,7 @@ flext_install: $(manualsdir)/dynext ######### # pool - -cd $(externals_src)/grill/pool && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(objectsdir) FLEXTINC=../flext/source +# -cd $(externals_src)/grill/pool && bash ../flext/build.sh pd gcc build-release-shared FLEXTPREFIX=. FLEXTLIB=$(objectsdir) FLEXTINC=../flext/source -install -p $(externals_src)/grill/pool/pd-darwin/release-shared/*.$(EXTENSION) $(objectsdir) install -p $(externals_src)/grill/pool/pool-help.pd $(helpdir) install -d $(manualsdir)/pool @@ -381,7 +379,7 @@ noncvs_install: PD_NAME=Pd pd_install: pd cd $(pd_src)/src && \ - make $(PD_DEST_PATHS) $(PD_EXTRA_FLAGS) install + make $(DEST_PATHS) $(PD_BUILD_FLAGS) install install -d $(manualsdir)/$(PD_NAME) install -p $(pd_src)/src/notes.txt $(manualsdir)/$(PD_NAME) @@ -492,8 +490,8 @@ readme_install: # DOC_FORMAT doc_format: # clean out cruft files - -find $(prefix) -name .DS_Store -delete - -find $(prefix) -name '*.*.bak' -delete + -find $(DESTDIR) -name .DS_Store -delete + -find $(DESTDIR) -name '*.*.bak' -delete # run script to move help-*.pd files to *-help.pd according to the standard cd $(helpdir) && \ $(scripts_src)/convert-help-to-standard.sh @@ -580,7 +578,7 @@ gem_clean: pd_clean: - -cd $(pd_src) && make $(PD_DEST_PATHS) clean + -cd $(pd_src) && make $(DEST_PATHS) clean # these targets are all from Makefile.buildlayout: install_clean cruft_clean @@ -590,3 +588,17 @@ clean: gem_clean pd_clean distclean: clean cruft_clean + +test: + @echo "PD_VERSION: $(PD_VERSION)" + @echo "PACKAGE_VERSION: $(PACKAGE_VERSION)" + @echo "CWD $(CWD)" + @echo "DESTDIR $(DESTDIR)" + @echo "PREFIX $(prefix)" + @echo "BINDIR $(bindir)" + @echo "LIBDIR $(libdir)" + @echo "OBJECTSDIR $(objectsdir)" + @echo "PDDOCDIR $(pddocdir)" + @echo "HELPDIR $(helpdir)" + @echo "MANUALSDIR $(manualsdir)" + @echo "EXAMPLESDIR $(examplesdir)" diff --git a/packages/Makefile.buildlayout b/packages/Makefile.buildlayout index 10281088..5bc5f28b 100644 --- a/packages/Makefile.buildlayout +++ b/packages/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) #==============================================================================# # @@ -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/packages/TODO b/packages/TODO index cca144d0..7fe8857c 100644 --- a/packages/TODO +++ b/packages/TODO @@ -4,20 +4,8 @@ - fix scripts/checkout...sh. It doesn't cvs co into the newly created pure-data folder -- rename "applications" to "examples" - -- downcase *_DEST and *_SRC to be more readable - -- change CWD to packages_src where appropriate - -- add DESTDIR to the top of each Makefile - - test for configure before running autoconf/clean configure on distclean -- try including packages/Makefile in darwin_app/Makefile to see if I can run pacakges/makefile targets tehn - -- On GNU/Linux, figure out how to deal with build/extra vs. build/lib/pd/extra - - global optimization flags ideally, you would use a version of Pd that is fully optimized for your CPU. In order to do this, a system of optimization flags needs to be @@ -30,18 +18,11 @@ - mDNS objects! -- make standard targets: distclean (*~, etc.), installdirs (make just the - dirs), uninstall instead of install_clean +- make standard targets: distclean (*~, etc.), uninstall instead of install_clean - help menu - check up on this bug: Opening Help patches from "Pure Documentation" - - - make help menu function check if item exists before trying to make a - menu item so that it doesn't break pd.tk<->pd interaction (i.e. windows - titled x50bf90). (the recursive function might have fixed this) - - - port to Linux/Windows - Preferences diff --git a/packages/darwin_app/Makefile b/packages/darwin_app/Makefile index 607552c6..3039ab77 100644 --- a/packages/darwin_app/Makefile +++ b/packages/darwin_app/Makefile @@ -8,7 +8,7 @@ CWD := $(shell pwd) BUILD_BASE = $(CWD)/build PD_APP_NAME = $(PACKAGE_NAME) PD_APP_CONTENTS = $(BUILD_BASE)/$(PD_APP_NAME).app/Contents -prefix = $(PD_APP_CONTENTS)/Resources +DESTDIR = $(PD_APP_CONTENTS)/Resources cvs_root_dir = $(CWD)/../.. BUILDLAYOUT_DIR = $(CWD)/.. @@ -30,6 +30,7 @@ include $(BUILDLAYOUT_DIR)/Makefile.buildlayout DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ cvs_root_dir=$(cvs_root_dir) \ prefix=$(prefix) \ + DESTDIR=$(DESTDIR) \ UNAME=$(UNAME) install: darwin_app @@ -107,7 +108,7 @@ darwin_app_doc_format: cd $(pddocdir) && \ sed -i.bak 's/^\(\#N canvas [0-9]* [0-9]* [0-9]* [0-9]*\) 12/\1 10/' \ */*.pd */*/*.pd */*/*/*.pd - find $(prefix) -name '*.pd.bak' -delete + find $(DESTDIR) -name '*.pd.bak' -delete #==============================================================================# # diff --git a/packages/linux_make/Makefile b/packages/linux_make/Makefile new file mode 100755 index 00000000..8c81bb8a --- /dev/null +++ b/packages/linux_make/Makefile @@ -0,0 +1,57 @@ +# +# for making a tar.bz2 that installs using a Makefile +# +all: install + +CWD := $(shell pwd) + +DESTDIR = $(CWD)/build/ +cvs_root_dir = $(CWD)/../.. +BUILDLAYOUT_DIR = $(CWD)/.. + + +include $(BUILDLAYOUT_DIR)/Makefile.buildlayout + + +# these are sent to all of the various Makefiles so that they all copy their +# output to the same directory tree +DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ + cvs_root_dir=$(cvs_root_dir) \ + DESTDIR=$(DESTDIR) \ + prefix=$(prefix) \ + UNAME=$(UNAME) + + +install: + cd $(packages_src) && make $(DEST_PATHS) install + cd $(packages_src) && make $(DEST_PATHS) doc_format + @echo " " + @echo "linux_make install succeeded!" + +#==============================================================================# +# +## +# +#==============================================================================# + +PACKAGE_NAME = Pd-$(PD_VERSION)-$(PACKAGE_VERSION)-$(OS_NAME)-$(shell uname -m) +tarbz2: +# it is very hard to escape the $ in shell scripts so delete files + -rm -f -- $(helpdir)/iemabs/*\$$*.pd $(objectsdir)/iemabs/*\$$*.pd + -./generate_install_makefile.bash $(DESTDIR)$(prefix) > tarbz2Makefile + mv -i tarbz2Makefile $(DESTDIR)$(prefix)/Makefile + mv $(DESTDIR)$(prefix) $(DESTDIR)$(PACKAGE_NAME) + cd $(DESTDIR) && \ + tar cjf $(PACKAGE_NAME).tar.bz2 $(PACKAGE_NAME) + mv $(DESTDIR)$(PACKAGE_NAME) $(DESTDIR)$(prefix) + +#==============================================================================# +# +## CVS SOURCES +# +#==============================================================================# + +clean: + cd $(packages_src) && make $(DEST_PATHS) clean + + diff --git a/packages/linux_make/generate_install_makefile.bash b/packages/linux_make/generate_install_makefile.bash new file mode 100755 index 00000000..9cf87bc4 --- /dev/null +++ b/packages/linux_make/generate_install_makefile.bash @@ -0,0 +1,79 @@ +#!/bin/bash + +ROOT_DIR=`echo $1 | sed 's|/*$||'` +prefix=$2 + +if [ $# -ne 1 ]; then + echo "Usage: $0 ROOT_DIR" + exit; +fi + +SED=`echo sed "s|${ROOT_DIR}/||"` + +function print_file () +{ + local my_file=$1 + echo -e "\tinstall -p '$my_file' '\$(prefix)/$my_file'" +} + +function print_dir () +{ + echo -e "\tinstall -d -m0755 '\$(prefix)/$1'" +} + +function traverse_install_tree () +{ + for file in `\ls -1d $1/*`; do + local target=`echo $file | $SED` + if [ -d "$file" ]; then + print_dir "$target" + traverse_install_tree "$file" + elif [ -f "$file" ]; then + print_file "$target" +# else +# echo "MYSTERY FILE: $file" + fi + done +} + +function remove_file () +{ +# arg, $n-help.pd causes lots of problems +# local my_file=`echo $1 | sed 's|$|\\$|g'` + local my_file=$1 + echo -e "\trm -f -- '\$(prefix)/$my_file'" +} + +function remove_dir () +{ + echo -e "\t-rmdir '\$(prefix)/$1'" +} + +function uninstall_tree () +{ + for file in `\ls -1d $1/*`; do + local target=`echo $file | $SED` + if [ -d "$file" ]; then + uninstall_tree "$file" + remove_dir "$target" + elif [ -f "$file" ]; then + remove_file "$target" +# else +# echo "MYSTERY FILE: $file" + fi + done +} + + +echo "" +echo "prefix = /usr/local" +echo "" +echo "" +echo "install:" +traverse_install_tree $ROOT_DIR + +echo "" +echo "" +echo "" +echo "uninstall:" +uninstall_tree $ROOT_DIR diff --git a/packages/patches/build_vars_4_makefile.in.patch b/packages/patches/build_vars_4_makefile.in.patch index 47a43167..a6903173 100644 --- a/packages/patches/build_vars_4_makefile.in.patch +++ b/packages/patches/build_vars_4_makefile.in.patch @@ -4,36 +4,40 @@ RCS file: /cvsroot/pure-data/pd/src/makefile.in,v retrieving revision 1.5 diff -u -w -r1.5 makefile.in --- makefile.in 6 Nov 2004 16:07:33 -0000 1.5 -+++ makefile.in 26 Nov 2005 04:06:12 -0000 -@@ -5,8 +5,8 @@ ++++ makefile.in 28 Nov 2005 06:37:05 -0000 +@@ -5,10 +5,20 @@ EXT= @EXT@ GUINAME= @GUINAME@ -INSTALL_PREFIX = @prefix@ -GFLAGS = -DINSTALL_PREFIX=\"$(INSTALL_PREFIX)\" +- +-MANDIR = @mandir@ +prefix = @prefix@ ++exec_prefix = @exec_prefix@ ++bindir = @bindir@ ++includedir = @includedir@ ++libdir = @libdir@ ++mandir = @mandir@ ++ +GFLAGS = -DINSTALL_PREFIX=\"$(prefix)\" ++ ++# varibles to match packages/Makefile.buildlayout so that they can be easily ++# overridden when building Pd-extended builds. ++libpddir = $(libdir)/pd ++pddocdir = $(libpddir)/doc ++libpdbindir = $(libpddir)/bin - MANDIR = @mandir@ + MORECFLAGS = @MORECFLAGS@ -@@ -112,30 +112,49 @@ +@@ -112,30 +122,39 @@ cd ../extra/lrshift~;make @EXTERNTARGET@ cd ../extra/pique;make @EXTERNTARGET@ -INSTDIR = $(DESTDIR)/$(INSTALL_PREFIX) -MANINSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)/$(MANDIR) -+INSTDIR = $(DESTDIR)$(prefix) BINARYMODE=@binarymode@ -+# varibles to match packages/Makefile.buildlayout so that they can be easily -+# overridden when building extended builds. -+bindir = $(INSTDIR)/bin -+pddocdir = $(INSTDIR)/doc -+includedir = $(INSTDIR)/include -+libpddir = $(INSTDIR)/lib/pd -+libpdbindir = $(libpddir)/bin -+mandir = $(DESTDIR)$(MANDIR) -+ install: all - install -d $(INSTDIR)/lib/pd/bin - install $(BIN_DIR)/$(GUINAME) $(INSTDIR)/lib/pd/bin/$(GUINAME) @@ -44,26 +48,7 @@ diff -u -w -r1.5 makefile.in - install -m755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend - install -m755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive - cp -pr ../doc ../extra $(INSTDIR)/lib/pd/ -+ install -d $(libpdbindir) -+ install $(BIN_DIR)/$(GUINAME) $(libpdbindir)/$(GUINAME) -+ install $(BIN_DIR)/pd-watchdog $(libpdbindir)/pd-watchdog -+ install -m644 $(BIN_DIR)/pd.tk $(libpdbindir)/pd.tk -+ install -d $(bindir) -+ install $(BINARYMODE) $(PDEXEC) $(bindir)/pd -+ install -m755 $(BIN_DIR)/pdsend $(bindir)/pdsend -+ install -m755 $(BIN_DIR)/pdreceive $(bindir)/pdreceive -+ for dir in $(shell ls -1 ../doc | grep -v CVS); do \ -+ echo "installing $$dir"; \ -+ install -d $(pddocdir)/$$dir ; \ -+ install -p ../doc/$$dir/*.* $(pddocdir)/$$dir ; \ -+ done -+ for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \ -+ echo "installing 7.stuff/$$dir"; \ -+ install -d $(pddocdir)/7.stuff/$$dir ; \ -+ install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \ -+ done -+ cp -pr ../extra $(libpddir)/ - rm -f $(INSTDIR)/extra/*/*.o +- rm -f $(INSTDIR)/extra/*/*.o - install -d $(INSTDIR)/include - install -m644 m_pd.h $(INSTDIR)/include/m_pd.h - install -d $(MANINSTDIR)/man1 @@ -73,15 +58,35 @@ diff -u -w -r1.5 makefile.in - chmod 644 $(MANINSTDIR)/man1/pdsend.1.gz - gzip < ../man/pdreceive.1 > $(MANINSTDIR)/man1/pdreceive.1.gz - chmod 644 $(MANINSTDIR)/man1/pdreceive.1.gz -+ install -d $(includedir) -+ install -m644 m_pd.h $(includedir)/m_pd.h -+ install -d $(mandir)/man1 -+ gzip < ../man/pd.1 > $(mandir)/man1/pd.1.gz -+ chmod 644 $(mandir)/man1/pd.1.gz -+ gzip < ../man/pdsend.1 > $(mandir)/man1/pdsend.1.gz -+ chmod 644 $(mandir)/man1/pdsend.1.gz -+ gzip < ../man/pdreceive.1 > $(mandir)/man1/pdreceive.1.gz -+ chmod 644 $(mandir)/man1/pdreceive.1.gz ++ install -d $(DESTDIR)$(libpdbindir) ++ install $(BIN_DIR)/$(GUINAME) $(DESTDIR)$(libpdbindir)/$(GUINAME) ++ install $(BIN_DIR)/pd-watchdog $(DESTDIR)$(libpdbindir)/pd-watchdog ++ install -m644 $(BIN_DIR)/pd.tk $(DESTDIR)$(libpdbindir)/pd.tk ++ install -d $(DESTDIR)$(bindir) ++ install $(BINARYMODE) $(PDEXEC) $(DESTDIR)$(bindir)/pd ++ install -m755 $(BIN_DIR)/pdsend $(DESTDIR)$(bindir)/pdsend ++ install -m755 $(BIN_DIR)/pdreceive $(DESTDIR)$(bindir)/pdreceive ++ for dir in $(shell ls -1 ../doc | grep -v CVS); do \ ++ echo "installing $$dir"; \ ++ install -d $(DESTDIR)$(pddocdir)/$$dir ; \ ++ install -p ../doc/$$dir/*.* $(DESTDIR)$(pddocdir)/$$dir ; \ ++ done ++ for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \ ++ echo "installing 7.stuff/$$dir"; \ ++ install -d $(DESTDIR)$(pddocdir)/7.stuff/$$dir ; \ ++ install -p ../doc/7.stuff/$$dir/*.* $(DESTDIR)$(pddocdir)/7.stuff/$$dir ; \ ++ done ++ cp -pr ../extra $(DESTDIR)$(libpddir)/ ++ rm -f $(DESTDIR)$(libpddir)/extra/*/*.o ++ install -d $(DESTDIR)$(includedir) ++ install -m644 m_pd.h $(DESTDIR)$(includedir)/m_pd.h ++ install -d $(DESTDIR)$(mandir)/man1 ++ gzip < ../man/pd.1 > $(DESTDIR)$(mandir)/man1/pd.1.gz ++ chmod 644 $(DESTDIR)$(mandir)/man1/pd.1.gz ++ gzip < ../man/pdsend.1 > $(DESTDIR)$(mandir)/man1/pdsend.1.gz ++ chmod 644 $(DESTDIR)$(mandir)/man1/pdsend.1.gz ++ gzip < ../man/pdreceive.1 > $(DESTDIR)$(mandir)/man1/pdreceive.1.gz ++ chmod 644 $(DESTDIR)$(mandir)/man1/pdreceive.1.gz + @echo "Pd install succeeded." local-clean: diff --git a/packages/win32_inno/Makefile b/packages/win32_inno/Makefile index 192aa52d..c2919e70 100755 --- a/packages/win32_inno/Makefile +++ b/packages/win32_inno/Makefile @@ -5,7 +5,7 @@ all: install CWD := $(shell pwd) -prefix = $(CWD)/build +DESTDIR = $(CWD)/build cvs_root_dir = $(CWD)/../.. BUILDLAYOUT_DIR = $(CWD)/.. @@ -17,6 +17,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) \ UNAME=$(UNAME) @@ -26,7 +27,7 @@ PD_INNO_SETUP = pd-inno.iss install: $(PD_INNO_SETUP) cd $(packages_src) && make $(DEST_PATHS) extended_install cd .. && make $(DEST_PATHS) doc_format - install -p pd-settings.reg $(prefix) + install -p pd-settings.reg $(DESTDIR)$(prefix) @echo " " @echo "win32_inno install succeeded!" @@ -39,7 +40,7 @@ install: $(PD_INNO_SETUP) # since I can't get Pd to compile, here are some hacks to assemble a package # from binaries no_compile_hacks: - cp -a /c/Program\ Files/pd-0.38-4 $(prefix)/ + cp -a /c/Program\ Files/pd-0.38-4 $(DESTDIR)$(prefix)/ $(PD_INNO_SETUP): $(PD_INNO_SETUP).in @echo "Making Inno Setup file: $(PD_INNO_SETUP)" -- cgit v1.2.1