update dist task to support conditional compilation