xfstests: simplify build of preallo_rw_pattern_reader/writer
authorChristoph Hellwig <hch@infradead.org>
Thu, 21 Jan 2010 11:32:50 +0000 (11:32 +0000)
committerAlex Elder <aelder@sgi.com>
Thu, 21 Jan 2010 23:20:23 +0000 (17:20 -0600)
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@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
src/Makefile
src/preallo_rw_pattern_reader.c [new file with mode: 0644]
src/preallo_rw_pattern_writer.c [new file with mode: 0644]

index e2a42ce04be14c17b6d5e8728f6c25c832a4b530..e5ebcd8e3002d5a26b54da1d6d71f7165b40b341 100644 (file)
@@ -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)
 
diff --git a/src/preallo_rw_pattern_reader.c b/src/preallo_rw_pattern_reader.c
new file mode 100644 (file)
index 0000000..fa5002a
--- /dev/null
@@ -0,0 +1,2 @@
+#define READ
+#include "iopat.c"
diff --git a/src/preallo_rw_pattern_writer.c b/src/preallo_rw_pattern_writer.c
new file mode 100644 (file)
index 0000000..08cdfc0
--- /dev/null
@@ -0,0 +1,2 @@
+#define WRITE
+#include "iopat.c"