Skip to content

Commit d3bad83

Browse files
imme-emosolttaylorr
authored andcommitted
diff-highlight: make install link into DESTDIR
Make git's diff-highlight program immediately available to the command-line. Create a link in DESTDIR that refers to the generated/concatenated diff-highlight perl script Signed-off-by: immeëmosol <[email protected]> Signed-off-by: Taylor Blau <[email protected]>
1 parent ef8ce8f commit d3bad83

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contrib/diff-highlight/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ diff-highlight: shebang.perl DiffHighlight.pm diff-highlight.perl
1010
chmod +x $@+
1111
mv $@+ $@
1212

13+
install: diff-highlight
14+
test -w $(DESTDIR) && ln -s $(abspath $<) $(DESTDIR)
15+
1316
shebang.perl: FORCE
1417
@echo '#!$(PERL_PATH_SQ)' >$@+
1518
@cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@
@@ -18,6 +21,9 @@ test: all
1821
$(MAKE) -C t
1922

2023
clean:
24+
test ! -L $(DESTDIR)/diff-highlight || \
25+
$(RM) -f $(DESTDIR)/diff-highlight
2126
$(RM) diff-highlight
2227

2328
.PHONY: FORCE
29+
.PHONY: install

0 commit comments

Comments
 (0)