[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: flushing output in make
From: |
ma |
Subject: |
Re: flushing output in make |
Date: |
Mon, 17 Jul 2006 21:22:06 +0100 |
>
> This is an automatically generated makefile? Why not split the object
> names among several variables when the makefile is generated and then
> repeat the commands for each variable as necessary, ala:
>
> rtLibModules0 = ...
> rtLibModules1 = ...
>
> rtlib.lib $(rtLibModules0) $(rtLibModules1) ...
> @echo Building $@, please wait
> rm -f address@hidden
> $(AR) -qur address@hidden $(rtLibModules0)
> $(AR) -qur address@hidden $(rtLibModules1)
> ...etc
> mv address@hidden $@
>
> Other options that come to mind include
> - break the library into multiple smaller libraries
> - drop the echo as superfluous: when the make output pauses you
> know its building the library. Don't you have better things to be
> doing that watching compilations?
> - stop using an OS or tools which impose limits lower than you like
>
>
>> As I am working on an add on project and the original product
>> shipped with gmake version 3.8, I can't update to gmake 3.81
>
> 3.8? You mean 3.80? Version numbers are not decimals: "version 3.80"
> means "major version 3, minor version 80" and _not_ "version 3 and
> 80/100th"
>
>
> Philip Guenther
Thanks for your advices! Unfortunately I can not change windows :( and look
for a better OS, but I wish I could!
It is not a very important problem. No message No problem as long as it
builds its output, everybody is happy.
But I still could not understand why it doesn't work?
Let's see how the system works:
What I understand from your explanation on how make process a target is
that: . It first do all of the expanding. Assuming the following make file:
modules= a.o b.o c.o
mylib.lib: $(modules)
@echo starting...
$(foreach n, $(modules), $(shell $(AR) -qur $@ $(n)))
Make first expanding it to something such as this:
modules= a.o b.o c.o
mylib.lib: a.o b.o c.o
@echo starting...
$(AR) -qur $@ a.o
$(AR) -qur $@ b.o
$(AR) -qur $@ c.o
And then create the target. To create the target, it executes the following
command sequentially:
@echo starting
ar -qur mylib.lib a.o
ar -qur mylib.lib b.o
ar -qur mylib.lib c.o
So why the output of echo comes after that all AR command finished?
I am assuming that the time consuming commands are $(AR) and the expansion
doesn't take so much Am I wrong?
Best regards