comparison lisp/make-docfile.el @ 1330:4542b72c005e

[xemacs-hg @ 2003-03-01 07:25:26 by ben] build patch Makefile.in.in: Move src deletions to src/Makefile.in.in. dump-paths.el, dumped-lisp.el: Delete. Combine stuff into setup-paths.el. find-paths.el: Removed. Make this file contain generic routines only. Move stuff to compute Emacs roots to setup-paths.el. startup.el: Removed. Move these variables into setup-paths.el. setup-paths.el, startup.el: Removed. Combine all high-level code for computing the paths into setup-paths.el. Create new function startup-find-load-path to encapsulate all logic for computing `load-path'. Eliminate invocation-directory and invocation-name parameters since there is no point (false generality) -- the code references other globals, which cannot be specified. Eliminate some code duplicated between setup-paths.el and startup.el. Clean up the debug-paths code and output load-path in addition. Add logic to paths-emacs-root-p to support separated source and build trees. loadup.el, make-docfile.el, update-elc-2.el, update-elc.el: Rewrite to allow for separated source and build trees, as may occur in MS Windows. NOTE TO BUILD HACKERS: loadup.el, make-docfile.el, update-elc.el and update-elc-2.el made two assumptions that are no longer correct: (1) The source and build trees are in the same place. (2) They can make assumptions about where `.' is. These files now compute the locations of the source and build roots at the top of the file. *ALL* constant file names or path snippets must now be made absolute using expand-file-name and one of these roots. dumped-lisp.el, packages.el: Removed. Remove some unused lists of Lisp files. packages-hardcoded-lisp (empty, in any case) moved to dumped-lisp.el. startup.el: When a compiled init file is out-of-date wrt the uncompiled version, load the uncompiled version and issue a nasty warning. update-elc-2.el: Force touching of auto-autoloads files when REBUILD_AUTOLOADS was set. update-elc.el: Fix code that checks whether dumping is necessary to check against xemacs.dmp, not xemacs.exe, when Unix and pdump. lwlib-Xm.c: Fix compile warning. README, config.inc.samp, xemacs.mak: -- Major reorganization and cleanup. -- Add support for separated build tree and source tree. -- Delete all support for X Windows building, since it's totally bit-rotten and will never be fixed up. Instruct people to use Cygwin if they want such support. make-build-dir: New script to create a skeleton build tree for use with separated build and source tree compilation. m/acorn.h, m/alliant-2800.h, m/alliant.h, m/altos.h, m/amdahl.h, m/arm.h, m/att3b.h, m/aviion.h, m/clipper.h, m/cnvrgnt.h, m/convex.h, m/cydra5.h, m/delta.h, m/delta88k.h, m/dpx2.h, m/elxsi.h, m/ews4800r.h, m/gould.h, m/hp800.h, m/hp9000s300.h, m/i860.h, m/ibmps2-aix.h, m/ibmrs6000.h, m/ibmrt-aix.h, m/ibmrt.h, m/intel386.h, m/iris4d.h, m/iris5d.h, m/iris6d.h, m/irist.h, m/m68k.h, m/masscomp.h, m/mg1.h, m/mips-nec.h, m/mips-siemens.h, m/mips.h, m/nh3000.h, m/nh4000.h, m/ns32000.h, m/plexus.h, m/powerpc.h, m/sequent-ptx.h, m/sequent.h, m/sgi-challenge.h, m/stride.h, m/tad68k.h, m/targon31.h, m/tekxd88.h, m/template.h, m/tower32.h, m/tower32v3.h, m/ustation.h, m/wicat.h, m/xps100.h, data.c, doc.c, editfns.c, emacs.c, lrecord.h, ntheap.c, process-unix.c, sysdep.c, unexec.c: Delete all support for bit-rotten CANNOT_DUMP. Just use pdump. Makefile.in.in: Lots o' cleanup. Use names like LISP, SRC instead of lispdir, srcdir, for consistency with xemacs.mak and the conventions in the rest of the file. Eliminate use of ${...} in favor of $(...), to make it easier to move code between this file and xemacs.mak. Fix dependency handling wrt NEEDTODUMP to eliminate problems some people (e.g. Vin) have been seeing with non-GNU makes. Write a long section about the subtle but oh-so-important differences in dependency processing between nmake, make, and GNU make. Add unicode-encapsulate target, from xemacs.mak. chartab.c, lrecord.h: Fix crash due to attempt to free objects across dump/undump.
author ben
date Sat, 01 Mar 2003 07:25:56 +0000
parents 70921960b980
children 1b0339b048ce
comparison
equal deleted inserted replaced
1329:389741884c65 1330:4542b72c005e
2 2
3 ;; Copyright (C) 1985, 1986, 1992-1995, 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1985, 1986, 1992-1995, 1997 Free Software Foundation, Inc.
4 ;; Copyright (C) 2002, 2003 Ben Wing. 4 ;; Copyright (C) 2002, 2003 Ben Wing.
5 5
6 ;; Author: Unknown 6 ;; Author: Unknown
7 ;; Maintainer: Steven L Baur <steve@xemacs.org> 7 ;; Maintainer: XEmacs Development Team
8 ;; Keywords: internal 8 ;; Keywords: internal
9 9
10 ;; This file is part of XEmacs. 10 ;; This file is part of XEmacs.
11 11
12 ;; XEmacs is free software; you can redistribute it and/or modify it 12 ;; XEmacs is free software; you can redistribute it and/or modify it
42 (defvar processed nil) 42 (defvar processed nil)
43 (defvar docfile nil) 43 (defvar docfile nil)
44 (defvar docfile-buffer nil) 44 (defvar docfile-buffer nil)
45 (defvar site-file-list nil) 45 (defvar site-file-list nil)
46 (defvar docfile-out-of-date nil) 46 (defvar docfile-out-of-date nil)
47
48 (defvar build-root (expand-file-name ".." invocation-directory))
49 (defvar build-lib-src (expand-file-name "lib-src" build-root))
50 (defvar source-lisp (file-name-directory (expand-file-name
51 (nth 2 command-line-args))))
52 (defvar source-src (expand-file-name "../src" source-lisp))
47 53
48 (defun message (fmt &rest args) 54 (defun message (fmt &rest args)
49 (princ (apply #'format fmt args)) 55 (princ (apply #'format fmt args))
50 (terpri)) 56 (terpri))
51 57
71 (setq options (nreverse options)) 77 (setq options (nreverse options))
72 78
73 ;; (message (concat "Options: " (prin1-to-string options))) 79 ;; (message (concat "Options: " (prin1-to-string options)))
74 80
75 ;; insert-file-contents-internal calls out to `format-decode' afterwards, 81 ;; insert-file-contents-internal calls out to `format-decode' afterwards,
76 ;; so it must be defined. if non-zero, it tries to be a bunch more stuff 82 ;; so it must be defined. if non-zero, it tries to do a bunch more stuff
77 ;; so say, "NOOOOOOOOOOOOO! Basta! Ca soufit! Enough, already, OK?" 83 ;; so say, "NOOOOOOOOOOOOO! Basta! Ca soufit! Enough, already, OK?"
78 (defun format-decode (fuck me harder) 0) 84 (defun format-decode (fuck me harder) 0)
79 85
80 ;; Next process the list of C files. 86 ;; Next process the list of C files.
81 (defun process-args (args) 87 (defun process-args (args)
116 ;; remove NEEDTODUMP and make-docfile.exe, convert .obj files into 122 ;; remove NEEDTODUMP and make-docfile.exe, convert .obj files into
117 ;; .c files in the source directory. 123 ;; .c files in the source directory.
118 (when (and (not (string-match "\\(NEEDTODUMP\\|\\.exe$\\)" arg)) 124 (when (and (not (string-match "\\(NEEDTODUMP\\|\\.exe$\\)" arg))
119 (not (member arg processed))) 125 (not (member arg processed)))
120 (when (string-match "\\(.*\\)\\.obj$" arg) 126 (when (string-match "\\(.*\\)\\.obj$" arg)
121 (setq arg (concat (file-name-nondirectory 127 (setq arg (expand-file-name
122 ;; no match-string so use its implementation. 128 (concat
123 (substring arg (match-beginning 1) 129 (file-name-nondirectory
124 (match-end 1))) 130 ;; no match-string so use its implementation.
125 ".c"))) 131 (substring arg (match-beginning 1)
132 (match-end 1)))
133 ".c")
134 source-src)))
126 (if (and (null docfile-out-of-date) 135 (if (and (null docfile-out-of-date)
127 (file-newer-than-file-p arg docfile)) 136 (file-newer-than-file-p arg docfile))
128 (setq docfile-out-of-date t)) 137 (setq docfile-out-of-date t))
129 (setq processed (cons arg processed)))) 138 (setq processed (cons arg processed))))
130 (setq args (cdr args))))) 139 (setq args (cdr args)))))
131 140
141 ;; Then process the list of Lisp files.
132 (process-args command-line-args) 142 (process-args command-line-args)
133 143
134 ;; Then process the list of Lisp files. 144 (setq load-path (list source-lisp))
135 (let ((build-root (expand-file-name ".." invocation-directory)))
136 (setq load-path (list (expand-file-name "lisp" build-root))))
137 145
138 ;; Then process the autoloads 146 ;; Then process the autoloads
139 (setq autoload-file-name "auto-autoloads.elc") 147 (setq autoload-file-name "auto-autoloads.elc")
140 (load "find-paths.el") 148 (load "find-paths.el")
141 (load "packages.el") 149 (load "packages.el")
142 (load "setup-paths.el") 150 (load "setup-paths.el")
143 (load "dump-paths.el")
144 (load "raw-process.el") 151 (load "raw-process.el")
145 152
146 (let (preloaded-file-list) 153 (let (preloaded-file-list)
147 (load (expand-file-name "../lisp/dumped-lisp.el")) 154 (load (expand-file-name "dumped-lisp.el" source-lisp))
148 155
149 (let ((package-preloaded-file-list 156 (let ((package-preloaded-file-list
150 (packages-collect-package-dumped-lisps late-package-load-path))) 157 (packages-collect-package-dumped-lisps late-package-load-path)))
151 158
152 (setq preloaded-file-list 159 (setq preloaded-file-list
214 (delete-file docfile) 221 (delete-file docfile)
215 (error nil)) 222 (error nil))
216 (message "Spawning make-docfile ...") 223 (message "Spawning make-docfile ...")
217 ;; (message (prin1-to-string (append options processed))) 224 ;; (message (prin1-to-string (append options processed)))
218 225
219 (setq exec-path (list (concat default-directory "../lib-src"))) 226 (setq exec-path (list build-lib-src))
220 227
221 ;; (locate-file-clear-hashing nil) 228 ;; (locate-file-clear-hashing nil)
222 (if (memq system-type '(berkeley-unix next-mach)) 229 (if (memq system-type '(berkeley-unix next-mach))
223 ;; Suboptimal, but we have a unresolved bug somewhere in the 230 ;; Suboptimal, but we have a unresolved bug somewhere in the
224 ;; low-level process code. #### Now that we've switched to using 231 ;; low-level process code. #### Now that we've switched to using
230 nil 237 nil
231 "-fc" 238 "-fc"
232 (mapconcat 239 (mapconcat
233 #'identity 240 #'identity
234 (append 241 (append
235 (list (concat default-directory "../lib-src/make-docfile")) 242 (list (expand-file-name "make-docfile" build-lib-src))
236 options processed) 243 options processed)
237 " ")) 244 " "))
238 ;; (message (prin1-to-string (append options processed))) 245 ;; (message (prin1-to-string (append options processed)))
239 (apply 'call-process-internal 246 (apply 'call-process-internal
240 ;; (concat default-directory "../lib-src/make-docfile") 247 ;; exec-path is set.
248 ;; (expand-file-name "make-docfile" build-lib-src)
241 "make-docfile" 249 "make-docfile"
242 nil 250 nil
243 t 251 t
244 nil 252 nil
245 (append options processed))) 253 (append options processed)))
246 254
247 (message "Spawning make-docfile ...done") 255 (message "Spawning make-docfile ...done")
248 ;; (write-region-internal (point-min) (point-max) "/tmp/DOC") 256 ;; (write-region-internal (point-min) (point-max) "/tmp/DOC")
249 ) 257 )
250 (message "DOC file is up to date")
251 258
252 (kill-emacs) 259 (kill-emacs)
253 260
254 ;;; make-docfile.el ends here 261 ;;; make-docfile.el ends here