* [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer
@ 2010-01-21 11:32 Christoph Hellwig
2010-01-21 14:00 ` Alex Elder
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2010-01-21 11:32 UTC (permalink / raw)
To: xfs
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>
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@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer
2010-01-21 11:32 [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer Christoph Hellwig
@ 2010-01-21 14:00 ` Alex Elder
0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2010-01-21 14:00 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
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@lst.de>
Reviewed-by: Alex Elder <aelder@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@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-21 14:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-21 11:32 [PATCH] xfstests: simplify build of preallo_rw_pattern_reader/writer Christoph Hellwig
2010-01-21 14:00 ` Alex Elder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox