On 2007-07-22 13:45:26 (+0100), Martin Knappe <[EMAIL PROTECTED]> 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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to