emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Broken lisp/Makefile.w32-in


From: Juanma Barranquero
Subject: Re: Broken lisp/Makefile.w32-in
Date: Fri, 20 Sep 2002 10:26:46 +0200

On Wed, 18 Sep 2002 09:43:27 +0300, "Eli Zaretskii" <address@hidden> wrote:

> Does it work to have the ``for ...'' part be in a batch file which is
> then invoked as "command.com /c foo.bat ..foo.txt"?

I'll have to test it.

> I'm not sure I know what changes you have in mind.  Could you please
> post a diff?

Yes. Basically I'm thinking of bringing to EMACS_21_1_RC/lisp/makefile.w32-in
some of the changes for the better that have been integrated into the RC
line. AFAIK, with those changes the make process works better in some
environments (you can do now "nmake updates" in Windows NT/2K/XP) and no
worse in any one.

bootstrap still doesn't make the update-subdirs target, though that
could be added if your command/c foo.bat method works, or via the
WINS/WINS_WITHOUT_TERM kludge.


                                                           /L/e/k/t/u



Index: makefile.w32-in
===================================================================
RCS file: /cvs/emacs/lisp/makefile.w32-in,v
retrieving revision 1.16
diff -u -2 -r1.16 makefile.w32-in
--- makefile.w32-in     16 Aug 2001 13:17:32 -0000      1.16
+++ makefile.w32-in     20 Sep 2002 08:17:35 -0000
@@ -28,4 +28,5 @@
 
 lisp = $(CURDIR)
+srcdir = $(CURDIR)/..
 
 # You can specify a different executable on the make command line,
@@ -46,5 +47,8 @@
 ETAGS = "../lib-src/$(BLD)/etags"
 
-# Files which should not be compiled.
+# Files which should not be compiled.  If you change the name `DONTCOMPILE'
+# to something different, you'll have to change make-dist as well, and
+# modify the lists in $lisp and $shortlisp on src/Makefile.in.
+#
 # - emacs-lisp/cl-specs.el:  only contains `def-edebug-spec's so there's
 #   no point compiling it, although it doesn't hurt.
@@ -135,8 +139,10 @@
        mail \
        net \
+       obsolete \
        play \
        progmodes \
        term \
-       textmodes
+       textmodes \
+       toolbar
 
 doit:
@@ -148,8 +154,5 @@
        -$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hooks 
nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS)
 
-finder-inf.el:
-       echo (provide $(SQUOTE)finder-inf)>> $@
-
-finder-data: finder-inf.el doit
+finder-data: doit
        @echo Directories: $(WINS)
        $(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS)
@@ -182,9 +185,9 @@
 
 update-subdirs-CMD: doit
-       @set QWINS=
-       @for %d in ($(WINS)) do if not (%d)==(term) set QWINS=%QWINS% "%d"
        echo ;; In load-path, after this directory should come> subdirs.el
        echo ;; certain of its subdirectories.  Here we specify them.>> 
subdirs.el
-       echo (normal-top-level-add-to-load-path $(SQUOTE)(%QWINS%))>> subdirs.el
+       echo (normal-top-level-add-to-load-path $(SQUOTE)(>> subdirs.el
+       @for %d in ($(WINS)) do if not (%d)==(term) echo "%d">> subdirs.el
+       echo ))>> subdirs.el
 
 update-subdirs-SH: doit
@@ -196,4 +199,9 @@
 updates: update-subdirs autoloads finder-data custom-deps
 
+# Update the AUTHORS file.
+
+update-authors:
+       $(emacs) -f batch-update-authors $(srcdir)/AUTHORS $(srcdir)
+
 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
        $(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
@@ -210,6 +218,8 @@
        -$(DEL) $@
 
-# Compile all Lisp files, except those from DONTCOMPILE.  This
-# compiles files unconditionally.  All .elc files are made writable
+# Compile all Lisp files, except those from DONTCOMPILE,
+# but don't recompile those that are up to date.
+
+# All .elc files are made writable
 # before compilation in case we checked out read-only (CVS option -r).
 # Files MUST be compiled one by one.  If we compile several files in a
@@ -220,12 +230,12 @@
 
 # Need separate version for sh and native cmd.exe
-compile-files: subdirs.el compile-files-$(SHELLTYPE) doit
+compile: subdirs.el compile-$(SHELLTYPE) doit
 
-compile-files-CMD:
+compile-CMD:
 #      -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g
        for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f
        for %f in (. $(WINS)) do for %g in (%f/*.el) do $(emacs) -f 
batch-byte-compile %f/%g
 
-compile-files-SH:
+compile-SH:
 #      for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
        for el in $(COMPILE_FIRST); do \
@@ -235,6 +245,31 @@
        for dir in $(lisp) $(WINS); do \
          for el in $$dir/*.el; do \
+           if test -f $$el; \
+           then \
+             echo Compiling $$el; \
+             $(emacs) -f batch-byte-compile-if-not-done $$el; \
+           fi \
+         done; \
+       done
+
+# Compile all Lisp files, except those from DONTCOMPILE.  This
+# is like `compile' but compiles files unconditionally.
+compile-always: subdirs.el compile-always-$(SHELLTYPE) doit
+
+compile-always-CMD:
+#      -for %f in ($(lisp) $(WINS)) do for %g in (%f\*.elc) do @attrib -r %g
+       for %f in ($(COMPILE_FIRST)) do $(emacs) -f batch-byte-compile %f
+       for %f in (. $(WINS)) do for %g in (%f/*.el) do $(emacs) -f 
batch-byte-compile %f/%g
+
+compile-always-SH:
+#      for elc in $(lisp)/*.elc $(lisp)/*/*.elc; do attrib -r $$elc; done
+       for el in $(COMPILE_FIRST); do \
+         echo Compiling $$el; \
+         $(emacs) -f batch-byte-compile $$el || exit 1; \
+       done
+       for dir in $(lisp) $(WINS); do \
+         for el in $$dir/*.el; do \
            echo Compiling $$el; \
-           $(emacs) -f batch-byte-compile $$el; \
+           $(emacs) -f batch-byte-compile $$el || exit 1; \
          done; \
        done
@@ -249,5 +284,5 @@
 # Compile Lisp files, but save old compiled files first.
 
-compile: backup-compiled-files compile-files
+compile-after-backup: backup-compiled-files compile-always
 
 # Recompile all Lisp files which are newer than their .elc files.
@@ -256,5 +291,5 @@
 
 recompile: doit
-       $(emacs) -f batch-byte-recompile-directory .
+       $(emacs) -f batch-byte-recompile-directory $(lisp)
 
 # Prepare a bootstrap in the lisp subdirectory.  Build loaddefs.el,
@@ -268,14 +303,15 @@
 
 bootstrap-clean-CMD:
-       if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
+#      if exist $(EMACS) $(MAKE) $(MFLAGS) autoloads
        -for %f in (. $(WINS)) do for %g in (%f\*.elc) do @$(DEL) %g
 
 bootstrap-clean-SH:
-       if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
-       -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
+#      if test -f $(EMACS); then $(MAKE) $(MFLAGS) autoloads; fi
+#      -rm -f $(lisp)/*.elc $(lisp)/*/*.elc
+       -for dir in . $(WINS); do rm -f $$dir/*.elc; done
 
 # Generate/update files for the bootstrap process.
 
-bootstrap: autoloads compile-files custom-deps
+bootstrap: autoloads compile finder-data custom-deps
 
 #





reply via email to

[Prev in Thread] Current Thread [Next in Thread]