[patch] build shared library
Bernhard Fischer
rep.nop at aon.at
Sat Sep 10 10:00:21 UTC 2005
On Fri, Sep 09, 2005 at 09:49:16PM -0500, Rob Landley wrote:
>On Thursday 08 September 2005 03:34, Bernhard Fischer wrote:
>> >Figuring out where to install ($libdir) is ugly. I'm not saying this is
>> > your fault, I'm just stating a fact... :)
>>
>> yeah, there ought to be a better way. I'm not convinced if it would be a
>> good idea to make install() aware of the obj-format and type of the file
>> it is asked to install. It could then decide on it's own where to put
>> the lib, but i think that would be a bad idea. Let's use this ugly
>> method for now, ok?
>
>Possibly a note in the TODO file if this gets checked in...
>
>> >Where does -lcrypt come in? (You're sticking it on LIBRARIES...)
>>
>> crypt is required for libbb/{correct_password,pw_encrypt}.c
>>
>> You can also ditch the -lc, i think.
s/also//; # this does belong to ditching -ldl mentioned below.
>
>Hmmm... correct_password() is used by su.c and login.c, and pw_encrypt is
>used by httpd.c, sulogin.c, vlock.c, and passwd.c...
>
>Need to think about this one some more.
>
>> >> libbusybox-soname:=libbusybox.so.1.0.0
>> >
>> >Possibly something like:
>> >
>> >libbusybox-soname:=libbusybox.so.$(VERSION)
>>
>> Yes, that's better (we have to strip the '-pre1' part, obviously).
>
>Why, you can't have that sort of thing in a library name?
I was under the impression that you could not.
>
>> >(defined in Rules.mak, and I just upgraded it to say 1.1.0-pre1).
>> >
>> >While you're touching clean: how do we fix it so the "make clean" from
>> >scripts/config actually gets called, and deletes "conf" and "mconf" out of
>>
>> As said in another mail, scripts/conf/binaries are deleted in make
>> distclean.
>
>Yeah, but not in a normal clean.
>
>Make distclean zaps the current .config, which isn't always what you want when
>what you're playing with is the .config reading/writing code.
>
>But it's a pretty minor issue, and orthogonal to what you're doing.
>
>> We could as well move the line
>> $(MAKE) -C scripts/config clean
>> from distclean to clean, if you like.
>
>That would be nice, yes. :)
Trivial patch attached, fwiw.
>
>> >Yup. Usually variants of "get_header_ar.o" is in
>> > LIBUNARCHIVE-$(CONFIG_AR) but also in DPKG_FILES (included in two DPKG
>> > LIBUNARCHIVEs...)
>> >
>> >Not sure how to untangle this. How does the linux kernel deal with this?
>> >(Can we wash it through sort -u maybe?)
>>
>> yes. The following does the trick.
>>
>> Index: archival/libunarchive/Makefile.in
>> ===================================================================
>> --- archival/libunarchive/Makefile.in (revision 11350)
>> +++ archival/libunarchive/Makefile.in (working copy)
>> @@ -74,6 +74,7 @@
>> LIBUNARCHIVE-$(CONFIG_UNCOMPRESS) += decompress_uncompress.o
>> LIBUNARCHIVE-$(CONFIG_UNZIP) += $(GUNZIP_FILES)
>>
>> +LIBUNARCHIVE-y:=$(sort $(LIBUNARCHIVE-y))
>> libraries-y+=$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR)
>>
>> $(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR): $(patsubst
>> %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y))
>
>Might you be missing a -u on the sort?
No, that's ok as it is (it's a builtin filter, not the normal sort(1)):
`$(sort LIST)'
Sort the words in LIST lexicographically, removing duplicates.
-------------- next part --------------
Index: Makefile
===================================================================
--- Makefile (revision 11418)
+++ Makefile (working copy)
@@ -279,6 +279,7 @@
@./scripts/config/conf -d $(CONFIG_CONFIG_IN)
clean:
+ - $(MAKE) -C scripts/config $@
- rm -f docs/busybox.dvi docs/busybox.ps \
docs/busybox.pod docs/busybox.net/busybox.html \
docs/busybox pod2htm* *.gdb *.elf *~ core .*config.log \
@@ -295,7 +296,6 @@
- rm -rf include/config include/config.h include/bb_config.h include/bbconfigopts.h
- find . -name .depend -exec rm -f {} \;
rm -f .config .config.old .config.cmd
- - $(MAKE) -C scripts/config clean
release: distclean #doc
cd ..; \
More information about the busybox
mailing list