Skip to content

Commit 754b4a5

Browse files
committed
Fix symlink updates when switching configurations
Use all-local hook to ensure lsdiff and grepdiff symlinks are built during 'make', so they correctly point to filterdiff or patchfilter depending on the configuration. Previously, after reconfiguring between implementations, running 'make' would not update the symlinks, leaving them pointing to the wrong target. Also ensure the patchview directory exists before creating symlinks in it, which fixes 'make distcheck'. Assisted-by: Claude Code
1 parent 577c423 commit 754b4a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile.am

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ DISTCLEANFILES = src/stamp-h[0-9]* src/config.h
55

66
bin_PROGRAMS = src/interdiff src/filterdiff src/rediff
77

8-
# lsdiff is provided by symlink to filterdiff (unless scanner-patchfilter is enabled)
9-
108
# Scanner-based unified patchfilter tool (experimental)
119
if USE_SCANNER_PATCHFILTER
1210
bin_PROGRAMS += src/patchfilter
@@ -152,6 +150,11 @@ $(filterdiff_links): src/filterdiff$(EXEEXT)
152150
$(patchview_links): patchview/patchview-wrapper$(EXEEXT)
153151
ln -sf $(notdir $<) $@
154152

153+
# Ensure all symlinks are created during build
154+
all-local: $(interdiff_links) $(filterdiff_links) src/lsdiff$(EXEEXT) src/grepdiff$(EXEEXT)
155+
@test -d patchview || mkdir -p patchview
156+
@$(MAKE) $(AM_MAKEFLAGS) $(patchview_links)
157+
155158
install-exec-hook:
156159
@for f in $(interdiff_links); do \
157160
ln -sf "`echo interdiff$(EXEEXT) | sed '$(transform)'`" \

0 commit comments

Comments
 (0)