archival/*: move "kbuild:" snippets into .c files
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 14 Nov 2013 08:53:52 +0000 (09:53 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 14 Nov 2013 08:53:52 +0000 (09:53 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 files changed:
archival/Kbuild.src
archival/ar.c
archival/bbunzip.c
archival/bzip2.c
archival/cpio.c
archival/dpkg.c
archival/dpkg_deb.c
archival/gzip.c
archival/lzop.c
archival/rpm.c
archival/rpm2cpio.c
archival/tar.c
archival/unzip.c

index 3466452f7a5f93b8624944c6106007ecd1f3dd92..a6fd2eac07155c8444fbb0503394cbcf98020728 100644 (file)
@@ -9,22 +9,3 @@ libs-y                         += libarchive/
 lib-y:=
 
 INSERT
-
-lib-$(CONFIG_AR)               += ar.o
-lib-$(CONFIG_CPIO)             += cpio.o
-lib-$(CONFIG_DPKG)             += dpkg.o
-lib-$(CONFIG_DPKG_DEB)         += dpkg_deb.o
-lib-$(CONFIG_RPM2CPIO)         += rpm2cpio.o
-lib-$(CONFIG_RPM)              += rpm.o
-lib-$(CONFIG_TAR)              += tar.o
-lib-$(CONFIG_UNZIP)            += unzip.o
-
-lib-$(CONFIG_LZOP)             += lzop.o bbunzip.o
-lib-$(CONFIG_GZIP)             += gzip.o bbunzip.o
-lib-$(CONFIG_BZIP2)            += bzip2.o bbunzip.o
-
-lib-$(CONFIG_UNXZ)             += bbunzip.o
-lib-$(CONFIG_UNLZMA)           += bbunzip.o
-lib-$(CONFIG_BUNZIP2)          += bbunzip.o
-lib-$(CONFIG_GUNZIP)           += bbunzip.o
-lib-$(CONFIG_UNCOMPRESS)       += bbunzip.o
index 88236e878dad92161cb463af40548ce1eb36ac01..0a8d828d63fa0011bb8d65f44ccddd876698bf87 100644 (file)
@@ -17,6 +17,8 @@
  * http://www.unix-systems.org/single_unix_specification_v2/xcu/ar.html
  */
 
+//kbuild:lib-$(CONFIG_AR) += ar.o
+
 //usage:#define ar_trivial_usage
 //usage:       "[-o] [-v] [-p] [-t] [-x] ARCHIVE FILES"
 //usage:#define ar_full_usage "\n\n"
index 3735e3282c09b6e626dc1ad305457cb0ebaf5e07..f2d796e679496a8299248c2b85ffed524dea8ff8 100644 (file)
@@ -7,6 +7,9 @@
 #include "libbb.h"
 #include "bb_archive.h"
 
+/* lzop_main() uses bbunpack(), need this: */
+//kbuild:lib-$(CONFIG_LZOP) += bbunzip.o
+
 /* Note: must be kept in sync with archival/lzop.c */
 enum {
        OPT_STDOUT     = 1 << 0,
@@ -205,7 +208,6 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
-
 //usage:#define uncompress_trivial_usage
 //usage:       "[-cf] [FILE]..."
 //usage:#define uncompress_full_usage "\n\n"
@@ -213,6 +215,7 @@ char* FAST_FUNC make_new_name_generic(char *filename, const char *expected_ext)
 //usage:     "\n       -c      Write to stdout"
 //usage:     "\n       -f      Overwrite"
 
+//kbuild:lib-$(CONFIG_UNCOMPRESS) += bbunzip.o
 #if ENABLE_UNCOMPRESS
 static
 IF_DESKTOP(long long) int FAST_FUNC unpack_uncompress(transformer_aux_data_t *aux)
@@ -257,7 +260,6 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
  * See the license_msg below and the file COPYING for the software license.
  * See the file algorithm.doc for the compression algorithms and file formats.
  */
-
 //usage:#define gunzip_trivial_usage
 //usage:       "[-cft] [FILE]..."
 //usage:#define gunzip_full_usage "\n\n"
@@ -278,6 +280,8 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv)
 //usage:#define zcat_full_usage "\n\n"
 //usage:       "Decompress to stdout"
 
+//kbuild:lib-$(CONFIG_GZIP) += bbunzip.o
+//kbuild:lib-$(CONFIG_GUNZIP) += bbunzip.o
 #if ENABLE_GUNZIP
 static
 char* FAST_FUNC make_new_name_gunzip(char *filename, const char *expected_ext UNUSED_PARAM)
@@ -356,8 +360,11 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv)
 //usage:       "[FILE]..."
 //usage:#define bzcat_full_usage "\n\n"
 //usage:       "Decompress to stdout"
+
 //applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
 //applet:IF_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP, bzcat))
+//kbuild:lib-$(CONFIG_BZIP2) += bbunzip.o
+//kbuild:lib-$(CONFIG_BUNZIP2) += bbunzip.o
 #if ENABLE_BUNZIP2
 static
 IF_DESKTOP(long long) int FAST_FUNC unpack_bunzip2(transformer_aux_data_t *aux)
@@ -385,7 +392,6 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
  *
  * Licensed under GPLv2, see file LICENSE in this source tree.
  */
-
 //usage:#define unlzma_trivial_usage
 //usage:       "[-cf] [FILE]..."
 //usage:#define unlzma_full_usage "\n\n"
@@ -426,6 +432,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv)
 //usage:#define xzcat_full_usage "\n\n"
 //usage:       "Decompress to stdout"
 
+//kbuild:lib-$(CONFIG_UNLZMA) += bbunzip.o
 #if ENABLE_UNLZMA
 static
 IF_DESKTOP(long long) int FAST_FUNC unpack_unlzma(transformer_aux_data_t *aux)
