help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Perquisite search in sub-tree of undefined length.


From: Daniel Aleksandrow
Subject: Perquisite search in sub-tree of undefined length.
Date: Sat, 22 Jan 2005 15:29:29 +0800

I'm trying to create a makefile for the data files of a GPL'd game
<http://vegastrike.sourceforge.net> that can also be applied 'as is' to
various mods.

The problem is that although it can be assumed that each directory in
the root data directory is common, any tree structure deeper than this
is specific to each mod.  The file types in each subtree will also be
common.

I was unable to see a way of using vpath to recursively search the
(undefined) tree structure, so I decided to try and use find.  But, my
attempts at this solution do not work, always ending with the error:

make: *** No rule to make target ``find', needed by `mission.pk3'.
Stop.

So far, I am trying to recursively search the misison/ directory in the
root data dir.  It only contains .mission files, but in an arbitrary
directory structure.

Any help with this solution, or perhaps finding a better solution, will
be greatly appreciated :-)

Thanks

Daniel A.


The makefile:
-----------------------------
all : mission.pk3 ai.pk3 communications.pk3

A=`find mission/ -name "*.mission" | xargs echo`
mission.pk3 : $(A)
        cd mission/; /usr/bin/zip -0 ../$@ $(subst mission/,,$^)

ai.pk3 : ai/*.csv ai/events/*.xml ai/script/*.xml ai/script/*.xai
        cd ai/; /usr/bin/zip -0 ../$@ $(subst ai/,,$^)

-----------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]