Update build script to support @function tag