diff options
| author | Craig Jennings <c@cjennings.net> | 2026-10-05 05:12:26 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-10-05 05:12:26 -0500 |
| commit | cbd156907033c6164a1f12fdab917a1d65381893 (patch) | |
| tree | bea3d083eaedb1aede434ea12926cfc7584fe33f /Makefile | |
| parent | 7c9f92eb0a6751d04a43ffe3cc5f725fce5ab371 (diff) | |
| download | dotemacs-cbd156907033c6164a1f12fdab917a1d65381893.tar.gz dotemacs-cbd156907033c6164a1f12fdab917a1d65381893.zip | |
fix(make): keep elpa bytecode out of clean-compiled
- clean-compiled deleted every .elc in the tree, elpa included.
- make clean runs it, so each clean wiped package bytecode.
- Nothing here rebuilds it, so packages loaded from source.
- Source loads skip native-comp JIT and slow startup.
- Emacs 31 also warns per cookie-less file loaded from source.
- I made the find skip elpa/ and quote its start point.
- New tests run the real target against a throwaway home.
- A dry run must show the temp path first.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -20,7 +20,7 @@ # make telega-image - Build the telega-server container image # make profile - Profile Emacs startup performance # make clean - Remove test artifacts and compiled files -# make clean-compiled - Remove .elc/.eln files only +# make clean-compiled - Remove .elc/.eln files only (keeps elpa/) # make clean-tests - Remove test artifacts only # make reset - Reset to first launch (destructive!) @@ -106,7 +106,7 @@ help: @echo " make telega-image - Build the telega-server container image" @echo " make profile - Profile Emacs startup performance" @echo " make clean - Remove test artifacts and compiled files" - @echo " make clean-compiled - Remove .elc/.eln files only" + @echo " make clean-compiled - Remove .elc/.eln files only (keeps elpa/)" @echo " make clean-tests - Remove test artifacts only" @echo " make reset - Reset to first launch (DESTRUCTIVE!)" @echo "" @@ -494,9 +494,13 @@ task-sorted: clean: clean-tests clean-compiled @echo "✓ Clean complete" +# elpa/ is excluded: package.el owns that bytecode and nothing here rebuilds it. +# Without it every package loads from source, slower and with no native-comp +# JIT, and Emacs 31 warns about each file lacking a lexical-binding cookie. clean-compiled: @echo "Removing compiled files (.elc, .eln)..." - @find $(EMACS_HOME) -type f \( -name "*.eln" -o -name "*.elc" \) -delete + @find "$(EMACS_HOME)" -type f \( -name "*.eln" -o -name "*.elc" \) \ + -not -path "$(patsubst %/,%,$(EMACS_HOME))/elpa/*" -delete @echo "✓ Compiled files removed" clean-tests: |
