adjust generated source directory
add generate logic