summaryrefslogtreecommitdiff
path: root/tests/ubi-tests/Makefile
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-06-25 13:20:37 -0400
committerArtem Bityutskiy <dedekind1@gmail.com>2011-06-27 09:07:07 +0300
commit3285a49dd871d54c1ec13076173ad617443baae1 (patch)
tree6b0962b6ec8437ffd54f03846f454943ea8bc443 /tests/ubi-tests/Makefile
parent966122b0bbb175e9d8cc9876bb455e12c1d70eb9 (diff)
rewrite build system to avoid recursion
The ubi-utils/src/ subdir is tossed as it just complicates things for no real gain. The dictionary.h header is relocated to the ubi-utils/include/ since other headers in there need it. The top level clean is replaced with a `find -delete` on objects, so it might prune more than necessary, but many projects now do this sort of thing and no one complained there. A "mkdep" helper generates the actual rule, and the variables are used with "foreach" to expand these automatically. The tests subdir is updated only to reflect the ubi-utils source move. Otherwise, it is left untouched as making that non-recursive isn't really worth the effort. While we're gutting things, also through in kbuild style output while building to make things more legible. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'tests/ubi-tests/Makefile')
-rw-r--r--tests/ubi-tests/Makefile10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/ubi-tests/Makefile b/tests/ubi-tests/Makefile
index 741a5c2..2c47a9f 100644
--- a/tests/ubi-tests/Makefile
+++ b/tests/ubi-tests/Makefile
@@ -1,9 +1,7 @@
-LIBUBI_PATH=../../ubi-utils/
-LIBUBI_SRC_PATH=../../ubi-utils/src/
-LIBUBI_HEADER_PATH=../../ubi-utils/include
+LIBUBI_PATH = ../../ubi-utils/
+LIBUBI_HEADER_PATH = $(LIBUBI_PATH)/include
UBIUTILS_PATH=../../ubi-utils/
-LIBUBI_PATH=../../ubi-utils/
KERNELHDR := ../../include
LIBS = libubi
@@ -15,8 +13,8 @@ CFLAGS += -I$(LIBUBI_HEADER_PATH) -I $(KERNELHDR) -lpthread
include ../../common.mk
# Compile ubilib with the udevsettle hack
-libubi.a: $(LIBUBI_SRC_PATH)/libubi.c $(LIBUBI_HEADER_PATH)/libubi.h $(LIBUBI_SRC_PATH)/libubi_int.h
- $(CC) $(CFLAGS) -I $(LIBUBI_SRC_PATH) -I../../include -DUDEV_SETTLE_HACK -c $(LIBUBI_SRC_PATH)/libubi.c -o libubi.o
+libubi.a: $(LIBUBI_PATH)/libubi.c $(LIBUBI_HEADER_PATH)/libubi.h $(LIBUBI_PATH)/libubi_int.h
+ $(CC) $(CFLAGS) -I $(LIBUBI_PATH) -I../../include -DUDEV_SETTLE_HACK -c $(LIBUBI_PATH)/libubi.c -o libubi.o
ar cr libubi.a libubi.o
$(TARGETS): $(addprefix $(BUILDDIR)/, common.o) libubi.a