;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\304\305\306\307\310\311\310\301\312\313& \210\314\315\316\317\312\320\310\305\321\322& \210\314\323\324\325\312\320\310\305\321\326& \210\314\327\330\331\310\305\321\332&\210\314\333\334\335\310\305\321\332&\207" [require ede ede/make semantic/db custom-declare-group project-linux nil "File and tag browser frame." :group tools :version "24.3" custom-declare-variable project-linux-build-directory-default 'ask "Build directory." "24.4" :type (choice (const :tag "Same as source directory" same) (const :tag "Ask the user" ask)) project-linux-architecture-default 'ask "Target architecture to assume when not auto-detected." (choice (string :tag "Architecture name") (const :tag "Ask the user" ask)) project-linux-compile-target-command (concat ede-make-command " -k -C %s SUBDIRS=%s") "Default command used to compile a target." string project-linux-compile-project-command (concat ede-make-command " -k -C %s") "Default command used to compile a project."] 10) #@50 Find the Linux version for the Linux src in DIR. (defalias 'ede-linux-version #[(dir) "\306\307!rq\210\310 \210\311 !\312\313\314\315\316$\210eb\210\314\211\211\317\320!\210\321\322!\317\323!\210\321\322!\317\324!\210\321\322! \325\f\325 \260\326!\210-\207" [buff dir default-directory sub minor major get-buffer-create " *linux-query*" erase-buffer file-name-as-directory insert-file-contents "Makefile" nil 0 512 re-search-forward "^VERSION *= *\\([0-9.]+\\)" match-string 1 "^PATCHLEVEL *= *\\([0-9.]+\\)" "^SUBLEVEL *= *\\([0-9.]+\\)" "." kill-buffer] 5 (#$ . 1426)]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias ede-linux-project-p eieio-make-class-predicate ede-linux-project ede-linux-project--eieio-childp eieio-make-child-predicate ede-linux-project-child-p make-obsolete "use (cl-typep ... \\='ede-linux-project) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (ede-project) ((build-directory :initarg :build-directory :type string :documentation "Build directory.") (architecture :initarg :architecture :type string :documentation "Target architecture.") (include-path :initarg :include-path :type list :documentation "Include directories.\nContains both common and target architecture-specific directories.")) (:documentation "Project Type for the Linux source code." :method-invocation-order :depth-first)] 6) #@56 Create a new object of class type `ede-linux-project'. (defalias 'ede-linux-project #[(&rest slots) "\301\302\303#\207" [slots apply make-instance ede-linux-project] 4 (#$ . 2904)]) (byte-code "\300\301\302\303#\300\207" [function-put ede-linux-project compiler-macro ede-linux-project--anon-cmacro] 4) (defalias 'ede-linux-project--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) #@145 Detect build directory for sources in DIR. If DIR has not been used as a build directory, fall back to `project-linux-build-directory-default'. (defalias 'ede-linux--get-build-directory #[(dir) "\302\303\304\"!\203 \206 \305\267\202\207\306\307\"\207\310\207" [dir project-linux-build-directory-default file-exists-p expand-file-name ".config" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (same 19 ask 21)) read-directory-name "Select Linux' build directory: " nil] 4 (#$ . 3433)]) #@51 Return a list of architecture names found in DIR. (defalias 'ede-linux--get-archs #[(dir) "\303\304\"\305\306\n!\203\307\310\311\n!\"\210 *\207" [dir archs archs-dir expand-file-name "arch" nil file-directory-p mapc #[(elem) "\303\230?\205-\304\230?\205-\305\230?\205-\306\307 \"!\205-\n\235\203&\n\207\310\nC\"\211\207" [elem archs-dir archs "." ".." "x86_64" file-directory-p expand-file-name append] 4] directory-files] 4 (#$ . 3970)]) #@168 Try to auto-detect the architecture as configured in DIR. DIR is Linux' build directory. If it cannot be auto-detected, returns `project-linux-architecture-default'. (defalias 'ede-linux--detect-architecture #[(dir) "\306\307\"\310!\311\211 \2034 \2030 \2040 @\312\306\n\313P\f\"!\203)\n A\211\204 \2065 ,\207" [dir found arch archs archs-dir project-linux-architecture-default expand-file-name "arch" ede-linux--get-archs nil file-directory-p "/include/generated"] 5 (#$ . 4433)]) #@199 Try to auto-detect the architecture as configured in BDIR. Uses `ede-linux--detect-architecture' for the auto-detection. If the result is `ask', let the user choose from architectures found in DIR. (defalias 'ede-linux--get-architecture #[(dir bdir) "\303!\211\304=\203\305\306\307\n!\"\202 )\207" [bdir arch dir ede-linux--detect-architecture ask completing-read "Select target architecture: " ede-linux--get-archs] 5 (#$ . 4939)]) #@147 Return a list with include directories. Returned directories might not exist, since they are not created until Linux is built for the first time. (defalias 'ede-linux--include-path #[(dir bdir arch) "\302\303\304B \305B\306B \306B\307B \310B\311B \312B\257\313\314\315$\205,\316\"\207" [dir bdir list #[(elem) "\302@\303AQ \"\207" [elem arch format "/"] 4] "arch/%s/include" "arch/%s/include/generated" "include" "arch/%s/include/uapi" "arch/%s/include/generated/uapi" "include/uapi" "include/generated/uapi" nil apply cl-mapcar cl-coerce] 11 (#$ . 5385)]) #@182 Return a Linux Project object if there is a match. Return nil if there isn't one. Argument DIR is the directory it is created for. ROOTPROJ is nil, since there is only one project. (defalias 'ede-linux-load #[(dir &optional _rootproj) "\304!\305 \"\306 \n#\307\310\311\312\313\314!\315\316!\317\320\321\"\322 \323\n\324 &+\207" [dir bdir arch include-path ede-linux--get-build-directory ede-linux--get-architecture ede-linux--include-path make-instance ede-linux-project :name "Linux" :version ede-linux-version :directory file-name-as-directory :file expand-file-name "scripts/ver_linux" :build-directory :architecture :include-path] 16 (#$ . 5964)]) (byte-code "\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320&\321\"\210\322\323\324\325!\"\210\322\326\327\325!\"\210\322\330\326\"\210\331\330\332\333#\210\334\325\335\326#\336\325\337\316\340$\207" [ede-add-project-autoload make-instance ede-project-autoload :name "LINUX ROOT" :file ede/linux :proj-file "scripts/ver_linux" :load-type ede-linux-load :class-sym ede-linux-project :new-p nil :safe-p t unique defalias ede-linux-target-c-p eieio-make-class-predicate ede-linux-target-c ede-linux-target-c--eieio-childp eieio-make-child-predicate ede-linux-target-c-child-p make-obsolete "use (cl-typep ... \\='ede-linux-target-c) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (ede-target) (:documentation "EDE Linux Project target for C code.\nAll directories need at least one target.")] 17) #@57 Create a new object of class type `ede-linux-target-c'. (defalias 'ede-linux-target-c #[(&rest slots) "\301\302\303#\207" [slots apply make-instance ede-linux-target-c] 4 (#$ . 7480)]) (byte-code "\300\301\302\303#\300\207" [function-put ede-linux-target-c compiler-macro ede-linux-target-c--anon-cmacro] 4) (defalias 'ede-linux-target-c--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303!\"\210\300\304\305\303!\"\210\300\306\304\"\210\307\306\310\311#\210\312\303\313\304#\314\303\315\316\317$\207" [defalias ede-linux-target-misc-p eieio-make-class-predicate ede-linux-target-misc ede-linux-target-misc--eieio-childp eieio-make-child-predicate ede-linux-target-misc-child-p make-obsolete "use (cl-typep ... \\='ede-linux-target-misc) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal (ede-target) nil (:documentation "EDE Linux Project target for Misc files.\nAll directories need at least one target.")] 6) #@60 Create a new object of class type `ede-linux-target-misc'. (defalias 'ede-linux-target-misc #[(&rest slots) "\301\302\303#\207" [slots apply make-instance ede-linux-target-misc] 4 (#$ . 8595)]) (byte-code "\300\301\302\303#\300\207" [function-put ede-linux-target-misc compiler-macro ede-linux-target-misc--anon-cmacro] 4) (defalias 'ede-linux-target-misc--anon-cmacro #[(whole &rest slots) "@;\204 \207\302\303\304@ @# @\305@DABB\"\207" [slots whole macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 5]) (byte-code "\300\301\302\303\304\305%\210\300\306\302\307\302\310%\210\300\311\302\312\302\313%\210\300\314\302\315\302\316%\207" [cl-generic-define-method initialize-instance nil ((this ede-linux-project) &rest _fields) t #[(#1=#:cl--cnm this &rest _fields) " \210\302 \303\"?\205\304 \305\306#\207" [#1# this slot-boundp targets eieio-oset :targets nil] 4 "Make sure the targets slot is bound.\n\n(fn THIS &rest FIELDS)"] ede-project-root-directory ((this ede-linux-project) &optional _file) #[(this &optional _file) "\301\302\303\304\"!!\207" [this ede-up-directory file-name-directory eieio-oref file] 5 "Return the root for THIS Linux project with file."] ede-project-root ((this ede-linux-project)) #[(this) "\207" [this] 1 "Return my root."] ede-find-subproject-for-directory ((proj ede-linux-project) _dir) #[(proj _dir) "\207" [proj] 1 "Return PROJ, for handling all subdirs below DIR."]] 6) #@69 Find a target that is a CLASS and is in DIR in the list of TARGETS. (defalias 'ede-linux-find-matching-target #[(class dir targets) "\306 \306\211\203& @\307\n\f\"\203\310\n\311\" \230\203\n A\211\204\n*)\207" [match targets T --dolist-tail-- class dir nil object-of-class-p eieio-oref path] 4 (#$ . 10054)]) (byte-code "\300\301\302\303\302\304%\210\300\305\302\306\302\307%\207" [cl-generic-define-method ede-find-target nil ((proj ede-linux-project) buffer) #[(proj buffer) "\306\307!!\211\204\310\202\311\312 \"\203\313\202\310\314 \304\" \315\n\f#\211\204H\316\n\317\320\321!!\322\323\324&\325 \326#\210-\207" [buffer ext cls proj targets default-directory file-name-extension buffer-file-name ede-linux-target-misc string-match "c\\|h" ede-linux-target-c eieio-oref ede-linux-find-matching-target make-instance :name file-name-nondirectory directory-file-name :path :source nil object-add-to-list :targets dir ans] 9 "Find an EDE target in PROJ for BUFFER.\nIf one doesn't exist, create a new one for this directory."] ede-preprocessor-map ((this ede-linux-target-c)) #[(this) "\306\307!\210\310!\311 !\312\n\313\"\211\205\314 !\205\315 !\316\f\2037\317\f!\203/\320\f!\210\321 \322\f\323\"\" -\207" [this proj root versionfile table filemap require semantic/db ede-target-parent ede-project-root ede-expand-filename "include/linux/version.h" file-exists-p semanticdb-file-table-object (("__KERNEL__" . "")) semanticdb-needs-refresh-p semanticdb-refresh-table append eieio-oref lexical-table] 6 "Get the pre-processor map for Linux C code.\nAll files need the macros from lisp.h!"]] 6) #@70 Return a file name if NAME exists under ROOT with SUBDIR in between. (defalias 'ede-linux-file-exists-name #[(name root subdir) "\304\304 \n\"\"\305 !\205 )\207" [name subdir root F expand-file-name file-exists-p] 5 (#$ . 11707)]) (byte-code "\300\301\302\303\304\305%\210\300\306\302\307\302\310%\210\300\311\302\312\302\313%\210\300\314\302\315\302\316%\210\317\320!\207" [cl-generic-define-method ede-expand-filename-impl nil ((proj ede-linux-project) name) t #[(#1=#:cl--cnm proj name) "\306!\307\n!\310 !\311\n\312\" \204\313\202d\314\315 \"\203T\311\n\316\"\313\211\203N\204N\317 @#\206C\317\f@#A\211\204-*\202d\314\320 \"\203c\317\f\321#\202d\313\211\206m -\207" [name ext proj root dir bdir file-name-extension ede-project-root ede-project-root-directory eieio-oref build-directory nil string-match "h" include-path ede-linux-file-exists-name "txt" "Documentation" found dirs F #1#] 5 "Within this project PROJ, find the file NAME.\nKnows about how the Linux source tree is organized."] project-compile-project ((proj ede-linux-project) &optional command) #[(proj &optional command) "\305!\306\307!\210\n\204 \f\204\310\n \"\307\f!)\207" [proj dir project-linux-compile-project-command compile-command command ede-project-root-directory require compile format] 3 "Compile the entire current project.\nArgument COMMAND is the command to use when compiling."] project-compile-target ((obj ede-linux-target-c) &optional command) #[(obj &optional command) "\306!\307 !\310\n!\311\312\"\313\314!\210 \204\204)\315 \f#\314!,\207" [obj proj root dir subdir project-linux-compile-project-command ede-target-parent ede-project-root ede-project-root-directory eieio-oref path require compile format compile-command command project-linux-compile-target-command] 4 "Compile the current target.\nArgument COMMAND is the command to use for compiling the target."] project-rescan ((this ede-linux-project)) #[(this) "\306!\307 !\310 \n\"\311 \n #\312 !\313\314 #\210\313\315\n#\210\313\316 #\210\313\317\f#-\207" [this dir bdir arch inc ver ede-project-root-directory ede-linux--get-build-directory ede-linux--get-architecture ede-linux--include-path ede-linux-version eieio-oset version :build-directory :architecture :include-path] 4 "Rescan this Linux project from the sources."] provide ede/linux] 6)