[PD-cvs] doc Makefile.buildlayout, NONE, 1.1 TODO, NONE, 1.1 Makefile, 1.5, 1.6

Hans-Christoph Steiner eighthave at users.sourceforge.net
Mon Nov 21 05:39:04 CET 2005


Update of /cvsroot/pure-data/doc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7571

Modified Files:
	Makefile 
Added Files:
	Makefile.buildlayout TODO 
Log Message:

Lots of changes, got the first complete(-ish) build with the new extended
build system.  I left as much of the old functionality in place as possible,
definitely were it was being used.  But there are some changes that break
backwards compatibility, thought they should be noticed by few, and be easy to
fix going forward.

Some highlights:

 - centralized patch system (packages/patches with targets patch_pd and
   unpatch_pd)

 - easily redirected builds, using INSTALL_PREFIX and all of the *_DEST
   variables.  This makes building packages like Pd.app, .deb, .rpm,
   etc. much easier.

 - libdir format: basically a libdir is a directory that has both the objects
   and the help files together in one folder.  It can be added using -lib or
   the StartUp preferences, or you can access them via geiger namespaces,
   i.e. [mylibrary/myobject].

 - special characters allow in setup function/file names for objects.  This
   makes objects like [||~] possible without having to be in a library.  Now
   they can be either .pd files or individual .pd_darwin files (thanks
   IOhannes for the patch).


--- NEW FILE: Makefile.buildlayout ---
#==============================================================================#
#
# Centralized cross-platform build system Makefile.buildsystem
#
# this file contains all the common locations and targets
#  <hans at at.or.at>
#
#==============================================================================#
# This file should be exactly the same in each section of the CVS.  A copy is
# kept in each section of the CVS so that each section will be self-contained.
# To use it, you need to include it in your Makefile (i.e. "include
# Makefile.buildlayout") and then define $(INSTALL_PREFIX) and $(SRC_ROOT_DIR).
#
# $(SRC_ROOT_DIR) is the base directory of src tree, equivalent to the root
# level of the pure-data CVS.
#
# $(INSTALL_PREFIX) is the base directory to where all of the resulting files
# will be copied.
#
# This file is currently located in these places: 
#	  abstractions
#	  externals/build
# 	  packages
#
# it will be going here too:
#    doc
#    extensions
#    gem
#    pd
#
# <hans at at.or.at>

#==============================================================================#
#
## PLATFORM-SPECIFIC SETTINGS
#
#==============================================================================#
# which OS to compile for
UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
  OS_NAME = linux
  EXTENSION = pd_linux
else 
  ifeq ($(UNAME),Darwin)
    OS_NAME = darwin
    EXTENSION = pd_darwin
  else
    ifeq (MINGW,$(findstring MINGW,$(UNAME)))
      OS_NAME = win
      EXTENSION = dll
    else
      OS_NAME = unknown
      EXTENSION = so
      $(warning WARNING: unknown environment "$(UNAME)".)
    endif
  endif
endif


#==============================================================================#
#
# DIRECTORY STRUCTURE
#
#==============================================================================#

# sources
ABSTRACTIONS_SRC = $(SRC_ROOT_DIR)/abstractions
DOC_SRC = $(SRC_ROOT_DIR)/doc
EXTERNALS_SRC = $(SRC_ROOT_DIR)/externals
FLEXT_SRC = $(SRC_ROOT_DIR)/externals/grill/flext
GEM_SRC = $(SRC_ROOT_DIR)/Gem
GEMLIBS_SRC = $(SRC_ROOT_DIR)/GemLibs
PACKAGES_SRC = $(SRC_ROOT_DIR)/packages
PD_SRC = $(SRC_ROOT_DIR)/pd
SCRIPTS_SRC = $(SRC_ROOT_DIR)/scripts


# destinations
APPLICATIONS_DEST = $(DOCS_DEST)/examples
BIN_DEST = $(INSTALL_PREFIX)/bin
DOCS_DEST = $(INSTALL_PREFIX)/doc
INCLUDE_DEST = $(INSTALL_PREFIX)/include
LIB_DEST = $(INSTALL_PREFIX)/lib
MAN_DEST = $(INSTALL_PREFIX)/man
OBJECTS_DEST = $(INSTALL_PREFIX)/extra
HELP_DEST = $(DOCS_DEST)/5.reference
MANUALS_DEST = $(DOCS_DEST)/manuals


#==============================================================================#
#
# DIRECTORY STRUCTURE TARGETS
#
#==============================================================================#

# first make sure that the directory structure is setup
$(INSTALL_PREFIX):
	install -d $(INSTALL_PREFIX)

$(APPLICATIONS_DEST):  $(INSTALL_PREFIX)
	install -d $(APPLICATIONS_DEST)

$(DOCS_DEST): $(INSTALL_PREFIX)
	install -d $(DOCS_DEST)

$(HELP_DEST): $(INSTALL_PREFIX)
	install -d $(HELP_DEST)

$(MANUALS_DEST): $(INSTALL_PREFIX)
	install -d $(MANUALS_DEST)

$(OBJECTS_DEST): $(INSTALL_PREFIX)
	install -d $(OBJECTS_DEST)


#==============================================================================#
#
# CLEAN TARGETS
#
#==============================================================================#

applications_clean:
	-rm -f -- $(APPLICATIONS_DEST)/*/*/*/*/*.*
	-rm -f -- $(APPLICATIONS_DEST)/*/*/*/*.*
	-rm -f -- $(APPLICATIONS_DEST)/*/*/*.*
	-rm -f -- $(APPLICATIONS_DEST)/*/*.*
	-rmdir $(APPLICATIONS_DEST)/*/*/*/*
	-rmdir $(APPLICATIONS_DEST)/*/*/*
	-rmdir $(APPLICATIONS_DEST)/*/*
	-rmdir $(APPLICATIONS_DEST)/*
	-rmdir $(APPLICATIONS_DEST)


help_clean:
	-rm -f -- $(HELP_DEST)/*/*/*.*
	-rm -f -- $(HELP_DEST)/*/*.*
	-rm -f -- $(HELP_DEST)/*.*
	-rmdir $(HELP_DEST)/*/*
	-rmdir $(HELP_DEST)/*
	-rmdir $(HELP_DEST)


manuals_clean:
	-rm -f -- $(MANUALS_DEST)/*/*/*.*
	-rm -f -- $(MANUALS_DEST)/*/*.*
	-rmdir $(MANUALS_DEST)/*/*
	-rmdir $(MANUALS_DEST)/*
	-rmdir $(MANUALS_DEST)


objects_clean:
	-rm $(OBJECTS_DEST)/*/*/*.pd
	-rm $(OBJECTS_DEST)/*/*.pd
	-rm $(OBJECTS_DEST)/*.pd
	-rm $(OBJECTS_DEST)/*/*/*.$(EXTENSION)
	-rm $(OBJECTS_DEST)/*/*.$(EXTENSION)
	-rm $(OBJECTS_DEST)/*.$(EXTENSION)
	-rmdir $(OBJECTS_DEST)/*/*
	-rmdir $(OBJECTS_DEST)/*
	-rmdir $(OBJECTS_DEST)


install_clean: applications_clean help_clean manuals_clean objects_clean
	-rmdir $(DOCS_DEST)
	-rmdir $(INSTALL_PREFIX)
	@echo " "
	@echo "Build destination cleaned: $(INSTALL_PREFIX)"


cruft_clean:
# emacs litter
	-rm -f -- */*/*/*/*.*~
	-rm -f -- */*/*/*.*~
	-rm -f -- */*/*.*~
	-rm -f -- */*.*~
	-rm -f -- *.*~
	-rm -f -- Makefile~ Makefile.buildlayout~
# sed replace litter
	-rm -f -- */*/*/*/*.*.bak
	-rm -f -- */*/*/*.*.bak
	-rm -f -- */*/*.*.bak
	-rm -f -- */*.*.bak
	-rm -f -- *.*.bak
# autoconf cache
	-rm -rf -- */*/*/*/autom4te.cache
	-rm -rf -- */*/*/autom4te.cache
	-rm -rf -- */*/autom4te.cache
	-rm -rf -- */autom4te.cache
	-rm -rf -- autom4te.cache



