aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils
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 /ubi-utils
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 'ubi-utils')
-rw-r--r--ubi-utils/Makefile60
-rw-r--r--ubi-utils/dictionary.c (renamed from ubi-utils/src/dictionary.c)0
-rw-r--r--ubi-utils/include/dictionary.h (renamed from ubi-utils/src/dictionary.h)0
-rw-r--r--ubi-utils/libiniparser.c (renamed from ubi-utils/src/libiniparser.c)0
-rw-r--r--ubi-utils/libscan.c (renamed from ubi-utils/src/libscan.c)0
-rw-r--r--ubi-utils/libubi.c (renamed from ubi-utils/src/libubi.c)0
-rw-r--r--ubi-utils/libubi_int.h (renamed from ubi-utils/src/libubi_int.h)0
-rw-r--r--ubi-utils/libubigen.c (renamed from ubi-utils/src/libubigen.c)0
-rw-r--r--ubi-utils/mtdinfo.c (renamed from ubi-utils/src/mtdinfo.c)0
-rw-r--r--ubi-utils/ubiattach.c (renamed from ubi-utils/src/ubiattach.c)0
-rw-r--r--ubi-utils/ubicrc32.c (renamed from ubi-utils/src/ubicrc32.c)0
-rw-r--r--ubi-utils/ubidetach.c (renamed from ubi-utils/src/ubidetach.c)0
-rw-r--r--ubi-utils/ubiformat.c (renamed from ubi-utils/src/ubiformat.c)0
-rw-r--r--ubi-utils/ubimkvol.c (renamed from ubi-utils/src/ubimkvol.c)0
-rw-r--r--ubi-utils/ubinfo.c (renamed from ubi-utils/src/ubinfo.c)0
-rw-r--r--ubi-utils/ubinize.c (renamed from ubi-utils/src/ubinize.c)0
-rw-r--r--ubi-utils/ubirename.c (renamed from ubi-utils/src/ubirename.c)0
-rw-r--r--ubi-utils/ubirmvol.c (renamed from ubi-utils/src/ubirmvol.c)0
-rw-r--r--ubi-utils/ubirsvol.c (renamed from ubi-utils/src/ubirsvol.c)0
-rw-r--r--ubi-utils/ubiupdatevol.c (renamed from ubi-utils/src/ubiupdatevol.c)0
-rw-r--r--ubi-utils/ubiutils-common.c (renamed from ubi-utils/src/ubiutils-common.c)0
21 files changed, 0 insertions, 60 deletions
diff --git a/ubi-utils/Makefile b/ubi-utils/Makefile
deleted file mode 100644
index df81cd9..0000000
--- a/ubi-utils/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Makefile for ubi-utils
-#
-
-KERNELHDR := ../include
-
-# CFLAGS += -Werror
-CPPFLAGS += -Iinclude -Isrc -I$(KERNELHDR)
-
-LIBS = libubi libubigen libiniparser libscan
-TARGETS = ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
- ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol
-
-VPATH = src
-LDLIBS = -L$(BUILDDIR)/../lib -lmtd
-
-include ../common.mk
-
-# And the below is the rule to get final executable from its .o and ubiutils-common.o
-$(TARGETS): $(addprefix $(BUILDDIR)/,\
- libubi.a ubiutils-common.o)
-# $(CC) $(CFLAGS) $(filter %.o, $^) -L. -lubi -o $@
-
-$(BUILDDIR)/ubicrc32: $(addprefix $(BUILDDIR)/,\
- ubicrc32.o)
-# $(CC) $(CFLAGS) -o $@ $^
-
-$(BUILDDIR)/ubinize: $(addprefix $(BUILDDIR)/,\
- ubinize.o ubiutils-common.o libiniparser.a libubigen.a)
-# $(CC) $(CFLAGS) $(filter %.o, $^) -L. -liniparser -lubigen -o $@
-
-$(BUILDDIR)/mtdinfo: $(addprefix $(BUILDDIR)/,\
- libubigen.a ubiutils-common.o)
-# $(CC) $(CFLAGS) $(filter %.o, $^) -L. -lmtd -lubigen -o $@
-
-$(BUILDDIR)/ubiformat: $(addprefix $(BUILDDIR)/,\
- ubiformat.o ubiutils-common.o libscan.a libubi.a libubigen.a)
-# $(CC) $(CFLAGS) $(filter %.o, $^) -L. -lmtd -lscan -lubi -lubigen -o $@
-
-$(BUILDDIR)/libubi.a: $(BUILDDIR)/libubi.o
-
-$(BUILDDIR)/libubigen.a: $(BUILDDIR)/libubigen.o
-
-$(BUILDDIR)/libiniparser.a: $(addprefix $(BUILDDIR)/,\
- libiniparser.o dictionary.o)
-
-$(BUILDDIR)/libscan.a: $(addprefix $(BUILDDIR)/,\
- libscan.o)
-
-clean::
- rm -f $(addsuffix .a, $(LIBS))
-
-install::
- mkdir -p ${DESTDIR}/${SBINDIR}
- install -m 0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/
-
-uninstall:
- for file in ${TARGETS}; do \
- $(RM) ${DESTDIR}/${SBINDIR}/$$file; \
- done
diff --git a/ubi-utils/src/dictionary.c b/ubi-utils/dictionary.c
index b7c9ebf..b7c9ebf 100644
--- a/ubi-utils/src/dictionary.c
+++ b/ubi-utils/dictionary.c
diff --git a/ubi-utils/src/dictionary.h b/ubi-utils/include/dictionary.h
index c7d1790..c7d1790 100644
--- a/ubi-utils/src/dictionary.h
+++ b/ubi-utils/include/dictionary.h
diff --git a/ubi-utils/src/libiniparser.c b/ubi-utils/libiniparser.c
index 3bea51e..3bea51e 100644
--- a/ubi-utils/src/libiniparser.c
+++ b/ubi-utils/libiniparser.c
diff --git a/ubi-utils/src/libscan.c b/ubi-utils/libscan.c
index dc47a89..dc47a89 100644
--- a/ubi-utils/src/libscan.c
+++ b/ubi-utils/libscan.c
diff --git a/ubi-utils/src/libubi.c b/ubi-utils/libubi.c
index 4d5f316..4d5f316 100644
--- a/ubi-utils/src/libubi.c
+++ b/ubi-utils/libubi.c
diff --git a/ubi-utils/src/libubi_int.h b/ubi-utils/libubi_int.h
index c3aa37a..c3aa37a 100644
--- a/ubi-utils/src/libubi_int.h
+++ b/ubi-utils/libubi_int.h
diff --git a/ubi-utils/src/libubigen.c b/ubi-utils/libubigen.c
index 9eaa7f5..9eaa7f5 100644
--- a/ubi-utils/src/libubigen.c
+++ b/ubi-utils/libubigen.c
diff --git a/ubi-utils/src/mtdinfo.c b/ubi-utils/mtdinfo.c
index bfd7e6d..bfd7e6d 100644
--- a/ubi-utils/src/mtdinfo.c
+++ b/ubi-utils/mtdinfo.c
diff --git a/ubi-utils/src/ubiattach.c b/ubi-utils/ubiattach.c
index 4f18e99..4f18e99 100644
--- a/ubi-utils/src/ubiattach.c
+++ b/ubi-utils/ubiattach.c
diff --git a/ubi-utils/src/ubicrc32.c b/ubi-utils/ubicrc32.c
index 73ec595..73ec595 100644
--- a/ubi-utils/src/ubicrc32.c
+++ b/ubi-utils/ubicrc32.c
diff --git a/ubi-utils/src/ubidetach.c b/ubi-utils/ubidetach.c
index 668f1bd..668f1bd 100644
--- a/ubi-utils/src/ubidetach.c
+++ b/ubi-utils/ubidetach.c
diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/ubiformat.c
index c4b944a..c4b944a 100644
--- a/ubi-utils/src/ubiformat.c
+++ b/ubi-utils/ubiformat.c
diff --git a/ubi-utils/src/ubimkvol.c b/ubi-utils/ubimkvol.c
index 25065e3..25065e3 100644
--- a/ubi-utils/src/ubimkvol.c
+++ b/ubi-utils/ubimkvol.c
diff --git a/ubi-utils/src/ubinfo.c b/ubi-utils/ubinfo.c
index 8e14e6e..8e14e6e 100644
--- a/ubi-utils/src/ubinfo.c
+++ b/ubi-utils/ubinfo.c
diff --git a/ubi-utils/src/ubinize.c b/ubi-utils/ubinize.c
index 3085b66..3085b66 100644
--- a/ubi-utils/src/ubinize.c
+++ b/ubi-utils/ubinize.c
diff --git a/ubi-utils/src/ubirename.c b/ubi-utils/ubirename.c
index 070e32e..070e32e 100644
--- a/ubi-utils/src/ubirename.c
+++ b/ubi-utils/ubirename.c
diff --git a/ubi-utils/src/ubirmvol.c b/ubi-utils/ubirmvol.c
index 5725d90..5725d90 100644
--- a/ubi-utils/src/ubirmvol.c
+++ b/ubi-utils/ubirmvol.c
diff --git a/ubi-utils/src/ubirsvol.c b/ubi-utils/ubirsvol.c
index 65f579c..65f579c 100644
--- a/ubi-utils/src/ubirsvol.c
+++ b/ubi-utils/ubirsvol.c
diff --git a/ubi-utils/src/ubiupdatevol.c b/ubi-utils/ubiupdatevol.c
index 24f38fe..24f38fe 100644
--- a/ubi-utils/src/ubiupdatevol.c
+++ b/ubi-utils/ubiupdatevol.c
diff --git a/ubi-utils/src/ubiutils-common.c b/ubi-utils/ubiutils-common.c
index 6609a6b..6609a6b 100644
--- a/ubi-utils/src/ubiutils-common.c
+++ b/ubi-utils/ubiutils-common.c