VirtualBox

source: vbox/trunk/src/libs/libpng-1.6.36/scripts/genchk.cmake.in@ 77662

最後變更 在這個檔案從77662是 76030,由 vboxsync 提交於 6 年 前

libpng-1.6.36: properly export to OSE, and while at it fix EOL style for shell scripts

  • 屬性 svn:eol-style 設為 native
檔案大小: 1.4 KB
 
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
12set(SRCDIR "@CMAKE_CURRENT_SOURCE_DIR@")
13
14set(AWK "@AWK@")
15
16get_filename_component(INPUTEXT "${INPUT}" EXT)
17get_filename_component(OUTPUTEXT "${OUTPUT}" EXT)
18get_filename_component(INPUTBASE "${INPUT}" NAME_WE)
19get_filename_component(OUTPUTBASE "${OUTPUT}" NAME_WE)
20get_filename_component(INPUTDIR "${INPUT}" PATH)
21get_filename_component(OUTPUTDIR "${OUTPUT}" PATH)
22
23if("${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}")
35else()
36 message(FATAL_ERROR "Unsupported conversion: ${INPUTEXT} to ${OUTPUTEXT}")
37endif()
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette