[uClibc] Problem encountered in buildroot/target/jffs/jffs2root.mk

john.smith at arrows.demon.co.uk john.smith at arrows.demon.co.uk
Sat Dec 25 11:14:40 UTC 2004

For me, the snapshot buildroot-20041225.tar.bz2 fails the second make
with the message

bash-2.05$ make
target/jffs2/jffs2root.mk:22: *** target pattern contains no `%'.  Stop.

The problem seems to be that my `which` is sending its error message to stdout:

bash-2.05$ which something-which-does-not-exist 2>/dev/null
which: no something-which-does-not-exist in (/gcc-3.2.3/bin:/usr/local/bin:/usr/bin:/usr/X11R6a/bin:/bin:/usr/lib/java/bin:/usr/games/bin:/usr/games:/opt/gnome/bin:/opt/kde2/bin:.:/usr/X11R6/bin)

so that the variable MKFS_JFFS2 acquires both the error message, and the replacement answer. 

Thus, I suggest changing jffs2root.mk, so that the line which said

MKFS_JFFS2=$(shell which mkfs.jffs2 2>/dev/null || echo $(MTD_DIR)/util/mkfs.jffs2)


MKFS_JFFS2=$(shell if which mkfs.jffs2 2>/dev/null 1>&2 ; then which mkfs.jffs2 2>/dev/null ; else echo $(MTD_DIR)/util/mkfs.jffs2 ; fi)

John Smith

More information about the uClibc mailing list