summaryrefslogtreecommitdiff
path: root/editors/emacs20/patches/patch-ae
blob: 6614f360f15554023c7e8d7efb42a9a480ff3583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
$NetBSD: patch-ae,v 1.2 2010/02/04 06:40:19 dholland Exp $

--- Makefile.in.orig	1999-04-09 19:16:24.000000000 +0000
+++ Makefile.in
@@ -295,12 +295,12 @@ install-arch-dep: mkdir
 	    exec_prefix=${exec_prefix} bindir=${bindir} \
 	    libexecdir=${libexecdir} archlibdir=${archlibdir} \
 	    INSTALL_STRIP=${INSTALL_STRIP})
-	${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${bindir}/emacs-${version}
-	-chmod 1755  ${bindir}/emacs-${version}
-	rm -f ${bindir}/$(EMACS)
-	-ln ${bindir}/emacs-${version} ${bindir}/$(EMACS)
+	${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs ${DESTDIR}${bindir}/emacs-${version}
+	-chmod 1755  ${DESTDIR}${bindir}/emacs-${version}
+	rm -f ${DESTDIR}${bindir}/$(EMACS)
+	-ln ${DESTDIR}${bindir}/emacs-${version} ${DESTDIR}${bindir}/$(EMACS)
 	for f in `cd lib-src && echo fns-*.el`; do \
-	  ${INSTALL_DATA} lib-src/$$f ${archlibdir}/$$f; \
+	  ${INSTALL_DATA} lib-src/$$f ${DESTDIR}${archlibdir}/$$f; \
 	done
 
 ### Install the files that are machine-independent.
@@ -313,22 +313,24 @@ install-arch-dep: mkdir
 install-arch-indep: mkdir
 	-set ${COPYDESTS} ; \
 	for dir in ${COPYDIR} ; do \
-	  if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
-	    rm -rf $$1 ; \
+	  if [ `(cd ${DESTDIR}$$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
+	    rm -rf ${DESTDIR}$$1 ; \
 	  fi ; \
 	  shift ; \
 	done
 	-set ${COPYDESTS} ; \
-	mkdir ${COPYDESTS} ; \
-	chmod ugo+rx ${COPYDESTS} ; \
+	for dir in ${COPYDESTS} ; do \
+	  mkdir ${DESTDIR}$${dir} ; \
+	  chmod ugo+rx ${DESTDIR}$${dir} ; \
+	done; \
 	for dir in ${COPYDIR} ; do \
 	  dest=$$1 ; shift ; \
 	  [ -d $${dir} ] \
-	  && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
-	  && (echo "Copying $${dir} to $${dest}..." ; \
+	  && [ `(cd $${dir} && /bin/pwd)` != `(cd ${DESTDIR}$${dest} && /bin/pwd)` ] \
+	  && (echo "Copying $${dir} to ${DESTDIR}$${dest}..." ; \
 	      (cd $${dir}; tar -cf - . ) \
-		|(cd $${dest};umask 022; tar -xvf - && cat > /dev/null); \
-	      for subdir in `find $${dest} -type d ! -name RCS -print` ; do \
+		|(cd ${DESTDIR}$${dest};umask 022; tar -xvf - && cat > /dev/null); \
+	      for subdir in `find ${DESTDIR}$${dest} -type d ! -name RCS -print` ; do \
 		chmod a+rx $${subdir} ; \
 		rm -rf $${subdir}/RCS ; \
 		rm -rf $${subdir}/CVS ; \
@@ -341,72 +343,69 @@ install-arch-indep: mkdir
 		rm -f  $${subdir}/dired.todo ; \
 	      done) ; \
 	done
-	-rm -f ${lispdir}/subdirs.el
-	$(srcdir)/update-subdirs ${lispdir}
-	if [ -f ${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \
+	-rm -f ${DESTDIR}${lispdir}/subdirs.el
+	$(srcdir)/update-subdirs ${DESTDIR}${lispdir}
+	if [ -f ${DESTDIR}${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \
 	then true; \
 	else \
 	  (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
 	   echo "    (normal-top-level-add-subdirs-to-load-path))") \
-	    > ${datadir}/emacs/${version}/site-lisp/subdirs.el; \
+	    > ${DESTDIR}${datadir}/emacs/${version}/site-lisp/subdirs.el; \
 	fi
-	chmod a+r ${datadir}/emacs/${version}/site-lisp/subdirs.el
-	-if [ -f ${datadir}/emacs/site-lisp/subdirs.el ]; \
+	chmod a+r ${DESTDIR}${datadir}/emacs/${version}/site-lisp/subdirs.el
+	-if [ -f ${DESTDIR}${datadir}/emacs/site-lisp/subdirs.el ]; \
 	then true; \
 	else \
 	  (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
 	   echo "    (normal-top-level-add-subdirs-to-load-path))") \
-	    > ${datadir}/emacs/site-lisp/subdirs.el; \
+	    > ${DESTDIR}${datadir}/emacs/site-lisp/subdirs.el; \
 	fi
-	-chmod a+r ${datadir}/emacs/site-lisp/subdirs.el
-	if [ `(cd ./etc; /bin/pwd)` != `(cd ${docdir}; /bin/pwd)` ]; \
+	-chmod a+r ${DESTDIR}${datadir}/emacs/site-lisp/subdirs.el
+	if [ `(cd ./etc; /bin/pwd)` != `(cd ${DESTDIR}${docdir}; /bin/pwd)` ]; \
 	then \
-	   echo "Copying etc/DOC-* to ${docdir} ..." ; \
+	   echo "Copying etc/DOC-* to ${DESTDIR}${docdir} ..." ; \
 	   (cd ./etc; tar -cf - DOC*) \
-	     |(cd ${docdir}; umask 0; tar -xvf - && cat > /dev/null); \
-	   (cd $(docdir); chmod a+r DOC*; rm DOC); \
+	     |(cd ${DESTDIR}${docdir}; umask 0; tar -xvf - && cat > /dev/null); \
+	   (cd ${DESTDIR}$(docdir); chmod a+r DOC*; rm DOC); \
 	else true; fi
 	if [ -r ./lisp ] \
 	   && [ -r ./lisp/simple.el ] \
-	   && [ x`(cd ./lisp; /bin/pwd)` != x`(cd ${lispdir}; /bin/pwd)` ] \
+	   && [ x`(cd ./lisp; /bin/pwd)` != x`(cd ${DESTDIR}${lispdir}; /bin/pwd)` ] \
 	   && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \
 	then \
-	   echo "Copying lisp/*.el and lisp/*.elc to ${lispdir} ..." ; \
+	   echo "Copying lisp/*.el and lisp/*.elc to ${DESTDIR}${lispdir} ..." ; \
 	   (cd lisp; tar -cf - *.el *.elc) \
-	     |(cd ${lispdir}; umask 0; tar -xvf - && cat > /dev/null); \
+	     |(cd ${DESTDIR}${lispdir}; umask 0; tar -xvf - && cat > /dev/null); \
 	else true; fi
 	thisdir=`/bin/pwd`; \
-	if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
+	if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${DESTDIR}${infodir} && /bin/pwd)` ]; \
 	then \
 	  (cd ${infodir};  \
 	   if [ -f dir ]; then true; \
 	   else	\
 	     (cd $${thisdir}; \
-	      ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir; \
-	      chmod a+r ${infodir}/dir); \
+	      ${INSTALL_DATA} ${srcdir}/info/dir ${DESTDIR}${infodir}/dir; \
+	      chmod a+r ${DESTDIR}${infodir}/dir); \
 	   fi; \
 	   cd ${srcdir}/info ; \
-	   for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* info* message* mh-e* reftex* sc* vip* widget*; do \
+	   for f in ccmode* cl* dired-x* ediff* emacs* forms* gnus* message* mh-e* reftex* sc* vip* widget*; do \
 	     (cd $${thisdir}; \
-	      ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \
-	      chmod a+r ${infodir}/$$f); \
+	      ${INSTALL_DATA} ${srcdir}/info/$$f ${DESTDIR}${infodir}/$$f); \
 	   done); \
 	else true; fi
-	-thisdir=`/bin/pwd`; \
-	if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \
-	then \
-	  for f in ccmode cl dired-x ediff emacs forms gnus info message mh-e reftex sc vip viper widget; do \
-	    (cd $${thisdir}; \
-	     ${INSTALL_INFO} --dir-file=${infodir}/dir --info-file=${infodir}/$$f); \
-	  done; \
-	else true; fi
-	-chmod -R a+r ${datadir}/emacs ${COPYDESTS} ${infodir}
+	-chmod -R a+rX ${DESTDIR}${datadir}/emacs ${DESTDIR}${infodir}
+	-for dir in ${COPYDESTS}; do chmod -R a+rX ${DESTDIR}$$dir; done
 	thisdir=`/bin/pwd`; \
 	cd ${srcdir}/etc; \
 	for page in emacs etags ctags ; do \
 	  (cd $${thisdir}; \
-	   ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${man1dir}/$${page}${manext}; \
-	   chmod a+r ${man1dir}/$${page}${manext}); \
+	   if [ $${page} = emacs ]; then \
+	     ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${DESTDIR}${man1dir}/$${page}${manext}; \
+	     chmod a+r ${DESTDIR}${man1dir}/$${page}${manext}; \
+	   else \
+	     ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${DESTDIR}${man1dir}/emacs-$${page}${manext}; \
+	     chmod a+r ${DESTDIR}${man1dir}/emacs-$${page}${manext}; \
+	   fi) \
 	done
 
 ### Install LEIM files.  Although they are machine-independent, we
@@ -425,9 +424,9 @@ install-strip:
 ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use mkinstalldirs
 ### instead of mkdir.  Not all systems' mkdir programs have the `-p' flag.
 mkdir: FRC
-	if [ -d ${datadir} ]; then true; else \
+	if [ -d ${DESTDIR}${datadir} ]; then true; else \
 	  $(srcdir)/mkinstalldirs ${datadir}; \
-	  chmod a+r ${datadir};\
+	  chmod a+rX ${DESTDIR}${datadir};\
 	fi
 	$(srcdir)/mkinstalldirs ${COPYDESTS} ${infodir} ${man1dir} \
 	  ${bindir} ${docdir} ${libexecdir} \
@@ -458,7 +457,7 @@ uninstall:
 	    esac ;					\
 	  fi ;						\
 	done
-	(cd ${infodir} && rm -f cl* dired-x* ediff* emacs* forms* gnus* info* mh-e* sc* vip*)
+	(cd ${infodir} && rm -f cl* dired-x* ediff* emacs* forms* gnus* mh-e* sc* vip*)
 	(cd ${man1dir}  && rm -f emacs.1 etags.1 ctags.1)
 	(cd ${bindir}  && rm -f emacs-${version} $(EMACS))