guix-commits
[Top][All Lists]
Advanced

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

01/01: gnu: clang-from-llvm: Fix install for clang-3.*.


From: guix-commits
Subject: 01/01: gnu: clang-from-llvm: Fix install for clang-3.*.
Date: Wed, 28 Nov 2018 07:43:14 -0500 (EST)

ambrevar pushed a commit to branch master
in repository guix.

commit ad8a4a666d1012f1ace44fc55d35e8f87a0c8cf9
Author: Pierre Neidhardt <address@hidden>
Date:   Wed Nov 28 13:41:50 2018 +0100

    gnu: clang-from-llvm: Fix install for clang-3.*.
    
    * gnu/packages/llvm.scm (clang-from-llvm): Fix install for clang-3.*.
---
 gnu/packages/llvm.scm | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 0b12f73..dace546 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -243,17 +243,21 @@ compiler.  In LLVM this library is called 
\"compiler-rt\".")
                                          out "/etc/bash_completion.d")))
                         (with-directory-excursion (string-append out
                                                                  
"/share/clang")
-                          ;; Delete extensions for proprietary text editors.
-                          (delete-file "clang-format-bbedit.applescript")
-                          (delete-file "clang-format-sublime.py")
-                          ;; Delete Emacs extensions: see their respective 
Emacs
-                          ;; Guix package instead.
-                          (delete-file "clang-rename.el")
-                          (delete-file "clang-format.el")
+                          (for-each
+                            (lambda (file)
+                              (when (file-exists? file)
+                                (delete-file file)))
+                            ;; Delete extensions for proprietary text editors.
+                            '("clang-format-bbedit.applescript"
+                              "clang-format-sublime.py"
+                              ;; Delete Emacs extensions: see their respective 
Emacs
+                              ;; Guix package instead.
+                              "clang-rename.el" "clang-format.el"))
                           ;; Install bash completion.
-                          (mkdir-p compl-dir)
-                          (rename-file "bash-autocomplete.sh"
-                                       (string-append compl-dir "/clang"))))
+                          (when (file-exists?  "bash-autocomplete.sh")
+                            (mkdir-p compl-dir)
+                            (rename-file "bash-autocomplete.sh"
+                                         (string-append compl-dir "/clang")))))
                       #t)))))
 
     ;; Clang supports the same environment variables as GCC.



reply via email to

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