Retire wiki-printer

It is not used anymore and is currently broken.

Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
Alexey Neyman 2017-11-19 00:16:21 -08:00
parent 63e91f4eba
commit f1cca2a7c2
2 changed files with 39 additions and 139 deletions

View File

@ -31,7 +31,6 @@ help-samples::
help-distrib::
@echo ' check-samples - Verify if samples need updates due to Kconfig changes'
@echo ' update-samples - Regenerate sample configurations using the current Kconfig'
@echo ' wiki-samples - Print a DokuWiki table of samples'
help-env::
@echo ' CT_PREFIX=dir - install samples in dir (see action "build-all", above).'
@ -110,22 +109,6 @@ check-samples: $(patsubst %,check-%,$(CT_SAMPLES))
update-samples:
$(SILENT)$(MAKE) -rf $(CT_NG) check-samples CT_UPDATE_SAMPLES=yes
PHONY += wiki-samples
wiki-samples: wiki-samples-pre $(patsubst %,wiki-%,$(CT_SAMPLES)) wiki-samples-post
wiki-samples-pre: FORCE
$(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -w
wiki-samples-post: FORCE
$(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -W $(CT_SAMPLES)
$(patsubst %,wiki-%,$(CT_SAMPLES)): wiki-%:
$(SILENT)KCONFIG_CONFIG=$$(pwd)/.config.sample \
$(CONF) --defconfig=$(call sample_dir,$*)/crosstool.config \
$(KCONFIG_TOP) >/dev/null
$(SILENT)$(bash) $(CT_LIB_DIR)/scripts/showSamples.sh -w $*
$(SILENT)rm -f .config.sample
# ----------------------------------------------------------
# This part deals with saving/restoring samples

View File

@ -6,8 +6,6 @@
. "${CT_LIB_DIR}/scripts/functions"
[ "$1" = "-v" ] && opt="$1" && shift
[ "$1" = "-w" ] && opt="$1" && shift
[ "$1" = "-W" ] && opt="$1" && shift
# GREP_OPTIONS screws things up.
export GREP_OPTIONS=
@ -29,10 +27,8 @@ dump_pkg_desc() {
# Note: we use the specific .config.sample config file
dump_single_sample() {
local verbose=0
local wiki=0
local complibs
[ "$1" = "-v" ] && verbose=1 && shift
[ "$1" = "-w" ] && wiki=1 && shift
local sample="$1"
. $(pwd)/.config.sample
@ -55,132 +51,53 @@ dump_single_sample() {
fi
;;
esac
if [ ${wiki} -eq 0 ]; then
width=14
printf "[%s" "${sample_type}"
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf "."
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf "."
printf "] %s\n" "${sample}"
if [ ${verbose} -ne 0 ]; then
case "${CT_TOOLCHAIN_TYPE}" in
cross) ;;
canadian)
printf " %-*s : %s\n" ${width} "Host" "${CT_HOST}"
;;
esac
if [ "${CT_KERNEL}" != "bare-metal" ]; then
printf " %-*s :" ${width} "OS" && dump_pkg_desc KERNEL && printf "\n"
fi
printf " %-*s :" ${width} "Companion libs"
[ -z "${CT_GMP}" ] || dump_pkg_desc GMP
[ -z "${CT_MPFR}" ] || dump_pkg_desc MPFR
[ -z "${CT_ISL}" ] || dump_pkg_desc ISL
[ -z "${CT_CLOOG}" ] || dump_pkg_desc CLOOG
[ -z "${CT_MPC}" ] || dump_pkg_desc MPC
[ -z "${CT_LIBELF}" -a -z "${CT_LIBELF_TARGET}" ] || dump_pkg_desc LIBELF
[ -z "${CT_EXPAT}" -a -z "${CT_EXPAT_TARGET}" ] || dump_pkg_desc EXPAT
[ -z "${CT_NCURSES}" -a -z "${CT_NCURSES_TARGET}" ] || dump_pkg_desc NCURSES
printf "\n"
printf " %-*s :" ${width} "Binutils" && dump_pkg_desc BINUTILS && printf "\n"
printf " %-*s :" ${width} "Compilers" && dump_pkg_desc CC && printf "\n"
printf " %-*s : %s" ${width} "Languages" "C"
[ "${CT_CC_LANG_CXX}" = "y" ] && printf ",C++"
[ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ",Fortran"
[ "${CT_CC_LANG_JAVA}" = "y" ] && printf ",Java"
[ "${CT_CC_LANG_ADA}" = "y" ] && printf ",ADA"
[ "${CT_CC_LANG_OBJC}" = "y" ] && printf ",Objective-C"
[ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ",Objective-C++"
[ "${CT_CC_LANG_GOLANG}" = "y" ] && printf ",Go"
[ -n "${CT_CC_LANG_OTHERS}" ] && printf ",${CT_CC_LANG_OTHERS}"
printf "\n"
printf " %-*s :" ${width} "C library" && dump_pkg_desc LIBC && printf " (threads: %s)\n" "${CT_THREADS}"
printf " %-*s :" ${width} "Tools"
[ "${CT_DEBUG_DUMA}" ] && dump_pkg_desc DUMA
[ "${CT_DEBUG_GDB}" ] && dump_pkg_desc GDB
[ "${CT_DEBUG_LTRACE}" ] && dump_pkg_desc LTRACE
[ "${CT_DEBUG_STRACE}" ] && dump_pkg_desc STRACE
printf "\n"
fi
else
width=14
printf "[%s" "${sample_type}"
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf "."
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf "."
printf "] %s\n" "${sample}"
if [ ${verbose} -ne 0 ]; then
case "${CT_TOOLCHAIN_TYPE}" in
cross)
printf "| ''${sample}'' | "
;;
cross) ;;
canadian)
printf "| ''"
printf "${sample}" |${sed} -r -e 's/.*,//'
printf "'' | ${CT_HOST} "
printf " %-*s : %s\n" ${width} "Host" "${CT_HOST}"
;;
*) ;;
esac
printf "| "
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "**X**"
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "**B**"
printf " | ''${CT_KERNEL}'' |"
if [ "${CT_KERNEL}" != "bare-metal" ];then
if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
printf " //custom// "
else
printf " " && dump_pkg_version "${CT_KERNEL}" && printf " "
fi
if [ "${CT_KERNEL}" != "bare-metal" ]; then
printf " %-*s :" ${width} "OS" && dump_pkg_desc KERNEL && printf "\n"
fi
printf "| " && dump_pkg_version "binutils" && printf " "
printf "| ${CT_CC} | " && dump_pkg_version "${CT_CC}" && printf " "
printf "| ''${libc_name}'' |"
if [ "${libc_name}" != "none" ]; then
printf " ${libc_ver} "
fi
printf "| ${CT_THREADS:-none} "
printf "| ${CT_ARCH_FLOAT} "
printf "| C"
[ "${CT_CC_LANG_CXX}" = "y" ] && printf ", C++"
[ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ", Fortran"
[ "${CT_CC_LANG_JAVA}" = "y" ] && printf ", Java"
[ "${CT_CC_LANG_ADA}" = "y" ] && printf ", ADA"
[ "${CT_CC_LANG_OBJC}" = "y" ] && printf ", Objective-C"
[ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ", Objective-C++"
[ -n "${CT_CC_LANG_OTHERS}" ] && printf "\\\\\\\\ Others: ${CT_CC_LANG_OTHERS}"
printf " "
( . "${sample_top}/samples/${sample}/reported.by"
if [ -n "${reporter_name}" ]; then
if [ -n "${reporter_url}" ]; then
printf "| [[${reporter_url}|${reporter_name}]] "
else
printf "| ${reporter_name} "
fi
else
printf "| (//unknown//) "
fi
)
sample_updated="$( git log -n1 --pretty=format:'%ci' "${sample_top}/samples/${sample}" \
|${awk} '{ print $1; }' )"
printf "| ${sample_updated} "
echo "|"
printf " %-*s :" ${width} "Companion libs"
[ -z "${CT_GMP}" ] || dump_pkg_desc GMP
[ -z "${CT_MPFR}" ] || dump_pkg_desc MPFR
[ -z "${CT_ISL}" ] || dump_pkg_desc ISL
[ -z "${CT_CLOOG}" ] || dump_pkg_desc CLOOG
[ -z "${CT_MPC}" ] || dump_pkg_desc MPC
[ -z "${CT_LIBELF}" -a -z "${CT_LIBELF_TARGET}" ] || dump_pkg_desc LIBELF
[ -z "${CT_EXPAT}" -a -z "${CT_EXPAT_TARGET}" ] || dump_pkg_desc EXPAT
[ -z "${CT_NCURSES}" -a -z "${CT_NCURSES_TARGET}" ] || dump_pkg_desc NCURSES
printf "\n"
printf " %-*s :" ${width} "Binutils" && dump_pkg_desc BINUTILS && printf "\n"
printf " %-*s :" ${width} "Compilers" && dump_pkg_desc CC && printf "\n"
printf " %-*s : %s" ${width} "Languages" "C"
[ "${CT_CC_LANG_CXX}" = "y" ] && printf ",C++"
[ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ",Fortran"
[ "${CT_CC_LANG_JAVA}" = "y" ] && printf ",Java"
[ "${CT_CC_LANG_ADA}" = "y" ] && printf ",ADA"
[ "${CT_CC_LANG_OBJC}" = "y" ] && printf ",Objective-C"
[ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ",Objective-C++"
[ "${CT_CC_LANG_GOLANG}" = "y" ] && printf ",Go"
[ -n "${CT_CC_LANG_OTHERS}" ] && printf ",${CT_CC_LANG_OTHERS}"
printf "\n"
printf " %-*s :" ${width} "C library" && dump_pkg_desc LIBC && printf " (threads: %s)\n" "${CT_THREADS}"
printf " %-*s :" ${width} "Tools"
[ "${CT_DEBUG_DUMA}" ] && dump_pkg_desc DUMA
[ "${CT_DEBUG_GDB}" ] && dump_pkg_desc GDB
[ "${CT_DEBUG_LTRACE}" ] && dump_pkg_desc LTRACE
[ "${CT_DEBUG_STRACE}" ] && dump_pkg_desc STRACE
printf "\n"
fi
}
if [ "${opt}" = "-w" -a ${#} -eq 0 ]; then
printf "^ %s |||||||||||||||\n" "$( date "+%Y%m%d.%H%M %z" )"
printf "^ Target "
printf "^ Host "
printf "^ Status "
printf "^ Kernel headers\\\\\\\\ version ^"
printf "^ binutils\\\\\\\\ version "
printf "^ C compiler\\\\\\\\ version ^"
printf "^ C library\\\\\\\\ version ^"
printf "^ Threading\\\\\\\\ model "
printf "^ Floating point\\\\\\\\ support "
printf "^ Languages "
printf "^ Initially\\\\\\\\ reported by "
printf "^ Last\\\\\\\\ updated "
echo "^"
exit 0
elif [ "${opt}" = "-W" ]; then
printf "^ Total: ${#} samples || **X**: sample uses features marked as being EXPERIMENTAL.\\\\\\\\ **B**: sample is currently BROKEN. |||||||||||||"
echo ""
exit 0
fi
for sample in "${@}"; do
dump_single_sample ${opt} "${sample}"
done