Files
vasilito facf0c92e0 feat: track all source trees in git — full fork offline-first model
Red Bear OS is a full fork. All sources must be available from git clone
with zero network access. Removed gitignore rules that excluded fetched
source trees under recipes/*/source/, local/recipes/kde/*/source/,
local/recipes/qt/*/source/, and vendor source trees.

Build artifacts (target/, build/, source.tar, *.o, *.so) remain excluded.

127291 files added — kernel, relibc, base, bootloader, pkgar, all KDE/Qt
frameworks, mesa, wayland, DRM drivers, and every other recipe source.
2026-05-14 10:55:53 +01:00

63 lines
1.9 KiB
Bash
Executable File

#! /bin/sh
# Validate gperf's operation on a given input file.
# Usage: validate languages input.gperf [more gperf options]
# Uses the environment variables GPERF, CC, CFLAGS, CXX, CXXFLAGS.
# Supposes gcc and g++.
# Exit on error
set -e
verbose () {
echo "$@"
"$@"
}
languages=$1
shift
# On old systems, it's worth trying gcc -traditional.
# On glibc-2.1 systems, gcc -traditional doesn't work any more.
use_traditional=false
for lang in `echo $languages | sed -e 's/,/ /g'`; do
case "$lang" in
KR-C )
echo "${GPERF} -I -L KR-C $@ > valitest.c"
${GPERF} -I -L KR-C "$@" > valitest.c
grep -n ' const ' valitest.c /dev/null && exit 1
if test $use_traditional = true; then
verbose ${CC} ${CFLAGS} ${CPPFLAGS} -traditional valitest.c -o valitest
./valitest
fi
verbose ${CC} ${CFLAGS} ${CPPFLAGS} -ansi -pedantic valitest.c -o valitest
./valitest
;;
C )
echo "${GPERF} -I -L C $@ > valitest.c"
${GPERF} -I -L C "$@" > valitest.c
if test $use_traditional = true; then
verbose ${CC} ${CFLAGS} ${CPPFLAGS} -traditional -Dconst= valitest.c -o valitest
./valitest
fi
verbose ${CC} ${CFLAGS} ${CPPFLAGS} -ansi -pedantic -pedantic-errors valitest.c -o valitest
./valitest
;;
ANSI-C )
echo "${GPERF} -I -L ANSI-C $@ > valitest.c"
${GPERF} -I -L ANSI-C "$@" > valitest.c
verbose ${CC} ${CFLAGS} ${CPPFLAGS} -ansi -pedantic -pedantic-errors valitest.c -o valitest
./valitest
verbose ${CXX} ${CXXFLAGS} ${CPPFLAGS} -ansi -pedantic -pedantic-errors valitest.c -o valitest
./valitest
;;
"C++" )
echo "${GPERF} -I -L C++ $@ > valitest.c"
${GPERF} -I -L C++ "$@" > valitest.c
verbose ${CXX} ${CXXFLAGS} ${CPPFLAGS} -ansi -pedantic -pedantic-errors -DCPLUSPLUS_TEST valitest.c -o valitest
./valitest
;;
esac
done
exit 0