swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] Inclusion ?


From: Markus Stumpf
Subject: Re: [Swftools-common] Inclusion ?
Date: Mon, 19 Jan 2009 15:12:38 +0100
User-agent: Mutt/1.4.2.3i

On Mon, Jan 19, 2009 at 02:45:06PM +0100, Patrice wrote:
> I have a question, is there a "include" statement for swfc ? I have
> some ".as" files and its very ennoyed to copy/paste code into a big
> ".sc" file.

I don't know about the include statement in swfc, but you can always use
the "m4" macro processor that usually comes with every Unix/Linux system:

Add lines like
    include(filename.as)
to code.sc and then run
    $ m4 -I. code.sc > fullcode.sc

"-I." tells m4 to look for include files in the local directory.
If you have them elsewhere (e.g. n an "as" subdirectory) you could e.g.
use/add "-I./as"
    $ m4 -I. -I./as code.sc > fullcode.sc

You can even write a Makefile like
------------------------------------------------------------------------
AS_FILES = \
        file1.as        \
        file2.as        \
        file3.as        \
        file4.as        \
        as/file5.as     \
        as/file6.as

all: fullcode.sc

fullcode.sc: code.sc $(AS_FILES)
        m4 -I. code.sc > fullcode.sc
------------------------------------------------------------------------
There has to be a <TAB> in front of the "m4" line.

Now typing "make" will check is one/some of the files changed since the
last fullcode.sc was created and if that is so it will create a new
fullcode.sc.

Hope that helps,

        \Maex





reply via email to

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