On Tue, Aug 19, 2008 at 12:04 AM, Subrata Modak
<[EMAIL PROTECTED]> wrote:
> Hi Yamato,
>
> On Tue, 2008-08-19 at 11:20 +0900, Masatake YAMATO wrote:
>> Index: testcases/kernel/syscalls/setgid/Makefile
>> ===================================================================
>> RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/setgid/Makefile,v
>> retrieving revision 1.8
>> diff -u -r1.8 Makefile
>> --- testcases/kernel/syscalls/setgid/Makefile 4 Aug 2008 12:06:21 -0000      
>>  1.8
>> +++ testcases/kernel/syscalls/setgid/Makefile 19 Aug 2008 02:09:21 -0000
>> @@ -25,7 +25,7 @@
>>
>>  %.c: compat_16.h
>>  %_16.c: %.c
>> -     echo "#define USE_COMPAT16_SYSCALL 1" > $@
>> +     echo "#define TST_USE_COMPAT16_SYSCALL 1" > $@
>>       cat $< >> $@

Masake, et all,
       You can avoid situations like the above by doing something like
this in your Makefiles:

# ==========================

SRC                     := $(patsubst %.c,%,$(wildcard *.c))
MAKE_TARGETS := $(SRCS) $(addsuffix _16,$(SRCS))

all: $(MAKE_TARGETS)

%_16: %.c
%_16: CFLAGS += -DUSE_COMPAT16_SYSCALL=1 -DTST_USE_COMPAT16_SYSCALL=1

# ==========================

This does the same exact thing without cluttering up your filesystem
with duplicate .c files with only 2 lines difference. All it requires
is a sufficiently new enough GNU make...

I've found similar ways to clean up nftw64 vs nftw, and while I'm
still grinding away at all these mass changes it really does help to
look at the problem from a common point of view when dealing with
bit-width dependent API issues like this.

Cheers,
-Garrett

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to