xfs
[Top] [All Lists]

[PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 21 Jan 2010 06:32:50 -0500
User-agent: Mutt/1.5.19 (2009-01-05)
Instead of having complicated build system hacks just create two two-line
source files defining READ/WRITE and including iopat.c


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

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"

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