diff mbox

Broken build on current unstable branch

Message ID 1290020772.6990.23.camel@sale659.sandia.gov (mailing list archive)
State New, archived
Headers show

Commit Message

Jim Schutt Nov. 17, 2010, 7:06 p.m. UTC
None
diff mbox

Patch

diff --git a/src/Makefile.am b/src/Makefile.am
index 7bf088e..487f205 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -398,7 +398,7 @@  clean-local:
 
 # libs
 libcommon_a_SOURCES = \
-	$(builddir)/ceph_ver.c \
+	$(srcdir)/ceph_ver.c \
 	$(libcommon_files)
 
 # this list ommits the ceph_ver.c file


With the above, the build then breaks like this:

make  all-am
make[2]: Entering directory `/bigdata1/home/jaschut/git/ceph.git/src'
make[2]: *** No rule to make target `/ceph_ver.h', needed by `ceph_ver.c'.  Stop.
make[2]: Leaving directory `/bigdata1/home/jaschut/git/ceph.git/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/bigdata1/home/jaschut/git/ceph.git/src'
make: *** [all-recursive] Error 1


Evidently, for this version of automake (1.9.6), $(builddir)
is empty; e.g. I found this:
http://www.mail-archive.com/automake@gnu.org/msg15428.html

FWIW, the following, when added to the above, fixes the build for me:

diff --git a/src/Makefile.am b/src/Makefile.am
index 7bf088e..38916c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -352,8 +352,8 @@  docdir = ${datadir}/doc/ceph
 doc_DATA = $(srcdir)/sample.ceph.conf
 doc_SCRIPTS = sample.fetch_config
 
-sample.fetch_config: fetch_config
-	cp -f $(srcdir)/fetch_config $(builddir)/sample.fetch_config
+ $(top_builddir)/src/sample.fetch_config: fetch_config
+	cp -f $(srcdir)/fetch_config $(top_builddir)/src/sample.fetch_config
 
 shell_commondir = $(libdir)/ceph
 shell_common_SCRIPTS = ceph_common.sh
@@ -382,13 +382,13 @@  crush_include_DATA = \
 FORCE:
 .git_version: FORCE
 	$(srcdir)/check_version $(srcdir)/.git_version
-ceph_ver.h: .git_version
-	$(srcdir)/make_version $(srcdir)/.git_version $(builddir)/ceph_ver.h
+$(top_builddir)/src/ceph_ver.h: .git_version
+	$(srcdir)/make_version $(srcdir)/.git_version $(top_builddir)/src/ceph_ver.h
 
-ceph_ver.c: $(builddir)/ceph_ver.h
-common/debug.cc: $(builddir)/ceph_ver.h
-common/BackTrace.cc: $(builddir)/ceph_ver.h
-config.cc: $(builddir)/ceph_ver.h
+ceph_ver.c: $(top_builddir)/src/ceph_ver.h
+common/debug.cc: $(top_builddir)/src/ceph_ver.h
+common/BackTrace.cc: $(top_builddir)/src/ceph_ver.h
+config.cc: $(top_builddir)/src/ceph_ver.h
 
 # cleaning
 clean-local:
@@ -398,7 +398,7 @@  clean-local:
 
 # libs
 libcommon_a_SOURCES = \
-       $(builddir)/ceph_ver.c \
+       $(srcdir)/ceph_ver.c \
        $(libcommon_files)
 
 # this list ommits the ceph_ver.c file


Also FWIW, the following alternative, in addition to
the ceph_ver.c fix above, also fixes the build for me:

diff --git a/src/Makefile.am b/src/Makefile.am
index 7bf088e..c3db491 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -353,7 +353,7 @@  doc_DATA = $(srcdir)/sample.ceph.conf
 doc_SCRIPTS = sample.fetch_config
 
 sample.fetch_config: fetch_config
-	cp -f $(srcdir)/fetch_config $(builddir)/sample.fetch_config
+	cp -f $(srcdir)/fetch_config sample.fetch_config
 
 shell_commondir = $(libdir)/ceph
 shell_common_SCRIPTS = ceph_common.sh
@@ -383,12 +383,12 @@  FORCE:
 .git_version: FORCE
 	$(srcdir)/check_version $(srcdir)/.git_version
 ceph_ver.h: .git_version
-	$(srcdir)/make_version $(srcdir)/.git_version $(builddir)/ceph_ver.h
+	$(srcdir)/make_version $(srcdir)/.git_version ceph_ver.h
 
-ceph_ver.c: $(builddir)/ceph_ver.h
-common/debug.cc: $(builddir)/ceph_ver.h
-common/BackTrace.cc: $(builddir)/ceph_ver.h
-config.cc: $(builddir)/ceph_ver.h
+ceph_ver.c: ceph_ver.h
+common/debug.cc: ceph_ver.h
+common/BackTrace.cc: ceph_ver.h
+config.cc: ceph_ver.h
 
 # cleaning
 clean-local: