Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Side by Side Diff: third_party/libpng/scripts/genchk.cmake.in

Issue 2033063003: Check libpng directly into third_party/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: public.bzl Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # genchk.cmake.in
2 # Generate .chk from .out with awk (generic), based upon the automake logic.
3
4 # Copyright (C) 2016 Glenn Randers-Pehrson
5 # Written by Roger Leigh, 2016
6
7 # This code is released under the libpng license.
8 # For conditions of distribution and use, see the disclaimer
9 # and license in png.h
10
11 # Variables substituted from CMakeLists.txt
12 set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")
13
14 set(AWK "@AWK@")
15
16 get_filename_component(INPUTEXT "${INPUT}" EXT)
17 get_filename_component(OUTPUTEXT "${OUTPUT}" EXT)
18 get_filename_component(INPUTBASE "${INPUT}" NAME_WE)
19 get_filename_component(OUTPUTBASE "${OUTPUT}" NAME_WE)
20 get_filename_component(INPUTDIR "${INPUT}" PATH)
21 get_filename_component(OUTPUTDIR "${OUTPUT}" PATH)
22
23 if("${INPUTEXT}" STREQUAL ".out" AND "${OUTPUTEXT}" STREQUAL ".chk")
24 # Generate .chk from .out with awk (generic)
25 file(REMOVE "${OUTPUT}" "${OUTPUTDIR}/${OUTPUTBASE}.new")
26 execute_process(COMMAND "${AWK}" -f "${SRCDIR}/scripts/checksym.awk"
27 "${SRCDIR}/scripts/${INPUTBASE}.def"
28 "of=${OUTPUTDIR}/${OUTPUTBASE}.new"
29 "${INPUT}"
30 RESULT_VARIABLE AWK_FAIL)
31 if(AWK_FAIL)
32 message(FATAL_ERROR "Failed to generate ${OUTPUTDIR}/${OUTPUTBASE}.new")
33 endif()
34 file(RENAME "${OUTPUTDIR}/${OUTPUTBASE}.new" "${OUTPUT}")
35 else()
36 message(FATAL_ERROR "Unsupported conversion: ${INPUTEXT} to ${OUTPUTEXT}")
37 endif()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698