Changeset 171297 in webkit
- Timestamp:
- Jul 21, 2014 2:04:59 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r171249 r171297 1 2014-07-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Simplify make-dist command line arguments 4 https://bugs.webkit.org/show_bug.cgi?id=134832 5 6 Reviewed by Martin Robinson. 7 8 * Source/PlatformGTK.cmake: Use --version instead of 9 --tarball-root when running make-dist.py. 10 1 11 2014-07-18 Jon Honeycutt <jhoneycutt@apple.com> 2 12 -
trunk/Source/PlatformGTK.cmake
r170965 r171297 58 58 --source-dir=${CMAKE_SOURCE_DIR} 59 59 --build-dir=${CMAKE_BINARY_DIR} 60 --tarball-root=/webkitgtk-${PROJECT_VERSION} 61 -o ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar 60 --version=${PROJECT_VERSION} 62 61 ${TOOLS_DIR}/gtk/manifest.txt 63 62 ) … … 82 81 --source-dir=${CMAKE_SOURCE_DIR} 83 82 --build-dir=${CMAKE_BINARY_DIR} 84 --tarball-root=/webkitgtk-${PROJECT_VERSION} 85 -o ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar 83 --version=/webkitgtk-${PROJECT_VERSION} 86 84 ${TOOLS_DIR}/gtk/manifest.txt 87 85 COMMAND xz -f ${CMAKE_BINARY_DIR}/webkitgtk-${PROJECT_VERSION}.tar -
trunk/Tools/ChangeLog
r171296 r171297 1 2014-07-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Simplify make-dist command line arguments 4 https://bugs.webkit.org/show_bug.cgi?id=134832 5 6 Reviewed by Martin Robinson. 7 8 Remove --tarball-root and -o command line options and add 9 --version, since the version can be used to build both, the 10 tarball root and the output filename. When the version it's not 11 provided, the pkg-config file is used to get the version. Also 12 change the default value of build-dir to the current directory, 13 since it's very common to call make-dist.py from the build dir. 14 15 * gtk/make-dist.py: 16 (get_tarball_root_and_output_filename_from_arguments): 17 1 18 2014-07-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Tools/gtk/make-dist.py
r170965 r171297 265 265 setattr(namespace, self.dest, os.path.abspath(values)) 266 266 267 def ensure_version_if_possible(arguments): 268 if arguments.version is not None: 269 return 270 271 pkgconfig_file = os.path.join(arguments.build_dir, "Source/WebKit2/webkit2gtk-3.0.pc") 272 if os.path.isfile(pkgconfig_file): 273 p = subprocess.Popen(['pkg-config', '--modversion', pkgconfig_file], stdout=subprocess.PIPE) 274 version = p.communicate()[0] 275 if version: 276 arguments.version = version.rstrip('\n') 277 278 279 def get_tarball_root_and_output_filename_from_arguments(arguments): 280 tarball_root = "webkitgtk" 281 if arguments.version is not None: 282 tarball_root += '-' + arguments.version 283 284 output_filename = os.path.join(arguments.build_dir, tarball_root + ".tar") 285 return tarball_root, output_filename 286 267 287 parser = argparse.ArgumentParser(description='Build a distribution bundle.') 268 288 parser.add_argument('-c', '--check', action='store_true', … … 271 291 help='The top-level directory of the source distribution. ' + \ 272 292 'Directory for relative paths. Defaults to current directory.') 273 parser.add_argument('-- tarball-root', type=str, default='/',274 help='The top-level path of the tarball. By default files are added to the root of the tarball.')275 parser.add_argument('-b', '--build-dir', type=str, action=FilePathAction, default= None,293 parser.add_argument('--version', type=str, default=None, 294 help='The version of the tarball to generate') 295 parser.add_argument('-b', '--build-dir', type=str, action=FilePathAction, default=os.getcwd(), 276 296 help='The top-level path of directory of the build root. ' + \ 277 'By default there is no build root.') 278 parser.add_argument('-o', type=str, action=FilePathAction, default='out.tar', dest="output_filename", 279 help='The tarfile to produce. By default this is "out.tar"') 297 'By default is the current directory.') 280 298 parser.add_argument('manifest_filename', metavar="manifest", type=str, action=FilePathAction, help='The path to the manifest file.') 281 299 … … 287 305 os.chdir(arguments.source_dir) 288 306 289 manifest = Manifest(arguments.manifest_filename, arguments.source_dir, arguments.build_dir, arguments.tarball_root) 290 manifest.create_tarfile(arguments.output_filename) 307 ensure_version_if_possible(arguments) 308 tarball_root, output_filename = get_tarball_root_and_output_filename_from_arguments(arguments) 309 310 manifest = Manifest(arguments.manifest_filename, arguments.source_dir, arguments.build_dir, tarball_root) 311 manifest.create_tarfile(output_filename) 291 312 292 313 if arguments.check: 293 Distcheck(arguments.source_dir, arguments.build_dir).check( arguments.output_filename)314 Distcheck(arguments.source_dir, arguments.build_dir).check(output_filename)
Note: See TracChangeset
for help on using the changeset viewer.