[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
Re: [vsipl++] PATCH: installation / packaging
- To: vsipl++@xxxxxxxxxxxxxxxx
- Subject: Re: [vsipl++] PATCH: installation / packaging
- From: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
- Date: Thu, 05 Jan 2006 00:24:22 -0500
The attached patch corrects a bug introduced by my last patch, and does
some minor cleanup.
We used to use the ':=' variant of Makefile variables in all places,
though that appears to be problematic since some of the included
helper makefiles add to them, some use them.
I thus made two of the variables ($(objects) and $(deps)) lazy.
While I'm slightly worried by the problem this revealed, I think
this change is the simplest way to work around the issue.
May be on the long term we can find a better way to deal with it.
The test results file generated in the 'check-installed' target
now includes the suffix variable, so you will see e.g. 'results-opt.qmr'
when testing vsip++-opt.pc, etc.
Committed.
Regards,
Stefan
Index: GNUmakefile.in
===================================================================
RCS file: /home/cvs/Repository/vpp/GNUmakefile.in,v
retrieving revision 1.36
diff -u -r1.36 GNUmakefile.in
--- GNUmakefile.in 4 Jan 2006 19:10:03 -0000 1.36
+++ GNUmakefile.in 5 Jan 2006 05:11:57 -0000
@@ -168,9 +168,10 @@
vpath %.hpp $(srcdir)
vpath %.xml $(srcdir)
-# All object files.
-objects := $(patsubst $(srcdir)/%.cpp, %.$(OBJEXT), $(cxx_sources))
-deps := $(patsubst $(srcdir)/%.cpp, %.d, $(cxx_sources))
+# The following two variables must be evaluated lazily since at this point
+# $(cxx_sources) is not completely defined.
+objects = $(patsubst $(srcdir)/%.cpp, %.$(OBJEXT), $(cxx_sources))
+deps = $(patsubst $(srcdir)/%.cpp, %.d, $(cxx_sources))
hdr := $(patsubst $(srcdir)/src/%, %, \
$(wildcard $(srcdir)/src/vsip/*.hpp))
Index: tests/GNUmakefile.inc.in
===================================================================
RCS file: /home/cvs/Repository/vpp/tests/GNUmakefile.inc.in,v
retrieving revision 1.6
diff -u -r1.6 GNUmakefile.inc.in
--- tests/GNUmakefile.inc.in 23 Dec 2005 20:03:55 -0000 1.6
+++ tests/GNUmakefile.inc.in 5 Jan 2006 05:11:57 -0000
@@ -12,12 +12,11 @@
# Variables
########################################################################
-pkgconfig:= PKG_CONFIG_PATH=$(libdir)/pkgconfig \
- pkg-config vsipl++$(suffix) \
- --define-variable=prefix=$(prefix)
+tests_pkgconfig := PKG_CONFIG_PATH=$(libdir)/pkgconfig \
+ pkg-config vsipl++$(suffix) \
+ --define-variable=prefix=$(prefix)
-
-tests_qmtest_extensions = \
+tests_qmtest_extensions := \
tests/QMTest/vpp_database.py \
tests/QMTest/classes.qmc
@@ -28,13 +27,13 @@
check:: libs $(tests_qmtest_extensions)
cd tests && qmtest run
-check-installed::
+check-installed:: $(tests_qmtest_extensions)
cat tests/context-installed.pre | \
- sed -e "s|@CXX_@|`$(pkgconfig) --variable=cxx`|" | \
- sed -e "s|@CPPFLAGS_@|`$(pkgconfig) --variable=cppflags`|" | \
- sed -e "s|@CXXFLAGS_@|`$(pkgconfig) --variable=cxxflags`|" | \
- sed -e "s|@LIBS_@|`$(pkgconfig) --libs`|" > tests/context-installed
- cd tests && qmtest run -C context-installed
+ sed -e "s|@CXX_@|`$(tests_pkgconfig) --variable=cxx`|" | \
+ sed -e "s|@CPPFLAGS_@|`$(tests_pkgconfig) --variable=cppflags`|" | \
+ sed -e "s|@CXXFLAGS_@|`$(tests_pkgconfig) --variable=cxxflags`|" | \
+ sed -e "s|@LIBS_@|`$(tests_pkgconfig) --libs`|" > tests/context-installed
+ cd tests && qmtest run -C context-installed -o results$(suffix).qmr
tests/QMTest/%: $(srcdir)/tests/QMTest/%
cp $< $@
|