Edit

kc3-lang/kc3/update_sources

Branch :

  • update_sources
  • #!/bin/sh
    set -e
    
    . ./config.subr
    
    echo "# sources.mk generated by update_sources" > ${SOURCES_MK}
    echo "# sources.sh generated by update_sources" > ${SOURCES_SH}
    
    C3_CONFIGURES="$(find c3c c3s ic3 libc3 libtommath test ucd2c -name configure -or -name update_sources)"
    sources C3_CONFIGURES "$C3_CONFIGURES"
    
    C3_MAKEFILES="$(find c3c c3s ic3 libc3 libtommath test ucd2c -name Makefile -or -name gen.mk)"
    C3_MAKEFILES="$(echo "$C3_MAKEFILES" | grep -v 'libtommath/logs/Makefile')"
    sources C3_MAKEFILES "$C3_MAKEFILES"
    
    C3_C_SOURCES="$(find c3c c3s ic3 libc3 test -name "[a-z]*.c" -or -name "[a-z]*.h" -or -name "[a-z]*.c.in" -or -name "[a-z]*.h.in")"
    C3_C_SOURCES="$(echo "${C3_C_SOURCES}" | grep -Ev '^libc3/config[.]h$')"
    C3_C_SOURCES="$C3_C_SOURCES
    ucd2c/ucd.h
    ucd2c/ucd2c.c"
    sources C3_C_SOURCES "$C3_C_SOURCES"
    
    update_sources_mk
    update_sources_sh
    
    ( cd libtommath && ./update_sources; )
    ( cd libc3 && ./update_sources; )
    ( cd ic3 && ./update_sources; )
    ( cd c3s && ./update_sources; )
    ( cd test && ./update_sources; )