[uClibc] buildroot, sed.mk patch
Matthias Kilian
kili at outback.escape.de
Thu Jan 1 17:03:37 UTC 2004
Hi!
Here's a minimal patch for sed.mk for buildroot (19.12.2003):
diff -rNu ../buildroot/make/sed.mk ./make/sed.mk
--- ../buildroot/make/sed.mk 2003-11-21 02:17:09.000000000 +0100
+++ ./make/sed.mk 2004-01-01 17:50:43.000000000 +0100
@@ -50,7 +50,7 @@
build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
@if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi;
- @if [ $(STAGING_DIR)/$(SED_TARGET_BINARY) -ot $(SED_DIR1)/$(SED_BINARY) ] ; then \
+ @if [ ! -e $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) -ot $(SED_DIR1)/$(SED_BINARY) ] ; then \
set -x; \
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(SED_DIR1) install; \
mv $(STAGING_DIR)/usr/bin/sed $(STAGING_DIR)/bin/; \
For most people, the original version may work. However, if your /bin/sh
doesn't have a test(1) builtin, in the if-statement, /usr/bin/[ (aka
/usr/bin/test) will be used, which, at least for sh-utils-2.0, doesn't
work as the test(1) built into bash(1).
I'm not sure wether this is a bug in bash or in sh-utils or if the
behaviour of
$ test foo -ot bar
is unspecified if either foo or bar doesn't exist, so I just kind of
"fixed" the problem as above.
Probably there are more .mk files in the current buildroot tarball that
need to be fixed this way. If I find them, I'll send those patches, too.
Better yet, however, would be to make $(STAGING_DIR)/$(SED_TARGET_BINARY)
a target depending on $(SED_DIR1)/$(SED_BINARY).
Ciao,
Kili
ps: the buildroot tarball available for download (*not* the CVS
version) tries to use uClibc-0.9.23. Are there any known problems with
uClibc-0.9.24?
More information about the uClibc
mailing list