[Stgt-devel] [PATCH] Makefile auto dependencies

Alexander Nezhinsky nezhinsky
Tue Aug 28 20:57:42 CEST 2007


On 8/27/07, FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp> wrote:
> Hmm, I stil can't apply the patch cleanly.
> 
> Anyway, I applied it by hand this time.

Tomo,

I don't know what was the reason, maybe some diffs against the
iser version creeped in.

Anyway, you forgot to remove a plus sign before the %.o rule, so the
dependencies are not really gererated. Hope this time it works,
i tested it against a freshly cloned repository.

This patch fixes this typo (+%.o: %.c) and also breaks the lines
longer than 80 chars into shorter ones.

Signed-off-by: Alexander Nezhinsky <nezhinsky at gmail.com>
---
  usr/Makefile |   11 +++++++----
  1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/usr/Makefile b/usr/Makefile
index f97f0da..3ac45c0 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -40,11 +40,14 @@ LIBS += -lcrypto -lpthread
  endif

  INCLUDES += -I.
-CFLAGS += -Wall -g -O2 -Wstrict-prototypes -fPIC -D_LARGEFILE64_SOURCE 
$(INCLUDES)
+
+CFLAGS += -D_LARGEFILE64_SOURCE
+CFLAGS += $(INCLUDES)
+CFLAGS += -g -O2 -Wall -Wstrict-prototypes -fPIC

  PROGRAMS += tgtd tgtadm
-TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o 
parser.o \
-               spc.o sbc.o mmc.o osd.o spt.o scc.o smc.o
+TGTD_OBJS += tgtd.o mgmt.o target.o scsi.o log.o driver.o util.o work.o \
+               parser.o spc.o sbc.o mmc.o osd.o spt.o scc.o smc.o

  TGTD_DEP = $(TGTD_OBJS:.o=.d)

@@ -61,7 +64,7 @@ tgtadm: tgtadm.o

  -include tgtadm.d

-+%.o: %.c
+%.o: %.c
         $(CC) -c $(CFLAGS) $*.c -o $*.o
         @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c



More information about the stgt mailing list