comparison make-dist @ 5206:810820d03e24

When breaking links, use cp -p. Copy install.sh into distribution. Move the temp dir up into the parent dir; don't leave the staging dir make-dist.tmp... in existence.
author Richard M. Stallman <rms@gnu.org>
date Sun, 28 Nov 1993 11:38:10 +0000
parents 9f18f50000e5
children f2e4b574a4e9
comparison
equal deleted inserted replaced
5205:7242044549aa 5206:810820d03e24
72 if grep -s "GNU Emacs version ${version}" ./man/emacs.texi > /dev/null; then 72 if grep -s "GNU Emacs version ${version}" ./man/emacs.texi > /dev/null; then
73 true 73 true
74 else 74 else
75 echo "You must update the version number in \`./man/emacs.texi'" 75 echo "You must update the version number in \`./man/emacs.texi'"
76 sleep 5 76 sleep 5
77 fi
78
79 ### Make sure we don't already have a directory emacs-${version}.
80
81 emacsname="emacs-${version}${new_extension}"
82
83 if [ -d ${emacsname} ]
84 then
85 echo Directory "${emacsname}" already exists >&2
86 exit 1
77 fi 87 fi
78 88
79 ### Make sure the subdirectory is available. 89 ### Make sure the subdirectory is available.
80 tempparent="make-dist.tmp.$$" 90 tempparent="make-dist.tmp.$$"
81 if [ -d ${tempparent} ]; then 91 if [ -d ${tempparent} ]; then
106 116
107 ### Update getdate.c. 117 ### Update getdate.c.
108 (cd lib-src; make -f Makefile.in getdate.c YACC="bison -y") 118 (cd lib-src; make -f Makefile.in getdate.c YACC="bison -y")
109 119
110 echo "Creating staging directory: \`${tempparent}'" 120 echo "Creating staging directory: \`${tempparent}'"
121
111 mkdir ${tempparent} 122 mkdir ${tempparent}
112 emacsname="emacs-${version}${new_extension}"
113 tempdir="${tempparent}/${emacsname}" 123 tempdir="${tempparent}/${emacsname}"
114 124
115 ### This trap ensures that the staging directory will be cleaned up even 125 ### This trap ensures that the staging directory will be cleaned up even
116 ### when the script is interrupted in mid-career. 126 ### when the script is interrupted in mid-career.
117 if [ "${clean_up}" = yes ]; then 127 if [ "${clean_up}" = yes ]; then
127 ### README while the rest of the tar file is still unpacking. Whoopee. 137 ### README while the rest of the tar file is still unpacking. Whoopee.
128 echo "Making links to top-level files." 138 echo "Making links to top-level files."
129 ln GETTING.GNU.SOFTWARE INSTALL PROBLEMS README move-if-change ${tempdir} 139 ln GETTING.GNU.SOFTWARE INSTALL PROBLEMS README move-if-change ${tempdir}
130 ln ChangeLog Makefile.in build-ins.in configure configure.in ${tempdir} 140 ln ChangeLog Makefile.in build-ins.in configure configure.in ${tempdir}
131 ln make-dist vpath.sed ${tempdir} 141 ln make-dist vpath.sed ${tempdir}
132 ### Copy config.guess and config.sub; they're cross-filesystem symlinks. 142 ### Copy these files; they're cross-filesystem symlinks.
133 cp config.sub ${tempdir} 143 cp config.sub ${tempdir}
134 cp config.guess ${tempdir} 144 cp config.guess ${tempdir}
145 cp install.sh ${tempdir}
135 146
136 echo "Updating version number in README." 147 echo "Updating version number in README."
137 (cd ${tempdir} 148 (cd ${tempdir}
138 awk \ 149 awk \
139 '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 } 150 '$1 " " $2 " " $3 " " $4 " " $5 == "This directory tree holds version" { $6 = version; print $0 }
336 fi 347 fi
337 348
338 if [ "${clean_up}" = yes ]; then 349 if [ "${clean_up}" = yes ]; then
339 echo "Cleaning up the staging directory." 350 echo "Cleaning up the staging directory."
340 rm -rf ${tempparent} 351 rm -rf ${tempparent}
352 else
353 (cd ${tempparent}; mv ${emacsname} ..)
354 rm -rf ${tempparent}
341 fi 355 fi
342 356
343 ### make-dist ends here 357 ### make-dist ends here