[PATCH 1/2] usr/Makefile: define object lists for tgtadm and tgtimg targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When object lists are defined for each target, the lists of dependencies
may be generated automatically.

For instance, before this patch is applied, in the list of dependencies
for tgtimg one file was missing (not added manually). This patch ensures
such slip won't happen.

Signed-off-by: Alexander Nezhinsky <alexandern@xxxxxxxxxxxx>
---
 usr/Makefile |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/usr/Makefile b/usr/Makefile
index 13f6cf8..14d5b06 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -54,15 +54,21 @@ tgtd: $(TGTD_OBJS)
 
 -include $(TGTD_DEP)
 
-tgtadm: tgtadm.o
+TGTADM_OBJS = tgtadm.o
+TGTADM_DEP = $(TGTADM_OBJS:.o=.d)
+
+tgtadm: $(TGTADM_OBJS)
 	$(CC) $^ -o $@
 
--include tgtadm.d
+-include $(TGTADM_DEP)
+
+TGTIMG_OBJS = tgtimg.o libssc.o libcrc32c.o
+TGTIMG_DEP = $(TGTIMG_OBJS:.o=.d)
 
-tgtimg: tgtimg.o libssc.o libcrc32c.o
+tgtimg: $(TGTIMG_OBJS)
 	$(CC) $^ -o $@
 
--include tgtimg.d libssc.d
+-include $(TGTIMG_DEP)
 
 %.o: %.c
 	$(CC) -c $(CFLAGS) $*.c -o $*.o
-- 
1.7.3.2

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux