Skip to contentSkip to conversation

xfstests: simplify build of preallo_rw_pattern_reader/writer

PATCH In review Christoph Hellwig 2 participants 2 messages Jan 21, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: simplify build of preallo_rw_pattern_reader/writer

Instead of having complicated build system hacks just create two two-line source files defining READ/WRITE and including iopat.c

src/Makefile +1 -11
Index: xfstests-dev/src/Makefile
===================================================================
@@ -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) [email protected] -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
 
src/preallo_rw_pattern_reader.c new file +2 -0
Index: xfstests-dev/src/preallo_rw_pattern_reader.c
===================================================================
@@ -0,0 +1,2 @@
+#define READ
+#include "iopat.c"
src/preallo_rw_pattern_writer.c new file +2 -0
Index: xfstests-dev/src/preallo_rw_pattern_writer.c
===================================================================
@@ -0,0 +1,2 @@
+#define WRITE
+#include "iopat.c"

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Christoph Hellwig

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.

Quoted 1 line
Quoted 40 lines

Index: xfstests-dev/src/Makefile
===================================================================

src/Makefile +1 -11
@@ -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) [email protected] -o $@ $(CFLAGS) $(LDFLAGS) $(LDLIBS) $(LIBTEST)
 

Index: xfstests-dev/src/preallo_rw_pattern_reader.c
===================================================================

src/preallo_rw_pattern_reader.c new file +2 -0
@@ -0,0 +1,2 @@
+#define READ
+#include "iopat.c"

Index: xfstests-dev/src/preallo_rw_pattern_writer.c
===================================================================

src/preallo_rw_pattern_writer.c new file +2 -0
@@ -0,0 +1,2 @@
+#define WRITE
+#include "iopat.c"
Quoted 4 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs