--- examples/loadables/Makefile.in +++ examples/loadables/Makefile.in 2009-06-09 16:16:25.000000000 +0000 @@ -28,6 +28,9 @@ includedir = @includedir@ datarootdir = @datarootdir@ +# Support an alternate destination root directory for package building +DESTDIR = + topdir = @top_srcdir@ BUILD_DIR = @BUILD_DIR@ srcdir = @srcdir@ @@ -61,6 +64,16 @@ LIBINTL_H = @LIBINTL_H@ CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS) +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALLMODE= -m 0755 +INSTALLMODE2 = -m 0555 + +Name = bash +Version = @BASHVERS@ + # # These values are generated for configure by ${topdir}/support/shobj-conf. # If your system is not supported by that script, but includes facilities for @@ -79,20 +92,45 @@ INC = -I. -I.. -I$(topdir) -I$(topdir)/l -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \ -I$(BUILD_DIR)/builtins $(INTL_INC) +.SUFFIXES: .d +.c.d: + $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -MM -MT install-headers -MF $@ $< + .c.o: $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< +SUPPORT_SRC = $(topdir)/support/ ALLPROG = print sleep finfo logname basename dirname \ tty pathchk tee head mkdir rmdir printenv id whoami \ uname sync push ln unlink cut realpath getconf strftime mypid OTHERPROG = necho hello cat +HEADERS = all: $(SHOBJ_STATUS) supported: $(ALLPROG) others: $(OTHERPROG) +dependlist: template.d +-include template.d +install-headers: HEADERS = $(sort $(filter %.h,$(realpath $^))) +install-headers: + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(includedir)/$(Name)/$(Version)/builtins + for head in $(subst $(realpath $(topdir))/,,$(HEADERS)) ; do \ + case $$head in \ + builtins/*) dest=$(DESTDIR)$(includedir)/$(Name)/$(Version)/builtins ;; \ + *) dest=$(DESTDIR)$(includedir)/$(Name)/$(Version) ;; \ + esac; \ + $(INSTALL_DATA) -t $$dest $(topdir)/$$head; \ + done + +install-plugins: $(ALLPROG) + @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(libdir)/$(Name)/$(Version) + for plugin in $(ALLPROG) ; do \ + $(INSTALL) $$plugin $(DESTDIR)$(libdir)/$(Name)/$(Version)/$$plugin.so ; \ + done + unsupported: @echo "Your system (${host_os}) is not supported by the" @echo "${topdir}/support/shobj-conf script."