| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
|
| 4 |
FLAVOR=$1 |
| 5 |
echo install/cdargs: Handling install of emacsen flavor ${FLAVOR} |
| 6 |
|
| 7 |
byte_compile_options="-batch -f batch-byte-compile" |
| 8 |
elc_dir=/usr/share/${FLAVOR}/site-lisp/cdargs/ |
| 9 |
|
| 10 |
echo install/cdargs: byte-compiling for ${FLAVOR} |
| 11 |
|
| 12 |
[ -d ${elc_dir} ] || mkdir ${elc_dir} |
| 13 |
|
| 14 |
# Create symlinks to the .el files (see section 6E in debian-emacs |
| 15 |
# polcy). This makes complation easy, and also allows find-function |
| 16 |
# and find-library to work properly. |
| 17 |
if [ ${FLAVOR} != "emacs" ]; then |
| 18 |
(cd ${elc_dir} && cp -s ../../../emacs/site-lisp/cdargs/*.el .) |
| 19 |
fi |
| 20 |
|
| 21 |
# Byte compile them |
| 22 |
(cd ${elc_dir} && ${FLAVOR} ${byte_compile_options} *.el > /dev/null 2>&1) |
| 23 |
|
| 24 |
exit 0; |