Makefile: use export to avoid passing the environment to sub-makes
Our current sub-make invocation passes the necessary variables on the
command line. This is not wrong, but is ugly. Use the Makefile 'export'
to allow these variables to be seen by sub-makes without having to pass
them. Also remove the duplicated definition of LIBDIR{32,64}, since now
they are inherited
Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]>
diff --git a/Makefile b/Makefile
index 213dbfa..d169042 100644
--- a/Makefile
+++ b/Makefile
@@ -84,6 +84,14 @@ endif
DEPFILES = $(LIBOBJS:%.o=%.d)
+export OBJDIRS
+export CC32
+export CC64
+export ELF32
+export ELF64
+export LIBDIR32
+export LIBDIR64
+
all: libs tests
.PHONY: tests libs
@@ -94,7 +102,7 @@ tests: libs # Force make to build the library first
tests: tests/all
tests/%:
- $(MAKE) -C tests OBJDIRS="$(OBJDIRS)" CC32="$(CC32)" CC64="$(CC64)"
ELF32="$(ELF32)" ELF64="$(ELF64)" $*
+ $(MAKE) -C tests $*
check: all
cd tests; ./run_tests.sh
diff --git a/tests/Makefile b/tests/Makefile
index 13e3983..6939784 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -32,8 +32,6 @@ SCRIPTS=../ldscripts
SCRIPTS32 = $(SCRIPTS)/$(ELF32)
SCRIPTS64 = $(SCRIPTS)/$(ELF64)
HUGETLBFS_LD=../ld.hugetlbfs
-LIBDIR32 = $(PREFIX)/$(LIB32)
-LIBDIR64 = $(PREFIX)/$(LIB64)
INST_TESTSDIR32 = $(LIBDIR32)/libhugetlbfs/tests
INST_TESTSDIR64 = $(LIBDIR64)/libhugetlbfs/tests
--
Nishanth Aravamudan <[EMAIL PROTECTED]>
IBM Linux Technology Center
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel