[PD-dev] Makefile with recursive directories

Alexandre Quessy listes at sourcelibre.com
Mon Mar 26 07:53:03 CEST 2007


Something like this ?
----------------

all: pdmtl
PDMTL_NAME = pdmtl
abstractions_src = .
pdmtl_install:
	install	-d $(objectsdir)/$(PDMTL_NAME)
	install	-d $(helpdir)/$(PDMTL_NAME)
	for dir in `find $(abstractions_src)$(PDMTL_NAME) -type d | grep -v
'examples'`; do \
		install -d $(objectsdir)/$(PDMTL_NAME)/$$dir; \
		for f in `find $(abstractions_src)$(PDMTL_NAME)/$$dir -name '*.pd' |
grep -v '-help'`; do \
			install -p $$f $(objectsdir)/$(PDMTL_NAME)/$$dir; \
			done; \
		done; \
	for dir in `find $(abstractions_src)$(PDMTL_NAME) -type d`; do \
		install -d $(helpdir)/$(PDMTL_NAME)/$$dir; \
		for typ in '.mov' '.jpg' '.ttf' '.keys' '.wav' '-help.pd'; do \		
			for f in `find $(abstractions_src)$(PDMTL_NAME)/$$dir -name $$typ`; do \
				install -p $$f $(helpdir)/$(PDMTL_NAME)/$$dir; \
				done; \
			done; \
		done;







2007/3/23, Hans-Christoph Steiner <hans at eds.org>:
>
> Makefiles are largely tied to bourne shell scripts, so that would be
> the preferred scripting language with Makefiles.  You can write
> bourne shell code right into the Makefile.  For directory recursion
> or pattern matching, check out these files:
>
> externals/Makefile - $(wildcard ...) and $(shell sed ...)
> pd/src/makefile.in - for dir in $(shell ...)
>
> And others too
>
> .hc
>
> On Mar 22, 2007, at 2:57 AM, Alexandre Quessy wrote:
>
> > Hi all,
> > I want to add the pdmtl abstractions in the CVS. (I have a developper
> > account.) Our library uses  many directories so that our abstractions
> > names look like [generate/adsr~] and [seq/liner], for instance. Now,
> > having several directories that might (will) change over time makes it
> > a bit longer to write a Makefile entry to make it part of the
> > pd-extended build system. Is there somewhere a Makefile syntax to make
> > it automagic ? Otherwise, this could be a ($shell ) thing with a find
> > and a bunch of grep. Other solution : generate the makefile with a
> > Python script, for instance. Anyone has a quick solution for this ?
> >
> > Other point: I need to put this in the abstractions part of the CVS,
> > right ? I would rather put it in externals, but if you insist... ;)
> >
> > Thanks for helping. By the way, this structure is a kind of a proposal
> > for a system to classify externals and abstractions by what they do,
> > not by they author's name. See http://pdmtl.goto10.org for more infos.
> >
> > --
> > Alexandre Quessy
> > http://alexandre.quessy.net
> >
> > _______________________________________________
> > PD-dev mailing list
> > PD-dev at iem.at
> > http://lists.puredata.info/listinfo/pd-dev
>
>
>
> ------------------------------------------------------------------------
> ----
>
>                    ¡El pueblo unido jamás será vencido!
>
>
>


-- 
Alexandre Quessy
http://alexandre.quessy.net




More information about the Pd-dev mailing list