]> code.delx.au - gnu-emacs/blobdiff - lisp/Makefile.in
(apropos-print): Omit command from M-x ... RET.
[gnu-emacs] / lisp / Makefile.in
index 9fa62e4625ee28eafbe5cc61b78c23f74bcb7d30..e87ffa6f26574d30a9e2523dab9f91d1a74acf37 100644 (file)
@@ -1,5 +1,5 @@
 # Maintenance productions for the Lisp directory
-# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2000, 01, 03, 2004  Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -65,6 +65,9 @@ DONTCOMPILE = \
        $(lisp)/international/mule-conf.el \
        $(lisp)/language/czech.el \
        $(lisp)/language/devanagari.el \
+       $(lisp)/language/malayalam.el \
+       $(lisp)/language/tamil.el \
+       $(lisp)/language/kannada.el \
        $(lisp)/language/english.el \
        $(lisp)/language/greek.el \
        $(lisp)/language/hebrew.el \
@@ -78,6 +81,7 @@ DONTCOMPILE = \
        $(lisp)/language/utf-8-lang.el \
        $(lisp)/language/georgian.el \
        $(lisp)/loaddefs.el \
+       $(lisp)/ldefs-boot.el \
        $(lisp)/loadup.el \
        $(lisp)/mail/blessmail.el \
        $(lisp)/patcomp.el \
@@ -106,6 +110,13 @@ DONTCOMPILE = \
        $(lisp)/term/wyse50.el \
        $(lisp)/version.el
 
+# Elisp files auto-generated.
+AUTOGENEL = loaddefs.el \
+       cus-load.el \
+       finder-inf.el \
+       subdirs.el \
+       eshell/esh-groups.el
+
 # Files to compile before others during a bootstrap.  This is done to
 # speed up the bootstrap process.  The CC files are compiled first
 # because CC mode tweaks the compilation process, and requiring
@@ -125,35 +136,35 @@ emacs = EMACSLOADPATH=$(lisp) $(EMACS) $(EMACSOPT)
 
 # Common command to find subdirectories
 
-setwins=subdirs=`find $$wd -type d -print`; \
+setwins=subdirs=`(cd $$wd; find . -type d -print)`; \
        for file in $$subdirs; do \
-          case $$file in */Old | */RCS | */CVS | */CVS/* | */=* ) ;; \
-               *) wins="$$wins $$file" ;; \
+          case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* ) ;; \
+               *) wins="$$wins $$wd/$$file" ;; \
           esac; \
         done
 
-finder_setwins=subdirs=`find $$wd -type d -print`; \
+setwins_almost=subdirs=`(cd $$wd; find . -type d -print)`; \
        for file in $$subdirs; do \
-          case $$file in */Old | */RCS | */CVS | */CVS/* | */=* | */obsolete | */term ) ;; \
-               *) wins="$$wins $$file" ;; \
+          case $$file in */Old | */RCS | */CVS | */CVS/* | */.* | */.*/* | */=* | */obsolete | */term ) ;; \
+               *) wins="$$wins $$wd/$$file" ;; \
           esac; \
         done
 
 doit:
 
-cus-load.el:
+$(lisp)/cus-load.el:
        touch $@
-custom-deps: cus-load.el doit
-       wd=$(lisp); $(setwins); \
+custom-deps: $(lisp)/cus-load.el doit
+       wd=$(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
-       $(EMACS) $(EMACSOPT) -l cus-dep -f custom-make-dependencies $$wins
+       $(EMACS) $(EMACSOPT) -l cus-dep --eval '(setq generated-custom-dependencies-file "$(lisp)/cus-load.el")' -f custom-make-dependencies $$wins
 
 finder-data: doit
-       wd=$(lisp); $(finder_setwins); \
+       wd=$(lisp); $(setwins_almost); \
        echo Directories: $$wins; \
-       $(EMACS) $(EMACSOPT) -l finder -f finder-compile-keywords-make-dist $$wins
+       $(EMACS) $(EMACSOPT) -l finder --eval '(setq generated-finder-keywords-file "$(lisp)/finder-inf.el")' -f finder-compile-keywords-make-dist $$wins
 
-loaddefs.el:
+$(lisp)/loaddefs.el:
        echo ";;; loaddefs.el --- automatically extracted autoloads" >> $@
        echo ";;" >> $@; echo ";;; Code:" >> $@
        echo "\f" >> $@
@@ -163,12 +174,12 @@ loaddefs.el:
        echo ";;; no-update-autoloads: t" >> $@
        echo ";;; End:" >> $@
        echo ";;; loaddefs.el ends here" >> $@
-autoloads: loaddefs.el doit
+autoloads: $(lisp)/loaddefs.el doit
        wd=$(lisp); $(setwins); \
        echo Directories: $$wins; \
        $(EMACS) $(EMACSOPT) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
 
-subdirs.el:
+$(lisp)/subdirs.el:
        $(MAKE) $(MFLAGS) update-subdirs
 update-subdirs: doit
        wd=$(lisp); $(setwins); \
@@ -184,16 +195,16 @@ update-authors:
        $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir)
 
 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
