xfs
[Top] [All Lists]

RE: [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer

To: "Christoph Hellwig" <hch@xxxxxxxxxxxxx>
Subject: RE: [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer
From: "Alex Elder" <aelder@xxxxxxx>
Date: Thu, 21 Jan 2010 08:00:14 -0600
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <20100121113250.GA3580@xxxxxxxxxxxxx>
Thread-index: Acqajca+f2c3FPa4RMqQQrTaD0bC6wAFCUhw
Thread-topic: [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer
Christoph Hellwig wrote:
> Instead of having complicated build system hacks just create two two-line
> source files defining READ/WRITE and including iopat.c

Kind of a coin toss which is better...   But this is simpler.

> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Reviewed-by: Alex Elder <aelder@xxxxxxx>

> Index: xfstests-dev/src/Makefile
> ===================================================================
> --- xfstests-dev.orig/src/Makefile    2010-01-21 11:24:43.000000000 +0000
> +++ xfstests-dev/src/Makefile 2010-01-21 11:26:09.000000000 +0000
> @@ -51,19 +51,9 @@ LDIRT = $(TARGETS)
> 
>  default: $(TARGETS) $(SUBDIRS)
> 
> -PREALLO_TARGETS = preallo_rw_pattern_reader preallo_rw_pattern_writer
> -
>  include $(BUILDRULES)
> 
> -preallo_rw_pattern_reader:
> -     @echo "    [CC]    $@"
> -     $(Q)$(LTLINK) iopat.c -DREAD -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) 
> $(LIBTEST)
> -
> -preallo_rw_pattern_writer:
> -     @echo "    [CC]    $@"
> -     $(Q)$(LTLINK) iopat.c -DWRITE -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) 
> $(LIBTEST)
> -
> -$(filter-out $(PREALLO_TARGETS), $(TARGETS)): $(LIBTEST)
> +$(TARGETS): $(LIBTEST)
>       @echo "    [CC]    $@"
>       $(Q)$(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
> 
> Index: xfstests-dev/src/preallo_rw_pattern_reader.c
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ xfstests-dev/src/preallo_rw_pattern_reader.c      2010-01-21 
> 11:24:19.000000000 +0000
> @@ -0,0 +1,2 @@
> +#define READ
> +#include "iopat.c"
> Index: xfstests-dev/src/preallo_rw_pattern_writer.c
> ===================================================================
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ xfstests-dev/src/preallo_rw_pattern_writer.c      2010-01-21 
> 11:24:30.000000000 +0000
> @@ -0,0 +1,2 @@
> +#define WRITE
> +#include "iopat.c"
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

<Prev in Thread] Current Thread [Next in Thread>