aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
Diffstat (limited to 'extension')
-rw-r--r--extension/CMakeLists.txt84
-rw-r--r--extension/ChangeLog14
-rw-r--r--extension/Makefile.am5
-rw-r--r--extension/Makefile.in5
4 files changed, 106 insertions, 2 deletions
diff --git a/extension/CMakeLists.txt b/extension/CMakeLists.txt
new file mode 100644
index 00000000..1bb4ceb1
--- /dev/null
+++ b/extension/CMakeLists.txt
@@ -0,0 +1,84 @@
+#
+# extension/CMakeLists.txt --- CMake input file for gawk
+#
+# Copyright (C) 2013
+# the Free Software Foundation, Inc.
+#
+# This file is part of GAWK, the GNU implementation of the
+# AWK Programming Language.
+#
+# GAWK is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# GAWK is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+#
+
+## process this file with CMake to produce Makefile
+
+# Remove the definition of GAWK because of gawkapi.h.
+remove_definitions(-DGAWK)
+
+MACRO(BuildExtension name sources)
+ add_library (${name} MODULE ${sources} ${ARGN})
+ target_link_libraries(${name} ${EXTRA_LIBS})
+ set_target_properties(${name} PROPERTIES PREFIX "")
+ install(PROGRAMS ${CMAKE_BINARY_DIR}/extension/${name}${CMAKE_SHARED_LIBRARY_SUFFIX} DESTINATION lib)
+ENDMACRO(BuildExtension)
+
+if (${HAVE_STRUCT_STAT_ST_BLKSIZE})
+ BuildExtension(filefuncs filefuncs.c stack.c gawkfts.c)
+else()
+ message(STATUS "extension filefuncs cannot be built because HAVE_STRUCT_STAT_ST_BLKSIZE is missing")
+endif()
+
+if (HAVE_FNMATCH AND HAVE_FNMATCH_H)
+ BuildExtension(fnmatch fnmatch.c)
+else()
+ message(STATUS "extension fnmatch cannot be built because function fnmatch or fnmatch.h is missing")
+endif()
+
+if (${HAVE_SYS_WAIT_H})
+ BuildExtension(fork fork.c)
+else()
+ message(STATUS "extension fork cannot be built because HAVE_SYS_WAIT_H is missing")
+endif()
+
+if (${HAVE_MKSTEMP})
+ BuildExtension(inplace inplace.c)
+else()
+ message(STATUS "extension inplace cannot be built because HAVE_MKSTEMP is missing")
+endif()
+
+BuildExtension(ordchr ordchr.c)
+
+if (HAVE_DIRENT_H AND HAVE_DIRFD)
+ BuildExtension(readdir readdir.c)
+else()
+ message(STATUS "extension readdir cannot be built because function readdir is missing")
+endif()
+
+BuildExtension(readfile readfile.c)
+
+BuildExtension(revoutput revoutput.c)
+
+if (${HAVE_GETDTABLESIZE})
+ BuildExtension(revtwoway revtwoway.c)
+else()
+ message(STATUS "extension revtwoway cannot be built because function getdtablesize is missing")
+endif()
+
+BuildExtension(rwarray rwarray.c)
+
+BuildExtension(time time.c)
+
+BuildExtension(testext testext.c)
+
diff --git a/extension/ChangeLog b/extension/ChangeLog
index d555d0e4..c7974e48 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,17 @@
+2014-08-12 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (RM): Define for makes that don't have it,
+ such as on OpenBSD. Thanks to Jeremie Courreges-Anglas
+ <jca@wxcvbn.org> for the report.
+
+2014-06-13 Paul Gortmaker <paul.gortmaker@windriver.com>
+
+ * Makefile.am (uninstall-so): Came across below bug while cross
+ compiling, and changed both install-data-hook and uninstall-so
+ to use $(DESTDIR) on v4.1.1 before seeing most of the fix in
+ gawk-4.1.1-3-g976f73ab0356; here we ensure uninstall-so also
+ uses the $(DESTDIR) prefix on its use of pkgextensiondir.
+
2014-04-11 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (install-data-hook): Use $(DESTDIR) when removing
diff --git a/extension/Makefile.am b/extension/Makefile.am
index bfc12472..c8b1f53c 100644
--- a/extension/Makefile.am
+++ b/extension/Makefile.am
@@ -29,6 +29,9 @@ AM_CPPFLAGS = -I$(srcdir)/..
# correctly after changing configure.ac
ACLOCAL_AMFLAGS = -I m4
+# For some make's, e.g. OpenBSD, that don't define this
+RM = rm -f
+
# Note: rwarray does not currently compile.
pkgextension_LTLIBRARIES = \
@@ -115,7 +118,7 @@ install-data-hook:
# Keep the uninstall check working:
uninstall-so:
- $(RM) $(pkgextensiondir)/*.so
+ $(RM) $(DESTDIR)$(pkgextensiondir)/*.so
uninstall-recursive: uninstall-so
diff --git a/extension/Makefile.in b/extension/Makefile.in
index edd43399..821d6112 100644
--- a/extension/Makefile.in
+++ b/extension/Makefile.in
@@ -527,6 +527,9 @@ AM_CPPFLAGS = -I$(srcdir)/..
# correctly after changing configure.ac
ACLOCAL_AMFLAGS = -I m4
+# For some make's, e.g. OpenBSD, that don't define this
+RM = rm -f
+
# Note: rwarray does not currently compile.
pkgextension_LTLIBRARIES = \
errno.la \
@@ -1268,7 +1271,7 @@ install-data-hook:
# Keep the uninstall check working:
uninstall-so:
- $(RM) $(pkgextensiondir)/*.so
+ $(RM) $(DESTDIR)$(pkgextensiondir)/*.so
uninstall-recursive: uninstall-so