-       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs.el,,"`; \
+       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,,"`; \
        ${ETAGS} $$els
 
 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
-       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs.el,,"`; \
+       els=`echo $(lisptagsfiles1) $(lisptagsfiles2) | sed -e "s,$(lisp)/loaddefs[^ ]*,," -e "s,$(lisp)/ldefs-boot[^ ]*,,"`; \
        ${ETAGS} -o TAGS-LISP $$els
 
 .SUFFIXES: .elc .el
 
-.el.elc: subdirs.el
+.el.elc: $(lisp)/subdirs.el
        -$(emacs) -f batch-byte-compile $<
 
 $(DONTCOMPILE:.el=.elc):
@@ -214,7 +225,7 @@ $(DONTCOMPILE:.el=.elc):
 # $(DONTCOMPILE) twice.  This is in case one of the files in DONTCOMPILE
 # is absent.  -stef
 
-compile: subdirs.el doit
+compile: $(lisp)/subdirs.el doit
        find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1; \
        wd=$(lisp); $(setwins); \
        elpat=`echo $$wins | tr '       ' '\012\012' | \
@@ -231,8 +242,10 @@ compile: subdirs.el doit
 
 # Compile all Lisp files, except those from DONTCOMPILE.  This
 # is like `compile' but compiles files unconditionally.
-compile-always: subdirs.el doit
-       find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1; \
+compile-always: $(lisp)/subdirs.el doit
+       # `|| true' prevents old Bash versions from getting confused
+       # by an error.
+       find $(lisp) -name "*.elc" -print | xargs chmod +w >/dev/null 2>&1 || true; \
        wd=$(lisp); $(setwins); \
        elpat=`echo $$wins | tr '       ' '\012\012' | \
                sed -e 's|\(.\)$$|\1/|' -e 's|^\./||' -e 's|$$|*.el|'`; \
@@ -246,8 +259,8 @@ compile-always: subdirs.el doit
          fi \
        done
 
-compile-calc: 
-       for el in $(find $(lisp)/calc -name '*.el'); do \
+compile-calc:
+       for el in `find $(lisp)/calc -name '*.el'`; do \
          echo Compiling $$el; \
          $(emacs) -f batch-byte-compile $$el || exit 1; \
        done
@@ -267,22 +280,51 @@ compile-after-backup: backup-compiled-files compile-always
 # Note that this doesn't create .elc files.  It only recompiles if an
 # .elc is present.
 
-recompile: doit
-       $(EMACS) $(EMACSOPT) -f batch-byte-recompile-directory $(lisp)
+recompile: doit $(lisp)/progmodes/cc-mode.elc
+       $(EMACS) $(EMACSOPT) --eval "(batch-byte-recompile-directory 0)" $(lisp)
+
+# CC Mode uses a compile time macro system which causes a compile time
+# dependency in cc-mode.elc on the macros in cc-langs.el and the
+# version string in cc-defs.el.
+$(lisp)/progmodes/cc-mode.elc: \
+       $(lisp)/progmodes/cc-mode.el \
+       $(lisp)/progmodes/cc-langs.el \
+       $(lisp)/progmodes/cc-defs.el
+       $(EMACS) $(EMACSOPT) -f batch-byte-compile $(lisp)/progmodes/cc-mode.el
 
-# Prepare a bootstrap in the lisp subdirectory.  Build loaddefs.el,
-# because it's not sure it's up-to-date, and if it's not, that might
-# lead to errors during the bootstrap because something fails to
-# autoload as expected.  Remove compiled Lisp files so that
-# bootstrap-emacs will be built from sources only.
+# Prepare a bootstrap in the lisp subdirectory.
+#
+# Build loaddefs.el, because it's not sure it's up-to-date, and if it's not,
+# that might lead to errors during the bootstrap because something fails to
+# autoload as expected.  However, if there is no emacs binary, then we can't
+# build autoloads yet, so just make sure there's some loaddefs.el file, as
+# it's necessary for generating the binary (because loaddefs.el is an
+# automatically generated file, we don't want to store it in the source
+# repository).
+
+bootstrap-prepare:
+       if test -x $(EMACS); then                               \
+         $(MAKE) $(MFLAGS) autoloads;                          \
+       else                                                    \
+         if test ! -r $(lisp)/loaddefs.el; then                \
+           cp $(lisp)/ldefs-boot.el $(lisp)/loaddefs.el;       \
+         fi                                                    \
+       fi
+
+maintainer-clean: distclean
+       cd $(lisp); rm -f *.elc */*.elc $(AUTOGENEL)
 
 bootstrap-clean:
-       if test -x $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
-       -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
+       cd $(lisp); rm -f *.elc */*.elc
 
 # Generate/update files for the bootstrap process.
 
-bootstrap: update-subdirs autoloads compile finder-data custom-deps
+bootstrap: update-subdirs autoloads compile
+
+# Generate/update files after the bootstrap process.
+# custom-deps needs `preloaded-file-list'.
+
+bootstrap-after: finder-data custom-deps
 
 distclean:
        -rm -f ./Makefile