[PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer

Alex Elder aelder at sgi.com
Thu Jan 21 08:00:14 CST 2010


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 at lst.de>

Reviewed-by: Alex Elder <aelder at sgi.com>

> 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 at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs




More information about the xfs mailing list