- ln ChangeLog Makefile makefile.nt ChangeLog.? README ../${tempdir}/lisp
- cd ../${tempdir}/lisp
- rm -f TAGS =*
- rm -f subdirs.el
- rm -f site-init site-init.el site-init.elc
- rm -f site-load site-load.el site-load.elc
- rm -f site-start site-start.el site-start.elc
- rm -f default default.el default.elc)
-
-#echo "Making links to \`lisp/calc-2.02'"
-#### Don't distribute =*.el files, TAGS or backups.
-#(cd lisp/calc-2.02
-# ln [a-zA-Z]*.el ../../${tempdir}/lisp/calc-2.02
-# ln [a-zA-Z]*.elc ../../${tempdir}/lisp/calc-2.02
-# ln calc.info* calc.texinfo calc-refcard.* ../../${tempdir}/lisp/calc-2.02
-# ln INSTALL Makefile README README.prev ../../${tempdir}/lisp/calc-2.02
-# cd ../../${tempdir}/lisp/calc-2.02
-# rm -f *~ TAGS)
-
-echo "Making links to \`lisp/term'"
-### Don't distribute =*.el files or TAGS.
-(cd lisp/term
- ln [a-zA-Z]*.el ../../${tempdir}/lisp/term
- ln [a-zA-Z]*.elc ../../${tempdir}/lisp/term
- ln README ../../${tempdir}/lisp/term
- rm -f =* TAGS)
+ ln ChangeLog ChangeLog.*[0-9] ../${tempdir}/lisp
+ ln Makefile.in makefile.w32-in ../${tempdir}/lisp
+ test -f README && ln README ../${tempdir}/lisp
+ (cd ../${tempdir}/lisp
+ rm -f TAGS =*
+ rm -f site-init site-init.el site-init.elc
+ rm -f site-load site-load.el site-load.elc
+ rm -f site-start site-start.el site-start.elc
+ rm -f default default.el default.elc
+ )
+
+ ## Find all subdirs of lisp dir
+ for file in `find . -type d -print`; do
+ case $file in
+ . | .. | */Old | */CVS | */RCS | */=*)
+ ;;
+ *)
+ if [ -d $file ]; then
+ subdirs="$file $subdirs"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $subdirs; do
+ echo " lisp/$file"
+ mkdir ../${tempdir}/lisp/$file
+ ln $file/[a-zA-Z0-9]*.el ../${tempdir}/lisp/$file
+ ln $file/[a-zA-Z0-9]*.elc ../${tempdir}/lisp/$file
+ for img in $file/[a-zA-Z]*.xpm $file/[a-zA-Z]*.xbm $file/[a-zA-Z]*.pbm; do
+ if [ -f $img ]; then
+ ln $img ../${tempdir}/lisp/$file
+ fi
+ done
+ if [ -f $file/README ]; then
+ ln $file/README ../${tempdir}/lisp/$file
+ fi
+
+ if [ -f $file/ChangeLog ]; then
+ ln $file/ChangeLog ../${tempdir}/lisp/$file
+ for f in $file/ChangeLog.*[0-9]; do
+ if [ -f $f ]; then
+ ln $f ../${tempdir}/lisp/$file
+ fi
+ done
+ fi
+ done )
+
+echo "Making links to \`leim' and its subdirectories"
+### Don't distribute TAGS, or =*.el files.
+(cd leim
+ ln makefile.w32-in ../${tempdir}/leim
+ ln ChangeLog README ../${tempdir}/leim
+
+ ln CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
+ ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC
+ ln MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
+ ln ja-dic/*.el ja-dic/*.elc ../${tempdir}/leim/ja-dic
+ ln Makefile.in ../${tempdir}/leim/Makefile.in
+ ln leim-ext.el ../${tempdir}/leim/leim-ext.el
+ ## Lisp files that start with a capital are generated from TIT
+ ## dictionaries so we don't distribute them.
+ ln quail/[a-z]*.el quail/[a-z]*.elc ../${tempdir}/leim/quail
+ rm -f ../${tempdir}/leim/quail/quick-b5.*
+ rm -f ../${tempdir}/leim/quail/quick-cns.*
+ rm -f ../${tempdir}/leim/quail/tsang-b5.*
+ rm -f ../${tempdir}/leim/quail/tsang-cns.*
+
+ cd ../${tempdir}/leim
+ rm -f TAGS =* */=*)