]> code.delx.au - gnu-emacs/blobdiff - lisp/subr.el
Add reveal-filename function instead of 3 set-generated-*-file funcs, as suggested...
[gnu-emacs] / lisp / subr.el
index 7fe3d4115806b1ef57adea455f25cc4eb7634b15..dc968542cd06f7349c1f3888a7292d550db11c55 100644 (file)
@@ -4655,4 +4655,20 @@ as alpha versions."
                          (prin1-to-string (make-hash-table)))))
   (provide 'hashtable-print-readable))
 
+;; This is used in lisp/Makefile.in to generate file names for
+;; autoloads, custom-deps, and finder-data.
+(defun reveal-filename (file)
+  "Produce the real file name for FILE.
+
+On systems other than MS-Windows, just returns FILE.
+On MS-Windows, converts /d/foo/bar form of file names
+passed by MSYS Make into d:/foo/bar that Emacs can grok.
+
+This function is called from lisp/Makefile."
+  (when (and (eq system-type 'windows-nt)
+            (string-match "\\`/[a-zA-Z]/" file))
+    (setq file (concat (substring file 1 2) ":" (substring file 2))))
+  file)
+
+
 ;;; subr.el ends here