From: Matthias Lederhofer <matled@gmx.net>
To: git@vger.kernel.org
Subject: [PATCH] Makefile: USE_SYMLINK option
Date: Sat, 30 Jun 2007 20:14:56 +0200 [thread overview]
Message-ID: <20070630181456.GA15035@moooo.ath.cx> (raw)
When USE_SYMLINK is defined symlinks will be used instead of hardlinks.
Signed-off-by: Matthias Lederhofer <matled@gmx.net>
---
I found no real drawback using symlinks and symlinks are sometimes
more practical, for example when copying/creating a tarball of the
installation.
---
Makefile | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 4ea5e45..db0b818 100644
--- a/Makefile
+++ b/Makefile
@@ -181,6 +181,11 @@ INSTALL = install
RPMBUILD = rpmbuild
TCL_PATH = tclsh
TCLTK_PATH = wish
+ifdef USE_SYMLINK
+LN = ln -s
+else
+LN = ln
+endif
export TCL_PATH TCLTK_PATH
@@ -759,10 +764,10 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
help.o: common-cmds.h
git-merge-subtree$X: git-merge-recursive$X
- $(QUIET_BUILT_IN)rm -f $@ && ln git-merge-recursive$X $@
+ $(QUIET_BUILT_IN)rm -f $@ && $(LN) git-merge-recursive$X $@
$(BUILT_INS): git$X
- $(QUIET_BUILT_IN)rm -f $@ && ln git$X $@
+ $(QUIET_BUILT_IN)rm -f $@ && $(LN) git$X $@
common-cmds.h: ./generate-cmdlist.sh
@@ -1004,12 +1009,16 @@ ifndef NO_TCLTK
endif
if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
then \
- ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
+ $(LN) -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' || \
cp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \
fi
- $(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
+ifdef USE_SYMLINK
+ $(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && $(LN) 'git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
+else
+ $(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && $(LN) '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)
+endif
ifneq (,$X)
$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)
endif
--
1.5.0.3
next reply other threads:[~2007-06-30 18:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-30 18:14 Matthias Lederhofer [this message]
2007-06-30 18:46 ` [PATCH] Makefile: USE_SYMLINK option Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070630181456.GA15035@moooo.ath.cx \
--to=matled@gmx.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).