[darcs-devel] confusing hunk patch
Tupshin Harper
tupshin at tupshin.com
Sat May 7 21:19:44 PDT 2005
I noticed the following patch in the darcs source repository. Note the
position of the curly braces. The second hunk is nested inside an
additional layer of curly braces, but the first and third hunks are not.
Can someone explain the significance of this nesting?
Thanks.
-Tupshin
[Place /etc under $(PREFIX).
simons at cryp.to**Sun May 18 21:02:00 CEST 2003
On my machine, all packages live in /usr/local/package, including
their config files. This patch changes the Makefile to install the
configuration in $(PREFIX)/etc rather than /etc, implementing exactly
that.
] {
hunk ./Makefile 26
- install -d $(DESTDIR)//etc/bash_completion.d/
- install -m 0644 darcs_completion
$(DESTDIR)/etc/bash_completion.d/darcs
+ install -d $(DESTDIR)/$(PREFIX)/etc/bash_completion.d/
+ install -m 0644 darcs_completion
$(DESTDIR)/$(PREFIX)/etc/bash_completion.d/darcs
{
hunk ./Makefile 37
- install -d $(DESTDIR)/etc/darcs
- test -e $(DESTDIR)/etc/darcs/cgi.conf || \
- install -m 0644 cgi.conf $(DESTDIR)/etc/darcs/cgi.conf
+v v v v v v v
+ install -d $(DESTDIR)/$(PREFIX)/etc/darcs
+ install -m 0644 cgi.conf $(DESTDIR)/$(PREFIX)/etc/darcs/cgi.conf
+*************
+ install -d $(DESTDIR)/etc/darcs
+ test -e $(DESTDIR)/etc/darcs/cgi.conf || \
+ install -m 0644 cgi.conf $(DESTDIR)/etc/darcs/cgi.conf
+^ ^ ^ ^ ^ ^ ^
}
hunk ./Makefile 48
- rm $(DESTDIR)/etc/bash_completion.d/darcs
+ rm $(DESTDIR)/$(PREFIX)/etc/bash_completion.d/darcs
}
More information about the darcs-devel
mailing list