@@ -451,6 +458,7 @@ int unlzma_main(int argc UNUSED_PARAM, char **argv)
 #endif
 
 
+//kbuild:lib-$(CONFIG_UNXZ) += bbunzip.o
 #if ENABLE_UNXZ
 static
 IF_DESKTOP(long long) int FAST_FUNC unpack_unxz(transformer_aux_data_t *aux)
index dd77c8efcfebe944591a680ce6ead9f4ca9c0610..485afeb24f020531aaca33111388b138e31d1451 100644 (file)
@@ -7,6 +7,8 @@
  * about bzip2 library code.
  */
 
+//kbuild:lib-$(CONFIG_BZIP2) += bzip2.o
+
 //usage:#define bzip2_trivial_usage
 //usage:       "[OPTIONS] [FILE]..."
 //usage:#define bzip2_full_usage "\n\n"
index 699c6dbb7537bc3086cf8bd7273c9973b366c5be..c228aabcc38b7c82c7ef7086a050a57508013767 100644 (file)
@@ -14,6 +14,8 @@
 #include "libbb.h"
 #include "bb_archive.h"
 
+//kbuild:lib-$(CONFIG_CPIO) += cpio.o
+
 //usage:#define cpio_trivial_usage
 //usage:       "[-dmvu] [-F FILE]" IF_FEATURE_CPIO_O(" [-H newc]")
 //usage:       " [-ti"IF_FEATURE_CPIO_O("o")"]" IF_FEATURE_CPIO_P(" [-p DIR]")
index ed86f3355df460d64b2247f5b66f71f540e39850..cd88a79c27fbe8e16a832e323bced465df69109d 100644 (file)
@@ -28,6 +28,8 @@
  *
  */
 
+//kbuild:lib-$(CONFIG_DPKG) += dpkg.o
+
 //usage:#define dpkg_trivial_usage
 //usage:       "[-ilCPru] [-F OPT] PACKAGE"
 //usage:#define dpkg_full_usage "\n\n"
index a04ec94077f9958cc0086ac8f16f970ffd1933b8..39ae3e45e38cce2d1271ab7d640c81131fb596a2 100644 (file)
@@ -5,6 +5,8 @@
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 
+//kbuild:lib-$(CONFIG_DPKG_DEB) += dpkg_deb.o
+
 //usage:#define dpkg_deb_trivial_usage
 //usage:       "[-cefxX] FILE [argument"
 //usage:#define dpkg_deb_full_usage "\n\n"
index 31ccab3cd7a5013b3e34ed027c9b7f050676702e..c850d5f5f9f7de97d471b7e653763b8e70e07244 100644 (file)
@@ -39,6 +39,8 @@ gzip: bogus: No such file or directory
 aa:      85.1% -- replaced with aa.gz
 */
 
+//kbuild:lib-$(CONFIG_GZIP) += gzip.o
+
 //usage:#define gzip_trivial_usage
 //usage:       "[-cfd] [FILE]..."
 //usage:#define gzip_full_usage "\n\n"
index 9b42e5fd3987b2e317ed6d16bbabab26bb7668e6..3c29b6eb8a8f0ed8344217908f332403f8e314f3 100644 (file)
@@ -25,6 +25,8 @@
    "Minimalized" for busybox by Alain Knaff
 */
 
+//kbuild:lib-$(CONFIG_LZOP) += lzop.o
+
 //usage:#define lzop_trivial_usage
 //usage:       "[-cfvd123456789CF] [FILE]..."
 //usage:#define lzop_full_usage "\n\n"
index 86ba4dca490fbe09006a8814fe5eaea9038d7be4..3c386d2385c36a8db877e7f8e866d487462ba112 100644 (file)
@@ -7,6 +7,8 @@
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 
+//kbuild:lib-$(CONFIG_RPM) += rpm.o
+
 //usage:#define rpm_trivial_usage
 //usage:       "-i PACKAGE.rpm; rpm -qp[ildc] PACKAGE.rpm"
 //usage:#define rpm_full_usage "\n\n"
index f3dfa5159400e9c09d1f5693855536a28d93533f..cd6786cc7a230809a2e40ea8e02f4a05e565603c 100644 (file)
@@ -7,6 +7,8 @@
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 
+//kbuild:lib-$(CONFIG_RPM2CPIO) += rpm2cpio.o
+
 //usage:#define rpm2cpio_trivial_usage
 //usage:       "package.rpm"
 //usage:#define rpm2cpio_full_usage "\n\n"
index 3cd033be39bdbe8a19ac654d848a6f01b346c49c..f75a82ad9b64622c90b9ae98fc6e9067bddf8a6f 100644 (file)
@@ -42,6 +42,8 @@
  * This doesn't feel right, and IIRC GNU tar doesn't do that.
  */
 
+//kbuild:lib-$(CONFIG_TAR) += tar.o
+
 #include <fnmatch.h>
 #include "libbb.h"
 #include "bb_archive.h"
index 673e5fe08e7d109c8f87779a8541865ddc8f8e28..71f3fbb68050bc830e88d7da3794b474b370d656 100644 (file)
@@ -9,16 +9,16 @@
  *
  * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
-
 /* For reference see
  * http://www.pkware.com/company/standards/appnote/
  * http://www.info-zip.org/pub/infozip/doc/appnote-iz-latest.zip
- */
-
-/* TODO
+ *
+ * TODO
  * Zip64 + other methods
  */
 
+//kbuild:lib-$(CONFIG_UNZIP) += unzip.o
+
 //usage:#define unzip_trivial_usage
 //usage:       "[-lnopq] FILE[.zip] [FILE]... [-x FILE...] [-d DIR]"
 //usage:#define unzip_full_usage "\n\n"