On Wed, Apr 11, 2007 at 10:58:51PM +0200, Stefan Reinauer wrote:
> * Uwe Hermann <[EMAIL PROTECTED]> [070411 22:32]:
> > >  all: getpir checkpir
> > > + ./checkpir
> > 
> > Don't do this please. If I type 'make' I don't expect the build process
> > to _run_ the resulting binary for me (won't work anyways as it needs
> > root access and you usually don't compile as root).
>  
> In which case the result will be exactly the same as before, except it
> tells you to become root to continue. 

Sure, but it's way more intuitive. When you type 'make' you expect it to
build some binary or library, but not _execute_ it.


> I agree, removing this might make sense though, since looking at the
> code reveals that getpir does the same thing as checkpir, itself.

Yeah, I think so too. So we remove checkpir completely?


> > > +irq_tables.c: getpir
> > > + ./getpir
> > 
> > See above.
>  
> This is a valid rule, it autocreates a file required for the build
> process. We do that all over the place in LinuxBIOS (like, we build lar,
> and then call it later on)

Ah, ok, makes sense. Sort of. I would have expected something like

 ./checkpir --validate irq_tables.c

but that would be overkill in this case, I guess. It's easier to
integrate the irq_tables.c directly in the code.


Please see attached patch. It makes 'make' just build getpir, and
'make checkpir' create and validate the irq_tables.c file.


Uwe.
-- 
http://www.hermann-uwe.de  | http://www.holsham-traders.de
http://www.crazy-hacks.org | http://www.unmaintained-free-software.org
Running 'make' should not execute the generated binary, only build it.
Please use 'make checkpir' (as root) to create irq_tables.c and validate it.

Signed-off-by: Uwe Hermann <[EMAIL PROTECTED]>

Index: util/getpir/Makefile
===================================================================
--- util/getpir/Makefile	(Revision 2602)
+++ util/getpir/Makefile	(Arbeitskopie)
@@ -5,8 +5,7 @@
 CC=gcc
 CFLAGS=-O2 -D_GNU_SOURCE -DGETPIR -Wall
 
-all: getpir checkpir
-	./checkpir
+all: getpir
 
 getpir: getpir.o checksum.o code_gen.o
 	$(CC) $(CFLAGS) -o getpir $^

Attachment: signature.asc
Description: Digital signature

-- 
linuxbios mailing list
[email protected]
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to