[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: output of a command
From: |
Kristof Provost |
Subject: |
Re: output of a command |
Date: |
Sun, 22 Jul 2007 15:41:20 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On 2007-07-22 13:45:26 (+0100), Martin Knappe <address@hidden> wrote:
> Hi
> Im really stuck here, hope someone can help me:
>
> Suppose I want to write a makefile with target "all"
> the command sequence for building "all" is as follows:
>
> -first, file "foo1.asm" should be compiled to "foo1.bin"
> -then, file foo2.asm should be compiled to foo2.bin: in the sourcefile
> "foo2.asm", the environment variable FOO is referenced, and must contain
> the size of "foo1.bin" IN BYTES..i have tried for 2 days now and i cant
> get it working :-( how can i set this environment variable for the
> second compilation?
> -after that, the file "binarydisk.bin" shall be built by placing the
> content of "foo1.bin" at the start of it, and then placing "foo2.bin" in
> "binarydisk.bin":
>
> -at sector X / Y, if X % sextorsize = 0
> -at sector X / Y + 1, if X % sectorsize <> 0
>
> ...where X is the size of foo1.bin in bytes and Y is the sectorsize in bytes
>
> please help
>
> thanks
>
> martin
Hi,
Each command make executes is run in it's own shell, so you won't be
able to pass environment variables between commands.
Just write the size of foo1.bin to a file and use that file to build
foo2.asm. This way you can add the correct dependencies between the
files too.
Kristof