Index: Makefile
===================================================================
RCS file: /cvsroot/pure-data/doc/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Makefile	15 Jan 2004 03:24:32 -0000	1.5
--- Makefile	21 Nov 2005 04:39:02 -0000	1.6
***************
*** 1,42 ****
! # Created by Hans-Christoph Steiner <hans at eds.org> to generate MacOS X packages
! # This Makefile does not generate a PDDP pkg, PDDP has its own Makefile
! 
! current: darwin_pkg
! 
! PACKAGE_VERSION = $(shell date +20%y.%m.%d)
! PACKAGE_PREFIX = pd-doc
! PACKAGE_NAME = $(PACKAGE_PREFIX)-$(PACKAGE_VERSION)
! 
! darwin_pkg_license:
!   # generate HTML version of License
! # 	echo "<HTML><BODY><FONT SIZE="-1">" > License.html
! # 	cat ../../creb/COPYING | sed -e 's/^$$/\<P\>/g' >> License.html	
! # 	echo "</FONT></BODY></HTML>" >> License.html
! 
! darwin_pkg_welcome:
! # generate Welcome.html from ../README.txt
! 
! darwin_pkg_clean:
! 	-sudo rm -Rf installroot/ $(PACKAGE_PREFIX)*.pkg/
! 	-rm -f $(PACKAGE_PREFIX)-*.info 1 License.html Welcome.???*
! 
! # install into MSP's default: /usr/local/lib
! 
! darwin_pkg: darwin_pkg_clean darwin_pkg_license darwin_pkg_welcome
! # set up installroot dir
! 	-chmod a-x */*/*.pd */*/*/*.pd */*/*/*/*.pd
! 	test -d installroot/pd/doc/7.stuff || mkdir -p installroot/pd/doc/7.stuff
! 	cp -R tutorials installroot/pd/doc/
! 	cp -R additional/pd-msg installroot/pd/doc/7.stuff/
! 	cp -f pd-doc.info $(PACKAGE_NAME).info
! # delete cruft
! 	-find installroot -name .DS_Store -delete
! 	-sudo rm -Rf installroot/*/*/*/CVS installroot/*/*/*/*/CVS  installroot/*/*/*/*/*/CVS
! 	-rm -f 1
! # set proper permissions
! 	sudo chown -R root:staff installroot
! 	package installroot $(PACKAGE_NAME).info -d . -ignoreDSStore
! # install pkg docs
! #	install -m 644 License.html $(PACKAGE_NAME).pkg/Contents/Resources
! 	sudo chown -R root:staff $(PACKAGE_NAME).pkg/Contents/Resources
! 
--- 1,104 ----
! #==============================================================================#
! #
! # Centralized build system for "doc".  
! #
! # see for instructions: http://puredata.org/docs/developer/build
! #  <hans at at.or.at>
! #
! #==============================================================================#
! 
! CWD := $(shell pwd)
! 
! # these are designed to be overridden by the packages/Makefile
! SRC_ROOT_DIR = $(CWD)/..
! INSTALL_PREFIX = build
! BUILDLAYOUT_DIR = $(CWD)
! 
! # default target
! all:
! 	@echo "this currently does nothing"
! 
! include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
! 
! #==============================================================================#
! #
! # OVERARCHING BUILD TARGETS
! #
! #==============================================================================#
! 
! # clean up after everything is installed
! final_setup:
! 	chmod -R ugo-w $(DOCS_DEST)
! 
! install: pd-msg_install pddp_install tutorials_install
! 	@echo " "
! 	@echo "doc install succeeded!"
! 
! #==============================================================================#
! #
! # PROJECT-SPECIFIC TARGETS
! #
! #==============================================================================#
! 
! #------------------------------------------------------------------------------#
! # PD-MSG
! PD-MSG_NAME = pd-msg
! pd-msg_install: $(MANUALS_DEST)
! 	install -d $(MANUALS_DEST)/$(PD-MSG_NAME)
! 	install -p $(DOC_SRC)/additional/pd-msg/*.txt \
! 		$(MANUALS_DEST)/$(PD-MSG_NAME) 
! 	for dir in $(shell cd  $(DOC_SRC)/additional/pd-msg && ls -d [1-5].*); do \
! 		echo "Including $$dir in $(PD-MSG_NAME)"; \
! 		install -d $(MANUALS_DEST)/$(PD-MSG_NAME)/$$dir; \
! 		install -p $(DOC_SRC)/additional/pd-msg/$$dir/*.* \
! 			$(MANUALS_DEST)/$(PD-MSG_NAME)/$$dir; \
! 	done
! 
! 
! #------------------------------------------------------------------------------#
! # PDDP
! pddp_install: $(HELP_DEST)
! 	install -p $(DOC_SRC)/pddp/*.pd $(HELP_DEST)
! # this file is used in key-help.pd
! 	install -p $(DOC_SRC)/pddp/keyboard_fun.txt $(HELP_DEST)
! 
! 
! #------------------------------------------------------------------------------#
! # TUTORIALS
! tutorials_install: $(MANUALS_DEST)
! # pddrums
! 	install -d $(MANUALS_DEST)/PdDrums
! 	install -p $(DOC_SRC)/tutorials/footils/pddrums/*.* $(MANUALS_DEST)/PdDrums
! # playnow
! 	install -d $(MANUALS_DEST)/PlayNow
! 	install -p $(DOC_SRC)/tutorials/playnow/*.pd $(MANUALS_DEST)/PlayNow
! 	install -p $(DOC_SRC)/tutorials/playnow/*.mid $(MANUALS_DEST)/PlayNow
! 
! 
! #==============================================================================#
! #
! # DEVELOPER'S TARGETS
! #
! #==============================================================================#
! 
! # make the symlinks necessary to simulate the installed environment
! devsymlinks:
! 	ln -s $(PD_SRC)/doc/2.control.examples $(DOC_SRC)/2.control.examples
! 	ln -s $(PD_SRC)/doc/3.audio.examples $(DOC_SRC)/3.audio.examples
! # pd <= 0.38-4 has 4.fft.examples
! 	ln -s $(PD_SRC)/doc/4.fft.examples $(DOC_SRC)/4.fft.examples
! # pd > 0.38-4 has 4.data.structures
! 	ln -s $(PD_SRC)/doc/4.data.structures $(DOC_SRC)/4.data.structures
! 	ln -s $(PD_SRC)/doc/7.stuff $(DOC_SRC)/7.stuff
! 	ln -s $(PD_SRC)/doc/sound $(DOC_SRC)/sound
! 
! #==============================================================================#
! #
! # CLEAN TARGETS
! #
! #==============================================================================#
! 
! # the destination-specific clean targets are in Makefile.buildlayout
! clean: install_clean
! 
! distclean: clean cruft_clean

--- NEW FILE: TODO ---

- create Makefile for Pd-extended build system

- add pd-fileformat doc: http://student-kmt.hku.nl/%7Etjeerd/pd/pd_fileformat.html





More information about the Pd-cvs mailing list