git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/6] build: cleanup using $<

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 25, 2013, 02:41 UTC
Message-ID
<1369449666-18879-4-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1369449666-18879-1-git-send-email-felipe.contreras@gmail.com>
No need to list the first prerequisite. No functional changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 1ac52dd..28b6117 100644
--- a/Makefile
+++ b/Makefile
@@ -1731,9 +1731,9 @@ version.sp version.s version.o: EXTRA_CPPFLAGS = \
 
 $(BUILT_INS): git$X
 	$(QUIET_BUILT_IN)$(RM) $@ && \
-	ln git$X $@ 2>/dev/null || \
-	ln -s git$X $@ 2>/dev/null || \
-	cp git$X $@
+	ln $< $@ 2>/dev/null || \
+	ln -s $< $@ 2>/dev/null || \
+	cp $< $@
 
 common-cmds.h: ./generate-cmdlist.sh command-list.txt
 
@@ -1798,7 +1798,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE
 	    -e '	x' \
 	    -e '}' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
-	    $@.perl >$@+ && \
+	    $< >$@+ && \
 	chmod +x $@+ && \
 	mv $@+ $@
 
@@ -1831,7 +1831,7 @@ $(SCRIPT_PYTHON_GEN): % : %.py
 	sed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \
 	    -e 's|\(os\.getenv("GITPYTHONLIB"\)[^)]*)|\1,"@@INSTLIBDIR@@")|' \
 	    -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
-	    $@.py >$@+ && \
+	    $< >$@+ && \
 	chmod +x $@+ && \
 	mv $@+ $@
 else # NO_PYTHON
-- 
1.8.3.rc3.312.g47657de
Previous: Felipe ContrerasNext: Felipe Contreras
Message 4 of 8 in “build: cleanups”
  1. 0/6 build: cleanupsFelipe Contreras, May 25, 2013
  2. 1/6 build: trivial simplificationFelipe Contreras, May 25, 2013
  3. 2/6 build: cleanup using $^Felipe Contreras, May 25, 2013
  4. 3/6 build: cleanup using $<Felipe Contreras, May 25, 2013
  5. 4/6 build: be clearer about order-only prerequisitesFelipe Contreras, May 25, 2013
  6. Junio C HamanoMay 26, 2013
  7. 5/6 build: add NO_INSTALL variableFelipe Contreras, May 25, 2013
  8. 6/6 build: do not install git-remote-testpyFelipe Contreras, May 25, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.