Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

#! /bin/sh

# Test C support: recognition of #line.

tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15

tmpfiles="$tmpfiles xg-c-3.in.c"
cat <<EOF > xg-c-3.in.c
#line 42 "bozo"
main(){printf(gettext("Hello, World!\n"));}
# 6 "clown"
gettext("nothing");
EOF

tmpfiles="$tmpfiles xg-c-3.po"
: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --add-location -d xg-c-3 xg-c-3.in.c
test $? = 0 || { rm -fr $tmpfiles; exit 1; }

tmpfiles="$tmpfiles xg-c-3.ok"
cat <<EOF > xg-c-3.ok
#: bozo:42
#, c-format
msgid "Hello, World!\n"
msgstr ""

#: clown:6
msgid "nothing"
msgstr ""
EOF

: ${DIFF=diff}
${DIFF} xg-c-3.ok xg-c-3.po
result=$?

rm -fr $tmpfiles

exit $result