aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-09-01 15:52:33 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2016-11-17 11:36:56 +0100
commitdb4146e84f3310a1e1de6f6d45f2ac35a0b0a604 (patch)
tree4046be3c7f438e5ae2ed4ea9a28bb6f435e2f619
parentf4ec4511d0729802e783b1757d6bcd556737510e (diff)
Move ubi-utils libraries to common library location
Historically, the mtd-utils and ubi-utils were seperate packages. The ubi-utils were at some point merged into the mtd-utils. They first appeared in the release tar-ball in version 1.1.0 in their own sub-hirarchy with their own buildsystem, readme, documentation, etc. A lot of the duplicated stuff got centralized/removed over time. This patch further cleans up the directory hirarchy duplication by moving common libraries from the ubi-utils/ into the central lib/ and include/ directories in the top directory of the mtd-utils package. This includes: - libuib.a & libubigen.a used by the ubi utilities - libscan.a currently only used by ubiformat - libiniparser.a used by ubinize Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--include/dictionary.h (renamed from ubi-utils/include/dictionary.h)0
-rw-r--r--include/libiniparser.h (renamed from ubi-utils/include/libiniparser.h)0
-rw-r--r--include/libscan.h (renamed from ubi-utils/include/libscan.h)0
-rw-r--r--include/libubi.h (renamed from ubi-utils/include/libubi.h)0
-rw-r--r--include/libubigen.h (renamed from ubi-utils/include/libubigen.h)0
-rw-r--r--lib/LICENSE.libiniparser (renamed from ubi-utils/LICENSE.libiniparser)0
-rw-r--r--lib/Makemodule.am18
-rw-r--r--lib/dictionary.c (renamed from ubi-utils/dictionary.c)0
-rw-r--r--lib/libiniparser.c (renamed from ubi-utils/libiniparser.c)0
-rw-r--r--lib/libscan.c (renamed from ubi-utils/libscan.c)0
-rw-r--r--lib/libubi.c (renamed from ubi-utils/libubi.c)0
-rw-r--r--lib/libubi_int.h (renamed from ubi-utils/libubi_int.h)0
-rw-r--r--lib/libubigen.c (renamed from ubi-utils/libubigen.c)0
-rw-r--r--tests/unittests/Makemodule.am4
-rw-r--r--ubi-utils/Makemodule.am37
15 files changed, 24 insertions, 35 deletions
diff --git a/ubi-utils/include/dictionary.h b/include/dictionary.h
index c7d1790..c7d1790 100644
--- a/ubi-utils/include/dictionary.h
+++ b/include/dictionary.h
diff --git a/ubi-utils/include/libiniparser.h b/include/libiniparser.h
index be3c667..be3c667 100644
--- a/ubi-utils/include/libiniparser.h
+++ b/include/libiniparser.h
diff --git a/ubi-utils/include/libscan.h b/include/libscan.h
index a2b8657..a2b8657 100644
--- a/ubi-utils/include/libscan.h
+++ b/include/libscan.h
diff --git a/ubi-utils/include/libubi.h b/include/libubi.h
index 4d6a7ee..4d6a7ee 100644
--- a/ubi-utils/include/libubi.h
+++ b/include/libubi.h
diff --git a/ubi-utils/include/libubigen.h b/include/libubigen.h
index c25ac20..c25ac20 100644
--- a/ubi-utils/include/libubigen.h
+++ b/include/libubigen.h
diff --git a/ubi-utils/LICENSE.libiniparser b/lib/LICENSE.libiniparser
index 74c125c..74c125c 100644
--- a/ubi-utils/LICENSE.libiniparser
+++ b/lib/LICENSE.libiniparser
diff --git a/lib/Makemodule.am b/lib/Makemodule.am
index 694a151..5bee5b6 100644
--- a/lib/Makemodule.am
+++ b/lib/Makemodule.am
@@ -9,4 +9,22 @@ libmtd_a_SOURCES = \
libmissing_a_SOURCES = \
lib/execinfo.c
+libubi_a_SOURCES = \
+ lib/libubi.c \
+ lib/libubi_int.h
+
+libubigen_a_SOURCES = \
+ lib/libubigen.c
+
+libscan_a_SOURCES = \
+ lib/libscan.c
+
+libiniparser_a_SOURCES = \
+ lib/libiniparser.c \
+ lib/dictionary.c
+
+EXTRA_DIST += lib/LICENSE.libiniparser
+
noinst_LIBRARIES += libmtd.a libmissing.a
+noinst_LIBRARIES += libubi.a libubigen.a libscan.a
+noinst_LIBRARIES += libiniparser.a
diff --git a/ubi-utils/dictionary.c b/lib/dictionary.c
index f4b7468..f4b7468 100644
--- a/ubi-utils/dictionary.c
+++ b/lib/dictionary.c
diff --git a/ubi-utils/libiniparser.c b/lib/libiniparser.c
index 898f57f..898f57f 100644
--- a/ubi-utils/libiniparser.c
+++ b/lib/libiniparser.c
diff --git a/ubi-utils/libscan.c b/lib/libscan.c
index dc47a89..dc47a89 100644
--- a/ubi-utils/libscan.c
+++ b/lib/libscan.c
diff --git a/ubi-utils/libubi.c b/lib/libubi.c
index 758d351..758d351 100644
--- a/ubi-utils/libubi.c
+++ b/lib/libubi.c
diff --git a/ubi-utils/libubi_int.h b/lib/libubi_int.h
index 86ce18a..86ce18a 100644
--- a/ubi-utils/libubi_int.h
+++ b/lib/libubi_int.h
diff --git a/ubi-utils/libubigen.c b/lib/libubigen.c
index d2a949b..d2a949b 100644
--- a/ubi-utils/libubigen.c
+++ b/lib/libubigen.c
diff --git a/tests/unittests/Makemodule.am b/tests/unittests/Makemodule.am
index b7bad94..8099fc2 100644
--- a/tests/unittests/Makemodule.am
+++ b/tests/unittests/Makemodule.am
@@ -1,7 +1,7 @@
-ubilib_test_SOURCES = tests/unittests/libubi_test.c ubi-utils/libubi.c
+ubilib_test_SOURCES = tests/unittests/libubi_test.c lib/libubi.c
ubilib_test_LDADD = $(CMOCKA_LIBS)
ubilib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=stat -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek
-ubilib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I ubi-utils/include -I include -DSYSFS_ROOT='"tests/unittests/sysfs_mock"'
+ubilib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I include -DSYSFS_ROOT='"tests/unittests/sysfs_mock"'
mtdlib_test_SOURCES = tests/unittests/libmtd_test.c lib/libmtd.c lib/libmtd_legacy.c
mtdlib_test_LDADD = $(CMOCKA_LIBS)
diff --git a/ubi-utils/Makemodule.am b/ubi-utils/Makemodule.am
index f1c50df..215eac2 100644
--- a/ubi-utils/Makemodule.am
+++ b/ubi-utils/Makemodule.am
@@ -1,78 +1,49 @@
-libubi_a_SOURCES = ubi-utils/libubi.c ubi-utils/libubi_int.h
-libubi_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
-
-libubigen_a_SOURCES = ubi-utils/libubigen.c
-libubigen_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
-
ubiupdatevol_SOURCES = ubi-utils/ubiupdatevol.c
ubiupdatevol_LDADD = libmtd.a libubi.a
-ubiupdatevol_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubimkvol_SOURCES = ubi-utils/ubimkvol.c
ubimkvol_LDADD = libmtd.a libubi.a
-ubimkvol_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubirmvol_SOURCES = ubi-utils/ubirmvol.c
ubirmvol_LDADD = libmtd.a libubi.a
-ubirmvol_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubicrc32_SOURCES = ubi-utils/ubicrc32.c
ubicrc32_LDADD = libmtd.a libubi.a
-ubicrc32_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubinfo_SOURCES = ubi-utils/ubinfo.c
ubinfo_LDADD = libmtd.a libubi.a
-ubinfo_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubiattach_SOURCES = ubi-utils/ubiattach.c
ubiattach_LDADD = libmtd.a libubi.a
-ubiattach_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubidetach_SOURCES = ubi-utils/ubidetach.c
ubidetach_LDADD = libmtd.a libubi.a
-ubidetach_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
-ubinize_SOURCES = ubi-utils/ubinize.c ubi-utils/libiniparser.c ubi-utils/dictionary.c
-ubinize_LDADD = libubi.a libubigen.a libmtd.a
-ubinize_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
+ubinize_SOURCES = ubi-utils/ubinize.c
+ubinize_LDADD = libubi.a libubigen.a libmtd.a libiniparser.a
-ubiformat_SOURCES = ubi-utils/ubiformat.c ubi-utils/libscan.c
-ubiformat_LDADD = libubi.a libubigen.a libmtd.a
-ubiformat_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
+ubiformat_SOURCES = ubi-utils/ubiformat.c
+ubiformat_LDADD = libubi.a libubigen.a libmtd.a libscan.a
ubirename_SOURCES = ubi-utils/ubirename.c
ubirename_LDADD = libmtd.a libubi.a
-ubirename_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
mtdinfo_SOURCES = ubi-utils/mtdinfo.c
mtdinfo_LDADD = libubi.a libubigen.a libmtd.a
-mtdinfo_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubirsvol_SOURCES = ubi-utils/ubirsvol.c
ubirsvol_LDADD = libmtd.a libubi.a
-ubirsvol_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
ubiblock_SOURCES = ubi-utils/ubiblock.c
ubiblock_LDADD = libmtd.a libubi.a
-ubiblock_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/ubi-utils/include
UBI_BINS = \
ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \
ubidetach ubinize ubiformat ubirename mtdinfo ubirsvol ubiblock
-UBI_EXTRA = \
- ubi-utils/LICENSE.libiniparser
-
-UBI_HEADER = \
- ubi-utils/include ubi-utils/libubi_int.h
-
UBI_MAN = \
ubi-utils/ubinize.8
-EXTRA_DIST += $(UBI_HEADER) $(UBI_EXTRA)
-
dist_man8_MANS += $(UBI_MAN)
sbin_PROGRAMS += $(UBI_BINS)
-
-noinst_LIBRARIES += libubi.a libubigen.a