Skip to contentSkip to conversation

KSM test: Fix compilation

PATCH In review Lucas Meneghel Rodrigues 2 participants 2 messages Jan 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KSM test: Fix compilation

In the ksm Makefile, I noticed that the author used the generic_trunk_target.mk macro, instead of the generic_leaf_target.mk macro, leading to compilation failures. This patch fixes the problem.

---
 testcases/kernel/mem/ksm/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/mem/ksm/Makefile +1 -1
index 81509bf..9da67a8 100644
@@ -39,5 +39,5 @@ trunk-clean:: | lib-clean
 lib-clean:: $(LIBDIR)
 	$(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean
 
-include $(top_srcdir)/include/mk/generic_trunk_target.mk
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
 include $(top_srcdir)/include/mk/testcases.mk
Signature · 13 lines
1.7.3.4


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#1 lore raw
Quoted 20 lines · Lucas Meneghel Rodrigues

In the ksm Makefile, I noticed that the author used the generic_trunk_target.mk macro, instead of the generic_leaf_target.mk macro, leading to compilation failures. This patch fixes the problem.

---
 testcases/kernel/mem/ksm/Makefile |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
testcases/kernel/mem/ksm/Makefile +0 -0
index 81509bf..9da67a8 100644
@@ -39,5 +39,5 @@ trunk-clean:: | lib-clean
  lib-clean:: $(LIBDIR)

       $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean

testcases/kernel/mem/ksm/Makefile +1 -1
-include $(top_srcdir)/include/mk/generic_trunk_target.mk
+include $(top_srcdir)/include/mk/generic_leaf_target.mk
Quoted 1 line

 include $(top_srcdir)/include/mk/testcases.mk

This is the fully correct way of doing this:

$ git diff testcases/kernel/mem/ksm/Makefile
(quoted diff) +0 -0

b/testcases/kernel/mem/ksm/Makefile
index 81509bf..8138d70 100644

testcases/kernel/mem/ksm/Makefile +2 -4
@@ -18,12 +18,11 @@
 
 top_srcdir              ?= ../../../..
 
-include $(top_srcdir)/include/mk/env_pre.mk
+include $(top_srcdir)/include/mk/testcases.mk
 
 LDLIBS                 += $(NUMA_LIBS) -lmem
 LIBDIR                 := ../lib
 LIB                    := $(LIBDIR)/libmem.a
-FILTER_OUT_DIRS                := $(LIBDIR)
 LDFLAGS                        += -L$(LIBDIR)
 
 $(LIBDIR):
@@ -39,5 +38,4 @@ trunk-clean:: | lib-clean
 lib-clean:: $(LIBDIR)
        $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean
 
-include $(top_srcdir)/include/mk/generic_trunk_target.mk
-include $(top_srcdir)/include/mk/testcases.mk
+include $(top_srcdir)/include/mk/generic_leaf_target.mk

Granted, Cai should have used a Makefile.inc file and included it
from all of the Makefiles though that required this library if it was indeed a portable library. Otherwise he should just move the source to the test directory and compile / link the testcases with the additional source file. There are examples hanging around the source tree that do this (testcases/kernel/syscalls/... ), but I don't remember where they are exactly.
Thanks,
-Garrett

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list