Guidelines for organizing and maintaining modular Makefiles. Use when refactoring, creating new .mk files, or ensuring consistency across the project's Makefile structure. Covers naming conventions, inclusion order, idempotency management, and error handling for a robust development environment.
このプロジェクトのMakefile分割・保守に関するルール
[!IMPORTANT] Makefile の詳細な分類、マクロ仕様、エラーハンドリング、テスト構造、および新機能追加時のチェックリストについては、REFERENCE.md を必ず参照してください。
mk/ディレクトリに格納するsticky-keys.mkメインMakefileでのinclude順序は以下の論理構造を遵守:
variables.mk, idempotency.mk, help.mk, presets.mkbitwarden.mksystem.mk, fonts.mk, install.mk, setup.mk, gnome.mk, etc.main.mk, stages.mk, menu.mk, shortcuts.mk, deprecated-targets.mkcursor.mk, claude.mk, gemini.mk, opencode.mk, etc.test.mksetup-vim, install-homebrewinstall-, setup-, clean-, backup-, check-, test-🚀 セットアップを開始中...📦 パッケージをインストール中...✅ 完了⚠️ 警告❌ エラーidempotency.mkのマクロを使用して、時間のかかる処理の二重実行を防ぐ:
@if $(call check_marker,target-name); then
echo "$(call IDEMPOTENCY_SKIP_MSG,target-name)";
exit 0;
fi
# ...
@$(call create_marker,target-name,1.0.0)