Commit e77ff475 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

cmake: Make the *.c *.h script generation compatible with cmake's trunk.

parent 5667d99f
......@@ -200,10 +200,10 @@ add_custom_command(
OUTPUT ${rev}
COMMAND rm -f ${rev} ${rev}.tmp
COMMAND mkdir -p ${rev_dir}
COMMAND echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > ${rev}.tmp
COMMAND printf "const char psz_vlc_changeset[] = \"" >> ${rev}.tmp
COMMAND sh -c "printf `LANG=C svnversion ${CMAKE_SOURCE_DIR} || printf \"exported\"`" >> ${rev}.tmp
COMMAND echo "\";" >> ${rev}.tmp
COMMAND sh -c "echo '/* AUTOGENERATED FILE - DO NOT EDIT */' > ${rev}.tmp"
COMMAND sh -c "printf 'const char psz_vlc_changeset[] = \"' >> ${rev}.tmp"
COMMAND sh -c "printf `LANG=C svnversion ${CMAKE_SOURCE_DIR} || printf \"exported\"` >> ${rev}.tmp"
COMMAND sh -c "echo '\";' >> ${rev}.tmp"
COMMAND mv -f ${rev}.tmp ${rev}
VERBATIM
)
......@@ -219,9 +219,9 @@ exec_program(dirname ARGS ${builtin} OUTPUT_VARIABLE builtin_dir)
add_custom_command(
OUTPUT ${builtin}
COMMAND mkdir -p ${builtin_dir}
COMMAND echo "/* Auto generated by ${CMAKE_CURRENT_BUILD_DIR}/CMakeLists.txt */" > ${builtin}
COMMAND echo "int vlc_entry__main( module_t* );" >> ${builtin}
COMMAND echo "#define ALLOCATE_ALL_BUILTINS() do {} while(0)" >> ${builtin}
COMMAND sh -c "echo '/* Auto generated by ${CMAKE_CURRENT_BUILD_DIR}/CMakeLists.txt */' > ${builtin}"
COMMAND sh -c "echo 'int vlc_entry__main( module_t* );' >> ${builtin}"
COMMAND sh -c "echo '#define ALLOCATE_ALL_BUILTINS() do {} while(0)' >> ${builtin}"
VERBATIM
)
set(should)
......@@ -235,17 +235,17 @@ add_custom_command(
OUTPUT ${about}
COMMAND rm -f "${about}.tmp"
COMMAND mkdir -p ${about_dir}
COMMAND echo "/* Automatically generated file - DO NOT EDIT */" > "${about}.tmp"
COMMAND echo "static const char psz_license[] =" >> "${about}.tmp"
COMMAND cat ${CMAKE_SOURCE_DIR}/COPYING | sed s/\"/''/g | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }" >> "${about}.tmp"
COMMAND echo ";" >> "${about}.tmp"
COMMAND echo "static const char psz_thanks[] =" >> "${about}.tmp"
COMMAND grep -v '$$Id:' ${CMAKE_SOURCE_DIR}/THANKS | sed "s/\"/''/g" | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }"|sed "s/\"<.*.> \"//" >> "${about}.tmp"
COMMAND echo ";" >> "${about}.tmp"
COMMAND echo "static const char psz_authors[] =" >> "${about}.tmp"
COMMAND grep N: ${CMAKE_SOURCE_DIR}/AUTHORS | cut -d "\ " -f 2- | sed "s/\"/''/g" | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }" >> "${about}.tmp"
COMMAND echo ";" >> "${about}.tmp"
COMMAND mv -f -- "${about}.tmp" "${about}"
COMMAND sh -c "echo '/* Automatically generated file - DO NOT EDIT */' > ${about}.tmp"
COMMAND sh -c "echo 'static const char psz_license[] =' >> ${about}.tmp"
COMMAND sh -c "cat ${CMAKE_SOURCE_DIR}/COPYING | sed s/\\\"/''/g | awk '{ print \"\\\"\"$0\"\\\\n\\\"\" }' >> ${about}.tmp"
COMMAND sh -c "echo ';' >> ${about}.tmp"
COMMAND sh -c "echo 'static const char psz_thanks[] =' >> ${about}.tmp"
COMMAND sh -c "grep -v '$$Id:' ${CMAKE_SOURCE_DIR}/THANKS | sed 's/\"/''/g' | awk '{ print \"\\\"\"$0\"\\\\n\\\"\" }'|sed 's/\"<.*.> \"//' >> ${about}.tmp"
COMMAND sh -c "echo ';' >> ${about}.tmp"
COMMAND sh -c "echo 'static const char psz_authors[] =' >> ${about}.tmp"
COMMAND sh -c "grep N: ${CMAKE_SOURCE_DIR}/AUTHORS | cut -d '\ ' -f 2- | sed 's/\"/''/g' | awk '{ print \"\\\"\"$0\"\\\\n\\\"\" }' >> ${about}.tmp"
COMMAND sh -c "echo ';' >> ${about}.tmp"
COMMAND sh -c "mv -f -- ${about}.tmp ${about}"
DEPENDS ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/THANKS ${CMAKE_SOURCE_DIR}/COPYING
VERBATIM
)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment