Invoke fix_includes.sh the correct way

Jan-Benedict Glaw jbglaw at lug-owl.de
Thu Jan 5 22:41:18 UTC 2006


Hi!

Currently, fix_includes.sh is just called from within Makefile.in:

	$(top_srcdir)extra/scripts/fix_includes.sh \
		-k $(KERNEL_SOURCE) -t $(TARGET_ARCH) \
		$(header_extra_args)

This is not correct (from a POSIX point of view), because it relies on
/bin/sh (think shell-bang) doesn't need to be a POSIX shell. (That'll
result in errors with `test'.)

So either call it using the correct interpreter (`sh' from $PATH, done
with the patch below) or using the `env' trick (using "#!/usr/bin/env
sh" as interpreter, which may or may not work, depending on your
operating system's capability of honoring the shell-bank, which is
bzw. no "must" thing for a POSIX system).

--- uclibc/Rules.mak~	2006-01-05 23:12:28.949858000 +0100
+++ uclibc/Rules.mak	2006-01-05 23:12:46.719804000 +0100
@@ -36,6 +36,7 @@
 INSTALL    = install
 LN         = ln
 RM         = rm -f
+SH         = sh
 TAR        = tar
 
 STRIP_FLAGS ?= -x -R .note -R .comment
--- uclibc/Makefile.in~	2006-01-05 23:15:04.169448000 +0100
+++ uclibc/Makefile.in	2006-01-05 23:15:34.579370000 +0100
@@ -52,7 +52,7 @@
 headers: include/bits/uClibc_config.h
 	$(MAKE) headers-y
 	@$(SHELL_SET_X); \
-	$(top_srcdir)extra/scripts/fix_includes.sh \
+	$(SH) $(top_srcdir)extra/scripts/fix_includes.sh \
 		-k $(KERNEL_SOURCE) -t $(TARGET_ARCH) \
 		$(header_extra_args)
 	if [ -f libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h ] ; then \
MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw at lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20060105/5643c3fb/attachment-0002.pgp 


More information about the uClibc mailing list