2006-12-19 00:16:41 +01:00
|
|
|
--- Makefile.in
|
|
|
|
+++ Makefile.in
|
|
|
|
@@ -50,9 +50,13 @@
|
|
|
|
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) $(STRIP)' install
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
- $(MKDIR) $(libdir) $(bindir) $(sbindir) $(includedir) $(sysconfdir); \
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(libdir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(bindir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(sbindir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(includedir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(sysconfdir); \
|
|
|
|
if test "x@ELISP@" != "x" ; then \
|
|
|
|
- $(MKDIR) $(lispdir) ; \
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(lispdir) ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
### GENERIC
|
|
|
|
--- Makefile.include.in
|
|
|
|
+++ Makefile.include.in
|
|
|
|
@@ -37,6 +37,7 @@
|
|
|
|
INSTALL = @INSTALL@
|
|
|
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|
|
|
INSTALL_DATA = @INSTALL_DATA@
|
|
|
|
+INSTALL_DIR = @INSTALL@ -d
|
|
|
|
LN_S = @LN_S@
|
|
|
|
EMACS = @EMACS@
|
|
|
|
ELISP = @ELISP@
|
|
|
|
--- doc/Makefile.in
|
|
|
|
+++ doc/Makefile.in
|
|
|
|
@@ -112,29 +112,18 @@
|
|
|
|
# install & uninstall
|
|
|
|
|
|
|
|
installdirs:
|
|
|
|
- $(MKDIR) $(man1dir) $(man7dir) $(man8dir) $(infodir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(man1dir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(man7dir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(man8dir)
|
|
|
|
+ $(INSTALL_DIR) $(DESTDIR)$(infodir)
|
|
|
|
|
|
|
|
install: all installdirs
|
|
|
|
- $(INSTALL_DATA) -m 644 mev.1 $(man1dir)
|
|
|
|
- $(INSTALL_DATA) -m 644 mouse-test.1 $(man1dir)
|
|
|
|
- $(INSTALL_DATA) -m 644 gpm-root.1 $(man1dir)
|
|
|
|
- $(INSTALL_DATA) -m 644 gpm-types.7 $(man7dir)
|
|
|
|
- $(INSTALL_DATA) -m 644 gpm.8 $(man8dir)
|
|
|
|
- $(INSTALL_DATA) -m 644 $(srcdir)/gpm.info $(infodir)
|
|
|
|
- # Use install-info if available
|
|
|
|
- -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
|
|
|
|
- if [ -f $(infodir)/dir ] ; then \
|
|
|
|
- install-info --dir-file=$(infodir)/dir $(infodir)/gpm.info; \
|
|
|
|
- fi; \
|
|
|
|
- fi
|
|
|
|
- #itz Sat Dec 26 23:21:05 PST 1998
|
|
|
|
- #i keep all my infopages compressed and i'm tired to do it by
|
|
|
|
- #hand, so check if there are any compressed pages and do this
|
|
|
|
- #one too
|
|
|
|
- -ls $(infodir)/*[-.]info.gz >/dev/null 2>&1 \
|
|
|
|
- && gzip -f $(infodir)/gpm.info
|
|
|
|
- # Hmm.... shouldn't man pages be compressed too?
|
|
|
|
- # maybe they should, but at least at my system they are not.
|
|
|
|
+ $(INSTALL_DATA) -m 644 mev.1 $(DESTDIR)$(man1dir)
|
|
|
|
+ $(INSTALL_DATA) -m 644 mouse-test.1 $(DESTDIR)$(man1dir)
|
|
|
|
+ $(INSTALL_DATA) -m 644 gpm-root.1 $(DESTDIR)$(man1dir)
|
|
|
|
+ $(INSTALL_DATA) -m 644 gpm-types.7 $(DESTDIR)$(man7dir)
|
|
|
|
+ $(INSTALL_DATA) -m 644 gpm.8 $(DESTDIR)$(man8dir)
|
|
|
|
+ $(INSTALL_DATA) -m 644 $(srcdir)/gpm.info $(DESTDIR)$(infodir)
|
|
|
|
|
|
|
|
# This potentially leaves around cached manpages,
|
|
|
|
# e.g. /var/cache/man/cat1/mev.1.gz. Deleting these is not our job,
|
|
|
|
--- src/Makefile.in
|
|
|
|
+++ src/Makefile.in
|
2007-02-15 18:13:22 +01:00
|
|
|
@@ -91,15 +91,16 @@
|
2006-12-19 00:16:41 +01:00
|
|
|
installdirs:
|
|
|
|
|
|
|
|
install: check
|
|
|
|
- $(INSTALL_PROGRAM) gpm $(sbindir)/gpm
|
|
|
|
- $(INSTALL_DATA) -m 644 lib/libgpm.a $(libdir)/libgpm.a
|
|
|
|
- $(INSTALL_DATA) -m 644 $(srcdir)/headers/gpm.h $(includedir)/gpm.h
|
|
|
|
+ $(INSTALL_PROGRAM) gpm $(DESTDIR)$(sbindir)/gpm
|
|
|
|
+ $(INSTALL_DATA) -m 644 lib/libgpm.a $(DESTDIR)$(libdir)/libgpm.a
|
|
|
|
+ $(INSTALL_DATA) -m 644 $(srcdir)/headers/gpm.h $(DESTDIR)$(includedir)/gpm.h
|
|
|
|
# POSIX requires the range of a for loop be nonempty and Bash
|
|
|
|
# 2.x goes along; unfortunately that means an additional
|
|
|
|
# headache in cases like this
|
|
|
|
if test "x@SHLIB@" != "x" ; then \
|
|
|
|
- $(INSTALL_DATA) -m 644 lib/libgpm.so.@abi_full@ $(libdir)/libgpm.so.@abi_full@ ;\
|
|
|
|
- cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ;\
|
|
|
|
+ $(INSTALL_DATA) -m 755 lib/libgpm.so.@abi_full@ $(DESTDIR)$(libdir)/libgpm.so.@abi_full@ ;\
|
|
|
|
+ cd $(DESTDIR)$(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ;\
|
2007-02-15 18:13:22 +01:00
|
|
|
+ cd $(DESTDIR)$(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so.@abi_lev@;\
|
2006-12-19 00:16:41 +01:00
|
|
|
echo "WARNING: We installed a lib, you should now call ldconfig" ; \
|
|
|
|
echo "f.i.: ldconfig -n -l $(libdir)/libgpm.so.@abi_full@" ;\
|
|
|
|
echo "Or to update everything just type ldconfig"; \
|
2007-02-15 18:13:22 +01:00
|
|
|
@@ -107,7 +108,7 @@
|
2006-12-19 00:16:41 +01:00
|
|
|
|
|
|
|
# prog/
|
|
|
|
for i in $(PROG); do \
|
|
|
|
- $(INSTALL_PROGRAM) $$i $(bindir)/`echo $$i | sed 's,prog/,,'` ;\
|
|
|
|
+ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(bindir)/`echo $$i | sed 's,prog/,,'` ;\
|
|
|
|
done
|
|
|
|
|
|
|
|
install-strip:
|
|
|
|
--- src/special.c
|
|
|
|
+++ src/special.c
|
|
|
|
@@ -155,7 +155,7 @@
|
|
|
|
open(GPM_NULL_DEV,O_RDONLY); /* stdin */
|
|
|
|
open(option.consolename,O_WRONLY); /* stdout */
|
|
|
|
dup(1); /* stderr */
|
|
|
|
- for (i=3;i<OPEN_MAX; i++) close(i);
|
|
|
|
+ for (i=3;i<getdtablesize(); i++) close(i);
|
|
|
|
execl("/bin/sh","sh","-c",command,(char *)NULL);
|
|
|
|
exit(1); /* shouldn't happen */
|
|
|
|
|