0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【CommonLisp】ローカルのASDファイルを読み込む方法【ASDF】

Last updated at Posted at 2022-12-05

結論

次のサイトを読みましょう

もしくは

次のプログラムをロードしましょう。
このファイルが存在するディレクトリ配下のASDファイルが再帰的に読み込み可能となります。

search-asd.lisp
;;;; このファイルと同ディレクトリ配下のASDファイルを再帰的に読み込み可能にする

(require :asdf)

;; このファイルが存在するディレクトリの絶対パスの取得
(let ((system-path (make-pathname :host (pathname-host *load-truename*)
                                  :directory (pathname-directory *load-truename*))))
  (asdf:clear-source-registry) ; ソースレジストリの設定のクリア
  (asdf:ensure-source-registry ; ソースレジストリの設定の初期化
    `(:SOURCE-REGISTRY
      (:tree ,system-path) ; ASDファイルを再帰的に探索する
      :ignore-inherited-configuration))) ; ソースレジストリの古い設定を無視する?

読み込んだらrequireなりql:quickloadなりで好きにパッケージをロードしてください。

このプログラムの作成にあたり以下のリポジトリを参考にしました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?