out of tree build
Hi,
I have tried building LTP january release, and found that the following changes were necessary.
Regards.
Makefile +1 -1
@@ -176,7 +176,7 @@ Version: if git describe >/dev/null 2>&1; then \ git describe > "$@"; \ else \ - cp VERSION "$@"; \ + cp $(top_srcdir)/VERSION "$@"; \ fi $(INSTALL_DIR)/Version: Version
testcases/kernel/include/lib.mk +7 -4
@@ -16,10 +16,13 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -KERNEL_DIR := $(top_srcdir)/testcases/kernel +KERNEL_SRCDIR := $(top_srcdir)/testcases/kernel +LIBKERNTEST_SRCDIR := $(KERNEL_SRCDIR)/lib + +KERNEL_DIR := $(top_builddir)/testcases/kernel LIBKERNTEST_DIR := $(KERNEL_DIR)/lib LIBKERNTEST := $(KERNEL_DIR)/libkerntest.a -CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_DIR)/include +CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_SRCDIR)/include LDLIBS += $(NUMA_LIBS) -lkerntest -lltp LDFLAGS += -L$(LIBKERNTEST_DIR)
@@ -27,11 +30,11 @@ $(LIBKERNTEST_DIR): mkdir -p "$@" $(LIBKERNTEST): $(LIBKERNTEST_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all + $(MAKE) -C $^ -f "$(LIBKERNTEST_SRCDIR)/Makefile" all MAKE_DEPS += $(LIBKERNTEST) trunk-clean:: | lib-clean lib-clean:: $(LIBKERNTEST_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean + $(MAKE) -C $^ -f "$(LIBKERNTEST_SRCDIR)/Makefile" clean
testcases/kernel/lib/Makefile +1 -1
@@ -22,7 +22,7 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk -CPPFLAGS += $(NUMA_CPPFLAGS) -I../include +CPPFLAGS += $(NUMA_CPPFLAGS) -I$(abs_srcdir)/../include INTERNAL_LIB := libkerntest.a include $(top_srcdir)/include/mk/lib.mk
testcases/kernel/mem/include/libmem.mk +7 -4
@@ -16,11 +16,14 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -MEM_DIR := $(top_srcdir)/testcases/kernel/mem +MEM_SRCDIR := $(top_srcdir)/testcases/kernel/mem +LIBMEM_SRCDIR := $(MEM_SRCDIR)/lib + +MEM_DIR := $(top_builddir)/testcases/kernel/mem LIBMEM_DIR := $(MEM_DIR)/lib LIBMEM := $(LIBMEM_DIR)/libmem.a FILTER_OUT_DIRS := $(LIBMEM_DIR) -CFLAGS += -I$(MEM_DIR)/include +CFLAGS += -I$(MEM_SRCDIR)/include LDLIBS += $(NUMA_LIBS) -lmem -lltp LDFLAGS += -L$(LIBMEM_DIR)
@@ -28,13 +31,13 @@ $(LIBMEM_DIR): mkdir -p "$@" $(LIBMEM): $(LIBMEM_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all + $(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" all MAKE_DEPS += $(LIBMEM) trunk-clean:: | lib-clean lib-clean:: $(LIBMEM_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean + $(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" clean include $(top_srcdir)/testcases/kernel/include/lib.mk
testcases/kernel/mem/lib/Makefile +1 -1
@@ -20,7 +20,7 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/env_pre.mk -CFLAGS += -I../include +CPPFLAGS += -I$(abs_srcdir)/../include INTERNAL_LIB := libmem.a include $(top_srcdir)/testcases/kernel/include/lib.mk
utils/ffsb-6.0-rc2/stamp-h +1 -0
@@ -0,0 +1 @@ +timestamp
utils/Makefile +7 -7
@@ -28,18 +28,18 @@ FFSBDIR := ffsb-6.0-rc2 FILTER_OUT_DIRS := $(FFSBDIR) FFSB := $(FFSBDIR)/ffsb -$(FFSB): $(FFSBDIR) - cd $^; ./configure - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all - cp $(FFSBDIR)/ffsb ffsb +unexport MAKEFLAGS + +$(FFSB): $(abs_srcdir)/$(FFSBDIR) + mkdir -p $(FFSBDIR) + cd $(FFSBDIR) && "$^/configure" && $(MAKE) all trunk-all: $(FFSB) trunk-clean:: | ffsb-clean -ffsb-clean:: $(FFSBDIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean - rm -rf ffsb +ffsb-clean:: $(abs_srcdir)/$(FFSBDIR) + cd $(FFSBDIR); $(MAKE) clean include $(top_srcdir)/include/mk/generic_trunk_target.mk
Signature · 12 lines
Gilles. ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Hi!
Quoted 4 lines
Hi,
I have tried building LTP january release, and found that the following changes were necessary.
We did not test it for some time (I've looked at the history and it has been broken for at least two years) sorry.
Now to the patch. Generally it looks good to me, most of the changes are fixes in paths that should not break anything.
Have you tried in tree build with the changes, was it working fine?
Does the patch apply over the latest git? Ideally you should send a signed patch against latest git (output from git format-patch).
And it would be a good idea to add out-of-tree build instructions into the doc/mini-howto-building-ltp-from-git.txt too.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 1/1 build: fix out-of-tree build
--- Makefile | 2 +- testcases/kernel/include/lib.mk | 11 +++++++---- testcases/kernel/lib/Makefile | 2 +- testcases/kernel/mem/include/libmem.mk | 11 +++++++---- testcases/kernel/mem/lib/Makefile | 2 +- testcases/network/rpc/basic_tests/rpc01/Makefile | 2 +- utils/Makefile | 14 +++++++------- 7 files changed, 25 insertions(+), 19 deletions(-)
Makefile +1 -1
@@ -176,7 +176,7 @@ Version: if git describe >/dev/null 2>&1; then \ git describe > "$@"; \ else \ - cp VERSION "$@"; \ + cp $(top_srcdir)/VERSION "$@"; \ fi $(INSTALL_DIR)/Version: Version
testcases/kernel/include/lib.mk +7 -4
@@ -16,10 +16,13 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -KERNEL_DIR := $(top_srcdir)/testcases/kernel +KERNEL_SRCDIR := $(abs_top_srcdir)/testcases/kernel +LIBKERNTEST_SRCDIR := $(KERNEL_SRCDIR)/lib + +KERNEL_DIR := $(abs_top_builddir)/testcases/kernel LIBKERNTEST_DIR := $(KERNEL_DIR)/lib LIBKERNTEST := $(KERNEL_DIR)/libkerntest.a -CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_DIR)/include +CPPFLAGS += $(NUMA_CPPFLAGS) -I$(KERNEL_SRCDIR)/include LDLIBS += $(NUMA_LIBS) -lkerntest -lltp LDFLAGS += -L$(LIBKERNTEST_DIR)
@@ -27,11 +30,11 @@ $(LIBKERNTEST_DIR): mkdir -p "$@" $(LIBKERNTEST): $(LIBKERNTEST_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all + $(MAKE) -C $^ -f "$(LIBKERNTEST_SRCDIR)/Makefile" all MAKE_DEPS += $(LIBKERNTEST) trunk-clean:: | lib-clean lib-clean:: $(LIBKERNTEST_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean + $(MAKE) -C $^ -f "$(LIBKERNTEST_SRCDIR)/Makefile" clean
testcases/kernel/lib/Makefile +1 -1
@@ -22,7 +22,7 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk -CPPFLAGS += $(NUMA_CPPFLAGS) -I../include +CPPFLAGS += $(NUMA_CPPFLAGS) -I$(abs_srcdir)/../include INTERNAL_LIB := libkerntest.a include $(top_srcdir)/include/mk/lib.mk
testcases/kernel/mem/include/libmem.mk +7 -4
@@ -16,11 +16,14 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # -MEM_DIR := $(top_srcdir)/testcases/kernel/mem +MEM_SRCDIR := $(top_srcdir)/testcases/kernel/mem +LIBMEM_SRCDIR := $(MEM_SRCDIR)/lib + +MEM_DIR := $(top_builddir)/testcases/kernel/mem LIBMEM_DIR := $(MEM_DIR)/lib LIBMEM := $(LIBMEM_DIR)/libmem.a FILTER_OUT_DIRS := $(LIBMEM_DIR) -CFLAGS += -I$(MEM_DIR)/include +CFLAGS += -I$(MEM_SRCDIR)/include LDLIBS += $(NUMA_LIBS) -lmem -lltp LDFLAGS += -L$(LIBMEM_DIR)
@@ -28,13 +31,13 @@ $(LIBMEM_DIR): mkdir -p "$@" $(LIBMEM): $(LIBMEM_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all + $(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" all MAKE_DEPS += $(LIBMEM) trunk-clean:: | lib-clean lib-clean:: $(LIBMEM_DIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean + $(MAKE) -C $^ -f "$(LIBMEM_SRCDIR)/Makefile" clean include $(top_srcdir)/testcases/kernel/include/lib.mk
testcases/kernel/mem/lib/Makefile +1 -1
@@ -20,7 +20,7 @@ top_srcdir ?= ../../../.. include $(top_srcdir)/include/mk/env_pre.mk -CFLAGS += -I../include +CPPFLAGS += -I$(abs_srcdir)/../include INTERNAL_LIB := libmem.a include $(top_srcdir)/testcases/kernel/include/lib.mk
testcases/network/rpc/basic_tests/rpc01/Makefile +1 -1
@@ -32,7 +32,7 @@ SUBDIRS := datafiles LIBSRCS := $(abs_srcdir)/librpc01.c INTERNAL_LIB := librpc01.a -LDFLAGS += -L$(abs_srcdir) +LDFLAGS += -L$(abs_builddir) LDLIBS += -lrpc01 MAKE_TARGETS := rpc1 rpc_server
utils/Makefile +7 -7
@@ -28,18 +28,18 @@ FFSBDIR := ffsb-6.0-rc2 FILTER_OUT_DIRS := $(FFSBDIR) FFSB := $(FFSBDIR)/ffsb -$(FFSB): $(FFSBDIR) - cd $^; ./configure - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all - cp $(FFSBDIR)/ffsb ffsb +unexport MAKEFLAGS + +$(FFSB): $(abs_srcdir)/$(FFSBDIR) + mkdir -p $(FFSBDIR) + cd $(FFSBDIR) && "$^/configure" && $(MAKE) all trunk-all: $(FFSB) trunk-clean:: | ffsb-clean -ffsb-clean:: $(FFSBDIR) - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" clean - rm -rf ffsb +ffsb-clean:: $(abs_srcdir)/$(FFSBDIR) + cd $(FFSBDIR); $(MAKE) clean include $(top_srcdir)/include/mk/generic_trunk_target.mk
Signature · 13 lines
1.7.10.4 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Re: [LTP] [PATCH] build: fix out-of-tree build
Hi!
utils/Makefile FFSBDIR := ffsb-6.0-rc2 · line 35
Quoted 9 lines
-$(FFSB): $(FFSBDIR)
utils/Makefile +5
-3- cd $^; ./configure - $(MAKE) -C $^ -f "$(abs_srcdir)/$^/Makefile" all - cp $(FFSBDIR)/ffsb ffsb +unexport MAKEFLAGS + +$(FFSB): $(abs_srcdir)/$(FFSBDIR) + mkdir -p $(FFSBDIR) + cd $(FFSBDIR) && "$^/configure" && $(MAKE) all
The GNU Make manual suggests to use $(MAKE) all MAKEFLAGS= instead of the unexport, the rest looks ok.
Signature · 13 lines
Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list