Commit abaf180f authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'qa/out_of_source_build' into 'master'

enable out of source builds

The changes should be GNU-Make / Autotools compatible. On the machines I have access to they enable out of source builds, for instance :
```
mculpo@nuvolari:~/epfl/swift$ tree -d -L 2
.
├── build
│   ├── doc
│   ├── examples
│   ├── src
│   └── tests
├── install
│   ├── bin
│   ├── include
│   └── lib
└── sources
    ├── autom4te.cache
    ├── doc
    ├── examples
    ├── m4
    ├── src
    ├── tests
    └── theory
```
It enables having different build configurations pointing at the same source checkout. 

See merge request !198
parents 091a434f 271eb4c7
......@@ -19,7 +19,7 @@
MYFLAGS = -DTIMER
# Add the source directory and debug to CFLAGS
AM_CFLAGS = -I../src $(HDF5_CPPFLAGS)
AM_CFLAGS = -I$(top_srcdir)/src $(HDF5_CPPFLAGS)
AM_LDFLAGS = $(HDF5_LDFLAGS)
......
......@@ -92,12 +92,12 @@ version_string.h: version_string.h.in $(AM_SOURCES) $(include_HEADERS) $(noinst_
GIT_BRANCH=`$(GIT_CMD) branch | sed -n 's/^\* \(.*\)/\1/p'`; \
sed -e "s,@PACKAGE_VERSION\@,$(PACKAGE_VERSION)," \
-e "s,@GIT_REVISION\@,$${GIT_REVISION}," \
-e "s|@GIT_BRANCH\@|$${GIT_BRANCH}|" version_string.h.in > version_string.h; \
-e "s|@GIT_BRANCH\@|$${GIT_BRANCH}|" $< > version_string.h; \
else \
if test ! -f version_string.h; then \
sed -e "s,@PACKAGE_VERSION\@,$(PACKAGE_VERSION)," \
-e "s,@GIT_REVISION\@,unknown," \
-e "s,@GIT_BRANCH\@,unknown," version_string.h.in > version_string.h; \
-e "s,@GIT_BRANCH\@,unknown," $< > version_string.h; \
fi; \
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment