@echo off
SetLocal EnableDelayedExpansion

set args="%*"
set include_args=%args:-E -v -=%

if NOT !args!==!include_args! (
    echo '#include "..." search starts here:
    echo #include ^<...^> search starts here:
    echo ^ @install_dir@/sdk/@release@/targets/opt/cross/armv7hl-meego-linux-gnueabi/include/c++/12.3.1
    echo ^ @install_dir@/sdk/@release@/targets/opt/cross/armv7hl-meego-linux-gnueabi/include/c++/12.3.1/armv7hl-meego-linux-gnueabi
    echo ^ @install_dir@/sdk/@release@/targets/opt/cross/armv7hl-meego-linux-gnueabi/include/c++/12.3.1/backward
    echo ^ @install_dir@/sdk/@release@/targets/opt/cross/lib/gcc/armv7hl-meego-linux-gnueabi/12.3.1/include
    echo ^ @install_dir@/sdk/@release@/targets/opt/cross/lib/gcc/armv7hl-meego-linux-gnueabi/12.3.1/include-fixed
    echo ^ @install_dir@/sdk/@release@/targets/armv7hl-meego-linux-gnueabi/usr/include
echo End of search list.'
) else (
    if "%1"=="-print-search-dirs" (
        echo install: @install_dir@/sdk/@release@/targets/armv7hl-meego-linux-gnueabi/usr/lib64/gcc/armv7hl-meego-linux-gnueabi/12.3.1/
    ) else (
    docker run -i --rm --cap-add=SYS_ADMIN --security-opt apparmor:unconfined @docker_image_tag@ armv7hl-meego-linux-gnueabi-g++ %*
    )
)
