gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, cmake, updated. 79c0ad1fe45d4f14e21d4f2f


From: Juergen Kahrs
Subject: [gawk-diffs] [SCM] gawk branch, cmake, updated. 79c0ad1fe45d4f14e21d4f2f984f6b4c7c83fdae
Date: Sun, 10 Feb 2013 19:43:36 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, cmake has been updated
       via  79c0ad1fe45d4f14e21d4f2f984f6b4c7c83fdae (commit)
      from  1fa5be5e29fb1a7096173be2b76c4b83d8e41b28 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=79c0ad1fe45d4f14e21d4f2f984f6b4c7c83fdae

commit 79c0ad1fe45d4f14e21d4f2f984f6b4c7c83fdae
Author: Juergen Kahrs <address@hidden>
Date:   Sun Feb 10 20:43:26 2013 +0100

    Packaging a minimal .tar.gz file with the gawk executable and all binary 
extension library files.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba43a61..f67d3d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -275,6 +275,8 @@ set (GAWK_SOURCES ${GAWK_SOURCES}
 
 add_executable (gawk ${GAWK_SOURCES})
 target_link_libraries (gawk m ${EXTRA_LIBS})
+set(CPACK_PACKAGING_INSTALL_PREFIX /usr)
+install(PROGRAMS ${CMAKE_BINARY_DIR}/gawk DESTINATION bin)
 
 # Beware: before building the extension, -DGAWK gets undefined.
 add_subdirectory(extension)
@@ -285,3 +287,15 @@ if(NOT ${CMAKE_CROSSCOMPILING} STREQUAL "TRUE")
   add_subdirectory(doc)
 endif()
 
+include(InstallRequiredSystemLibraries)
+SET(CPACK_GENERATOR "TGZ")
+SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "This is GNU Awk ${GAWK_VERSION}")
+SET(CPACK_PACKAGE_NAME "gawk")
+SET(CPACK_PACKAGE_VERSION "${GAWK_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MAJOR "${GAWK_MAJOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_MINOR "${GAWK_MINOR_VERSION}")
+SET(CPACK_PACKAGE_VERSION_PATCH "${GAWK_BUGFIX_VERSION}")
+SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
+SET(CPACK_RESOURCE_FILE_README  "${CMAKE_SOURCE_DIR}/README")
+
+INCLUDE(CPack)
diff --git a/extension/CMakeLists.txt b/extension/CMakeLists.txt
index bb8b51f..9013bda 100644
--- a/extension/CMakeLists.txt
+++ b/extension/CMakeLists.txt
@@ -26,61 +26,45 @@
 
 remove_definitions(-DGAWK)
 
-add_library (filefuncs MODULE filefuncs.c stack.c gawkfts.c)
-target_link_libraries (filefuncs)
-set_target_properties(filefuncs PROPERTIES PREFIX "")
+MACRO(BuildExtension name sources)
+  add_library (${name} MODULE ${sources})
+  target_link_libraries(${name})
+  set_target_properties(${name} PROPERTIES PREFIX "")
+  install(PROGRAMS 
${CMAKE_BINARY_DIR}/extension/${name}${CMAKE_SHARED_LIBRARY_SUFFIX} DESTINATION 
lib)
+ENDMACRO(BuildExtension)
+
+BuildExtension(filefuncs filefuncs.c stack.c gawkfts.c)
 
 DefineFunctionIfAvailable(fnmatch HAVE_FNMATCH)
 DefineHFileIfAvailable(fnmatch.h HAVE_FNMATCH_H)
 if (${HAVE_FNMATCH} AND ${HAVE_FNMATCH_H})
-  add_library (fnmatch MODULE fnmatch.c)
-  target_link_libraries (fnmatch)
-  set_target_properties(fnmatch PROPERTIES PREFIX "")
+  BuildExtension(fnmatch fnmatch.c)
 else()
   message(WARNING "extension fnmatch cannot be built because function fnmatch 
or fnmatch.h is missing")
 endif()
 
-add_library (fork MODULE fork.c)
-target_link_libraries (fork)
-set_target_properties(fork PROPERTIES PREFIX "")
-
-add_library (inplace MODULE inplace.c)
-target_link_libraries (inplace)
-set_target_properties(inplace PROPERTIES PREFIX "")
-
-add_library (ordchr MODULE ordchr.c)
-target_link_libraries (ordchr)
-set_target_properties(ordchr PROPERTIES PREFIX "")
+BuildExtension(fork fork.c)
+BuildExtension(inplace inplace.c)
+BuildExtension(ordchr ordchr.c)
 
 DefineHFileIfAvailable(dirent.h HAVE_DIRENT_H)
 if (${HAVE_DIRENT_H})
-  add_library (readdir MODULE readdir.c)
-  target_link_libraries (readdir)
-set_target_properties(readdir PROPERTIES PREFIX "")
+  BuildExtension(readdir readdir.c)
 else()
   message(WARNING "extension readdir cannot be built because function readdir 
is missing")
 endif()
 
-add_library (readfile MODULE readfile.c)
-target_link_libraries (readfile)
-set_target_properties(readfile PROPERTIES PREFIX "")
-
-add_library (revoutput MODULE revoutput.c)
-target_link_libraries (revoutput)
-set_target_properties(revoutput PROPERTIES PREFIX "")
+BuildExtension(readfile readfile.c)
+BuildExtension(revoutput revoutput.c)
 
 DefineFunctionIfAvailable(getdtablesize HAVE_GETDTABLESIZE)
 if (${HAVE_GETDTABLESIZE})
-  add_library (revtwoway MODULE revtwoway.c)
-  target_link_libraries (revtwoway)
-  set_target_properties(revtwoway PROPERTIES PREFIX "")
+  BuildExtension(revtwoway revtwoway.c)
 else()
   message(WARNING "extension revtwoway cannot be built because function 
getdtablesize is missing")
 endif()
 
-add_library (rwarray MODULE rwarray.c)
-target_link_libraries (rwarray)
-set_target_properties(rwarray PROPERTIES PREFIX "")
+BuildExtension(rwarray rwarray.c)
 
 DefineFunctionIfAvailable(select HAVE_SELECT)
 DefineFunctionIfAvailable(gettimeofday HAVE_GETTIMEOFDAY)
@@ -88,11 +72,7 @@ DefineHFileIfAvailable(sys/select.h HAVE_SYS_SELECT_H)
 DefineFunctionIfAvailable(nanosleep HAVE_NANOSLEEP)
 DefineHFileIfAvailable(time.h HAVE_TIME_H)
 DefineFunctionIfAvailable(GetSystemTimeAsFileTime HAVE_GETSYSTEMTIMEASFILETIME)
-add_library (time MODULE time.c)
-target_link_libraries (time)
-set_target_properties(time PROPERTIES PREFIX "")
+BuildExtension(time time.c)
 
-add_library (testext MODULE testext.c)
-target_link_libraries (testext)
-set_target_properties(testext PROPERTIES PREFIX "")
+BuildExtension(testext testext.c)
 

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt           |   14 +++++++++++
 extension/CMakeLists.txt |   58 +++++++++++++++-------------------------------
 2 files changed, 33 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]