* [PATCH]: clean up Makefile long lines
@ 2008-12-26 2:27 Christopher Li
0 siblings, 0 replies; only message in thread
From: Christopher Li @ 2008-12-26 2:27 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Linux-Sparse, Josh Triplett, Alexey Zaytsev
[-- 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-12-26 2:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-26 2:27 [PATCH]: clean up Makefile long lines Christopher Li
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).