commit bash-20150828 snapshot

This commit is contained in:
Chet Ramey
2015-09-11 14:19:06 -04:00
parent d7935593ab
commit 4eb81d59d0
97 changed files with 9204 additions and 6704 deletions
+25 -4
View File
@@ -1,7 +1,7 @@
#
# Simple makefile for the sample loadable builtins
#
# Copyright (C) 1996-2009 Free Software Foundation, Inc.
# Copyright (C) 1996-2015 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,6 +17,9 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
# Include some boilerplate Gnu makefile definitions.
prefix = @prefix@
@@ -27,7 +30,9 @@ infodir = @infodir@
includedir = @includedir@
datarootdir = @datarootdir@
loadablesdir = @loadablesdir@
headersdir = @headersdir@
topdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
@@ -110,7 +115,7 @@ unsupported:
@echo "${topdir}/support/shobj-conf script."
@echo "If your operating system provides facilities for dynamic"
@echo "loading of shared objects using the dlopen(3) interface,"
@echo "please update the script and re-run configure.
@echo "please update the script and re-run configure."
@echo "Please send the changes you made to bash-maintainers@gnu.org"
@echo "for inclusion in future bash releases."
@@ -219,19 +224,35 @@ mostlyclean: clean
-( cd perl && ${MAKE} ${MFLAGS} $@ )
distclean maintainer-clean: clean
$(RM) Makefile pushd.c
$(RM) Makefile Makefile.inc pushd.c
-( cd perl && ${MAKE} ${MFLAGS} $@ )
installdirs:
@${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(loadablesdir)
install: all installdirs
install-dev:
@$(INSTALL_DATA) Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.inc
@( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" install-headers)
install-supported: all installdirs install-dev
@echo installing example loadable builtins in $(DESTDIR)${loadablesdir}
@for prog in ${ALLPROG}; do \
echo $$prog ; \
$(INSTALL_PROGRAM) $(INSTALLMODE) $$prog $(DESTDIR)$(loadablesdir)/$$prog ;\
done
uninstall-dev:
-$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc
-( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" uninstall-headers)
uninstall-supported: uninstall-dev
-( cd $(DESTDIR)${loadablesdir} && $(RM) ${ALLPROG} )
install-unsupported:
uninstall-unsupported:
install: install-$(SHOBJ_STATUS)
uninstall: uninstall-$(SHOBJ_STATUS)
print.o: print.c
truefalse.o: truefalse.c
+108
View File
@@ -0,0 +1,108 @@
#
# Sample makefile for bash loadable builtin development
#
# Copyright (C) 2015 Free Software Foundation, Inc.
# This program 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.
#
# This program 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, see <http://www.gnu.org/licenses/>.
#
PACKAGE = @PACKAGE_NAME@
VERSION = @PACKAGE_VERSION@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
# Include some boilerplate Gnu makefile definitions.
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
infodir = @infodir@
includedir = @includedir@
datarootdir = @datarootdir@
loadablesdir = @loadablesdir@
headersdir = @headersdir@
topdir = @top_srcdir@
BUILD_DIR = @BUILD_DIR@
srcdir = @srcdir@
VPATH = @srcdir@
# Support an alternate destination root directory for package building
DESTDIR =
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
INSTALLMODE= -m 0755
@SET_MAKE@
CC = @CC@
RM = rm -f
SHELL = @MAKE_SHELL@
host_os = @host_os@
host_cpu = @host_cpu@
host_vendor = @host_vendor@
CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@
DEFS = @DEFS@
LOCAL_DEFS = @LOCAL_DEFS@
CPPFLAGS = @CPPFLAGS@
BASHINCDIR = ${topdir}/include
SUPPORT_SRC = $(topdir)/support/
LIBBUILD = ${BUILD_DIR}/lib
INTL_LIBSRC = ${topdir}/lib/intl
INTL_BUILDDIR = ${LIBBUILD}/intl
INTL_INC = @INTL_INC@
LIBINTL_H = @LIBINTL_H@
CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS)
#
# These values are generated for configure by ${topdir}/support/shobj-conf.
# If your system is not supported by that script, but includes facilities for
# dynamic loading of shared objects, please update the script and send the
# changes to bash-maintainers@gnu.org.
#
SHOBJ_CC = @SHOBJ_CC@
SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
SHOBJ_LD = @SHOBJ_LD@
SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ @LDFLAGS@
SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
SHOBJ_LIBS = @SHOBJ_LIBS@
SHOBJ_STATUS = @SHOBJ_STATUS@
INC = -I$(headersdir) -I$(headersdir)/include -I$(headersdir)/builtins
.c.o:
$(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
all: example
example: example.o
$(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS)
example.o: example.c
+1
View File
@@ -25,6 +25,7 @@
#include "builtins.h"
#include "shell.h"
int
necho_builtin (list)
WORD_LIST *list;
{