Message ID | pull.938.v2.git.git.1728754230466.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] diff-highlight: make install link into DESTDIR #Makefile | expand |
On Sat, Oct 12, 2024, at 19:30, immeëmosol via GitGitGadget wrote:
> [PATCH v2] diff-highlight: make install link into DESTDIR #Makefile
What does `#Makefile` mean? Previous subject had two of these:
diff-highlight: link to diff-highlight in DESTDIR #Makefile #diff-highlight
On Sat, 12 Oct 2024, 20:35 Kristoffer Haugsbakk, <kristofferhaugsbakk@fastmail.com> wrote: > > On Sat, Oct 12, 2024, at 19:30, immeëmosol via GitGitGadget wrote: > > [PATCH v2] diff-highlight: make install link into DESTDIR #Makefile > > What does `#Makefile` mean? […] not much. It is an attempt to signify what the commit relates to. In this case it might hint at the commit not impacting the sources of what is built, but the build process itself. Maybe #
immeëmosol <will+developer@willfris.nl> writes: > On Sat, 12 Oct 2024, 20:35 Kristoffer Haugsbakk, > <kristofferhaugsbakk@fastmail.com> wrote: >> >> On Sat, Oct 12, 2024, at 19:30, immeëmosol via GitGitGadget wrote: >> > [PATCH v2] diff-highlight: make install link into DESTDIR #Makefile >> >> What does `#Makefile` mean? […] > > not much. > It is an attempt to signify what the commit relates to. > In this case it might hint at the commit not impacting the sources of > what is built, but the build process itself. > Maybe #
diff --git a/contrib/diff-highlight/Makefile b/contrib/diff-highlight/Makefile index f2be7cc9243..19e0cf17ccd 100644 --- a/contrib/diff-highlight/Makefile +++ b/contrib/diff-highlight/Makefile @@ -10,6 +10,10 @@ diff-highlight: shebang.perl DiffHighlight.pm diff-highlight.perl chmod +x $@+ mv $@+ $@ +install: diff-highlight + test -w $(DESTDIR) && \ + ln --symbolic --target-directory=$(DESTDIR) $(abspath $<) + shebang.perl: FORCE @echo '#!$(PERL_PATH_SQ)' >$@+ @cmp $@+ $@ >/dev/null 2>/dev/null || mv $@+ $@ @@ -18,6 +22,9 @@ test: all $(MAKE) -C t clean: + test ! -L $(DESTDIR)/diff-highlight || \ + $(RM) --force $(DESTDIR)/diff-highlight $(RM) diff-highlight .PHONY: FORCE +.PHONY: install