From: "Christopher Li" <sparse@chrisli.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>,
Josh Triplett <josh@freedesktop.org>,
Alexey Zaytsev <alexey.zaytsev@gmail.com>
Subject: [PATCH]: clean up Makefile long lines
Date: Thu, 25 Dec 2008 18:27:13 -0800 [thread overview]
Message-ID: <70318cbf0812251827p2a294b9ar3a64f1d1b418be80@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 225 bytes --]
On Thu, Dec 25, 2008 at 1:30 AM, Sam Ravnborg <sam@ravnborg.org> wrote:
>
> When you are patching the Makefile then I suggest breaking this line up somehow.
> Should be a follow-up patch.
Here is the follow-up patch.
Chris
[-- Attachment #2: makefile-cleanup.patch.txt --]
[-- Type: text/plain, Size: 2054 bytes --]
Clean up Makefile long lines
Signed-Off-By: Christopher Li<sparse@chrisli.org>
Index: sparse.chrisl/Makefile
===================================================================
--- sparse.chrisl.orig/Makefile
+++ sparse.chrisl/Makefile
@@ -78,6 +78,17 @@ QUIET_LINK = $(Q:@=@echo ' LIN
QUIET_INST_SH = $(Q:@=echo -n ' INSTALL ';)
QUIET_INST = $(Q:@=@echo -n ' INSTALL ';)
+define INSTALL_CMD
+ $(Q)$(QUIET_INST_SH)install -v $1 $(DESTDIR)$2/$1 || exit 1;
+
+endef
+
+SED_PC_CMD = 's|@version@|$(VERSION)|g; \
+ s|@prefix@|$(PREFIX)|g; \
+ s|@libdir@|$(LIBDIR)|g; \
+ s|@includedir@|$(INCLUDEDIR)|g'
+
+
all: $(PROGRAMS) sparse.pc
install: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
@@ -86,22 +97,14 @@ install: $(INST_PROGRAMS) $(LIBS) $(LIB_
$(Q)install -d $(DESTDIR)$(MAN1DIR)
$(Q)install -d $(DESTDIR)$(INCLUDEDIR)/sparse
$(Q)install -d $(DESTDIR)$(PKGCONFIGDIR)
- $(Q)for f in $(INST_PROGRAMS); do \
- $(QUIET_INST_SH)install -v $$f $(DESTDIR)$(BINDIR)/$$f || exit 1; \
- done
- $(Q)for f in $(INST_MAN1); do \
- $(QUIET_INST_SH)install -m 644 -v $$f $(DESTDIR)$(MAN1DIR)/$$f || exit 1; \
- done
- $(Q)for f in $(LIBS); do \
- $(QUIET_INST_SH)install -m 644 -v $$f $(DESTDIR)$(LIBDIR)/$$f || exit 1; \
- done
- $(Q)for f in $(LIB_H); do \
- $(QUIET_INST_SH)install -m 644 -v $$f $(DESTDIR)$(INCLUDEDIR)/sparse/$$f || exit 1; \
- done
- $(QUIET_INST)install -m 644 -v sparse.pc $(DESTDIR)$(PKGCONFIGDIR)/sparse.pc
+ $(foreach f,$(INST_PROGRAMS),$(call INSTALL_CMD,$f,$(BINDIR)))
+ $(foreach f,$(INST_MAN1),$(call INSTALL_CMD,$f,$(MAN1DIR)))
+ $(foreach f,$(LIBS),$(call INSTALL_CMD,$f,$(LIBDIR)))
+ $(foreach f,$(LIB_H),$(call INSTALL_CMD,$f,$(INCLUDEDIR)/sparse))
+ $(call INSTALL_CMD,sparse.pc,$(PKGCONFIGDIR))
sparse.pc: sparse.pc.in
- $(QUIET_GEN)sed 's|@version@|$(VERSION)|g;s|@prefix@|$(PREFIX)|g;s|@libdir@|$(LIBDIR)|g;s|@includedir@|$(INCLUDEDIR)|g' sparse.pc.in > sparse.pc
+ $(QUIET_GEN)sed $(SED_PC_CMD) sparse.pc.in > sparse.pc
compile_EXTRA_DEPS = compile-i386.o
reply other threads:[~2008-12-26 2:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=70318cbf0812251827p2a294b9ar3a64f1d1b418be80@mail.gmail.com \
--to=sparse@chrisli.org \
--cc=alexey.zaytsev@gmail.com \
--cc=josh@freedesktop.org \
--cc=linux-sparse@vger.kernel.org \
--cc=sam@ravnborg.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).