List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:January 23 2008 8:28pm
Subject:Rev 426: Made everything work with make distcheck _except_ for Perl uninstall. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/devel

------------------------------------------------------------
revno: 426
revision-id:mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: devel
timestamp: Wed 2008-01-23 15:28:19 -0500
message:
  Made everything work with make distcheck _except_ for Perl uninstall. 
modified:
  acinclude.m4                   acinclude.m4-20070228020914-u2pk759xg7thauwf-8
  csharp/Makefile.am             makefile.in-20070228073157-gkwqutuh9f3nq7s2-1
  java/Makefile.am               makefile.am-20070415032352-9dpe6aurqcnuwcrd-1
  lua/Makefile.am                makefile.am-20070727221140-30x3yi1g0lf9rflk-2
  perl/Makefile.am               makefile.am-20070228070325-lv4v4ey3018yr147-1
  php/Makefile.am                makefile.am-20070414230657-agiyu1zcqcr6ugkn-2
  python/Makefile.am             makefile.am-20070925115907-x2wrdte5kicyfrrw-1
  ruby/Makefile.am               makefile.am-20070228212451-7arjxk90dkwcn5xr-2
=== modified file 'acinclude.m4'
--- a/acinclude.m4	2007-12-17 23:49:39 +0000
+++ b/acinclude.m4	2008-01-23 20:28:19 +0000
@@ -22,11 +22,14 @@
     PHP_CPPFLAGS=`$PHP_CONFIG --includes`
     PHP_LDFLAGS=`$PHP_CONFIG --ldflags`
     PHP_EXTDIR=`$PHP_CONFIG --extension-dir`
+    strip_php_prefix=`$PHP_CONFIG --prefix | sed 's/\//./g'`
+    PHP_ARCH_DIR=`echo $PHP_EXTDIR | sed "s/$strip_php_prefix//"`
   ],[
     PHP_CFLAGS=
     PHP_CPPFLAGS=
     PHP_LDFLAGS=
     PHP_EXTDIR=
+    PHP_ARCH_DIR=
     with_php=no
   ])
 
@@ -34,6 +37,7 @@
   AC_SUBST(PHP_CPPFLAGS)
   AC_SUBST(PHP_LDFLAGS)
   AC_SUBST(PHP_EXTDIR)
+  AC_SUBST(PHP_ARCH_DIR)
 ])
 
 
@@ -185,9 +189,12 @@
     dnl need to change quotes to allow square brackets
     changequote(<<, >>)dnl
     ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['archdir']"`
+    strip_ruby_prefix=`$RUBY -rrbconfig -e "print Config::CONFIG['prefix']" | sed
's/\//./g'`
+    
     RUBY_LIB=`$RUBY -rrbconfig -e "puts Config::CONFIG['ruby_install_name']"`
     LIBRUBYARG_SHARED=`$RUBY -rrbconfig -e "puts Config::CONFIG['LIBRUBYARG_SHARED']"`
     RUBY_DIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['archdir']"`
+    RUBY_ARCH_DIR=`echo $RUBY_DIR | sed "s/$strip_ruby_prefix//"`
     RUBY_LIBDIR=`$RUBY -rrbconfig -e "puts Config::CONFIG['rubylibdir']"`
     RUBY_INCLUDES="-I$ruby_prefix"
     changequote([, ])dnl
@@ -214,6 +221,7 @@
     RUBY_LIB=
     RUBY_DIR=
     RUBY_LIBDIR=
+    RUBY_ARCH_DIR=
     with_ruby="no"
   ])
 
@@ -222,6 +230,7 @@
   AC_SUBST(RUBY_LIB)
   AC_SUBST(RUBY_DIR)
   AC_SUBST(RUBY_LIBDIR)
+  AC_SUBST(RUBY_ARCH_DIR)
 
   AS_IF([test "x$RUBY_DIR" = "x"],[with_ruby="no"])
 ])

=== modified file 'csharp/Makefile.am'
--- a/csharp/Makefile.am	2008-01-23 06:57:26 +0000
+++ b/csharp/Makefile.am	2008-01-23 20:28:19 +0000
@@ -24,13 +24,13 @@
 SUFFIXES = .exe .cs .i .cpp
 
 .cs.exe: MySql.Cluster.NdbApi.dll ndbapi.cpp
-	$(MCS) -r:$(builddir)/MySql.Cluster.NdbApi.dll -r:$(MYSQL_DLL) $<
+	$(MCS) -keyfile:$(srcdir)/connectors.snk -r:$(builddir)/MySql.Cluster.NdbApi.dll
-r:$(MYSQL_DLL) $<
 
 MySql.Cluster.MgmApi.dll: $(MGMAPI_SOURCE) 
-	@cp -f $(srcdir)/connectors.snk $(builddir)/connectors.snk
-	$(MCS) -target:library -out:$(builddir)/$@ $(srcdir)/mgmapi/*.cs
$(builddir)/mgmapi/generated/*.cs 
+	@test $(srcdir)/connectors.snk -ef $(builddir)/connectors.snk || cp -f
$(srcdir)/connectors.snk $(builddir)/connectors.snk
+	$(MCS) -target:library -keyfile:$(srcdir)/connectors.snk  -out:$(builddir)/$@
$(srcdir)/mgmapi/*.cs $(builddir)/mgmapi/generated/*.cs 
 MySql.Cluster.NdbApi.dll: $(NDBAPI_SOURCE)
-	$(MCS) -target:library -out:$(builddir)/$@ $(srcdir)/ndbapi/*.cs
$(builddir)/ndbapi/generated/*.cs 
+	$(MCS) -target:library -keyfile:$(srcdir)/connectors.snk -out:$(builddir)/$@
$(srcdir)/ndbapi/*.cs $(builddir)/ndbapi/generated/*.cs 
 
 #$(CSHARP_SOURCES)
 #.PRECIOUS: %.cpp %.so %.dll
@@ -61,3 +61,6 @@
 	mkdir -p $(DESTDIR)$(datadir)/cli
 	$(INSTALL_DATA) MySql.Cluster.NdbApi.dll* $(DESTDIR)$(datadir)/cli
 	$(INSTALL_DATA) MySql.Cluster.MgmApi.dll* $(DESTDIR)$(datadir)/cli
+
+uninstall-local:
+	@rm $(DESTDIR)$(datadir)/cli/MySql.Cluster.NdbApi.dll
$(DESTDIR)$(datadir)/cli/MySql.Cluster.MgmApi.dll 

=== modified file 'java/Makefile.am'
--- a/java/Makefile.am	2008-01-23 00:31:54 +0000
+++ b/java/Makefile.am	2008-01-23 20:28:19 +0000
@@ -443,6 +443,9 @@
 	cp mgmj.jar $(DESTDIR)$(datadir)/java/ndb-mgmj-$(PACKAGE_VERSION).jar
 	( cd $(DESTDIR)$(datadir)/java ; ln -s ndb-ndbj-$(PACKAGE_VERSION).jar ndb-ndbj.jar ; ln
-sf ndb-mgmj-$(PACKAGE_VERSION).jar ndb-mgmj.jar )
 
+uninstall-local: 
+	rm $(DESTDIR)$(datadir)/java/ndb-ndbj-$(PACKAGE_VERSION).jar
$(DESTDIR)$(datadir)/java/ndb-mgmj-$(PACKAGE_VERSION).jar
+
 javadoc: ndbj.jar
 	@echo "Building javadocs"
 	$(JAVADOC) -use -windowtitle "NDB/Connectors - Java" -classpath $(classpath) -sourcepath
$(srcdir):$(builddir) -d $(builddir)/html com.mysql.cluster.mgmj com.mysql.cluster.ndbj

=== modified file 'lua/Makefile.am'
--- a/lua/Makefile.am	2007-12-06 09:25:04 +0000
+++ b/lua/Makefile.am	2008-01-23 20:28:19 +0000
@@ -6,7 +6,7 @@
 CLEANFILES=*.db test-out.rdf core* \
 	$(luaarch_DATA) ndbapi.cpp mgmapi.cpp
 
-SWIG_OPTS=-I$(top_srcdir) -I$(srcdir) -I$(SWIG_DIR) @MYSQL_INCLUDES@ 
+SWIG_OPTS=-I$(top_srcdir) -I$(srcdir) -I${top_builddir} -I$(SWIG_DIR) @MYSQL_INCLUDES@ 
 
 SUFFIXES = .cpp .i .so .o
 
@@ -17,7 +17,7 @@
 mgmapi.cpp: $(SWIG_MGM_SOURCES)
 
 .i.cpp: $(SWIG_SOURCES)
-	$(SWIG) -c++ -lua $(SWIG_OPTS) -o $@ $<
+	$(SWIG) -c++ -lua $(SWIG_OPTS) -o ${builddir}/$@ $<
 
 .cpp.o:
 	$(CXX) $(SWIG_OPTS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CXXFLAGS)
$(AM_CFLAGS) $(STANDARD_CFLAGS) -fPIC -DPIC $(LUA_CFLAGS) $< -c -o $@

=== modified file 'perl/Makefile.am'
--- a/perl/Makefile.am	2008-01-23 06:57:26 +0000
+++ b/perl/Makefile.am	2008-01-23 20:28:19 +0000
@@ -28,8 +28,8 @@
 
 $(PERL_MAKEFILE): $(srcdir)/Makefile.PL ${builddir}/ndbapi/ndbapi_wrap.cpp
${builddir}/mgmapi/mgmapi_wrap.cpp ${builddir}/lib/ndbapi.pm ${builddir}/lib/mgmapi.pm
$(srcdir)/Makefile.am
 	echo "$(DEB_MAKE_PL_OPT) should be INSTALLDIRS=vendor"
-	test ! ${srcdir}/Makefile.PL -ef ${builddir}/Makefile.PL && cp
${srcdir}/Makefile.PL ${builddir}/Makefile.PL
-	CFLAGS="-I${top_builddir} -I${top_srcdir} $(CPPFLAGS) $(CFLAGS) $(MYSQL_INCLUDES)"
LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS) $(LIBS)" $(PERL) $(srcdir)/Makefile.PL $(MAKE_PL_OPTS)
$(DEB_MAKE_PL_OPT) PREFIX="${prefix}"
+	test ${srcdir}/Makefile.PL -ef ${builddir}/Makefile.PL || cp ${srcdir}/Makefile.PL
${builddir}/Makefile.PL
+	CFLAGS="-I${top_builddir} -I${top_srcdir} -I../${top_srcdir}/mgmpp $(CPPFLAGS) $(CFLAGS)
$(MYSQL_INCLUDES)" LDFLAGS="$(AM_LDFLAGS) $(LDFLAGS) $(LIBS)" $(PERL)
$(srcdir)/Makefile.PL $(MAKE_PL_OPTS) $(DEB_MAKE_PL_OPT) PREFIX="${prefix}"
 	
 -perl install-perl: $(PERL_MAKEFILE) ${builddir}/ndbapi/ndbapi_wrap.cpp
${builddir}/mgmapi/mgmapi_wrap.cpp
 	@target=`echo $@ | sed -e 's/-perl//'`; \
@@ -40,7 +40,7 @@
 	$(RUN)$(MAKE) -f $(PERL_MAKEFILE) test
 
 clean-perl realclean-perl:
-	test ! ${srcdir}/Makefile.PL -ef ${builddir}/Makefile.PL && rm -f
${builddir}/Makefile.PL
+	test ${srcdir}/Makefile.PL -ef ${builddir}/Makefile.PL || rm -f ${builddir}/Makefile.PL
 	@target=`echo $@ | sed -e 's/-perl//'`; \
 	if test -r $(PERL_MAKEFILE); then \
 	  echo $(MAKE) -f $(PERL_MAKEFILE) $$target; \
@@ -59,4 +59,3 @@
 
 # See this is the fake bit
 install-fakeDATA: install-perl
-

=== modified file 'php/Makefile.am'
--- a/php/Makefile.am	2007-11-26 02:05:33 +0000
+++ b/php/Makefile.am	2008-01-23 20:28:19 +0000
@@ -4,7 +4,7 @@
 NDBAPI_SWIG_SRC = ndbapi.i $(SWIG_NDB_SOURCES)
 MGMAPI_SWIG_SRC = mgmapi.i $(SWIG_MGM_SOURCES)
 
-libdir = $(PHP_EXTDIR)
+libdir = $(prefix)/$(PHP_ARCH_DIR)
 lib_LTLIBRARIES = libndbapi.la libmgmapi.la
 nodist_libndbapi_la_SOURCES = $(NDB_BUILT_SOURCES)
 libndbapi_la_CPPFLAGS = $(PHP_CPPFLAGS) $(MYSQL_INCLUDES)

=== modified file 'python/Makefile.am'
--- a/python/Makefile.am	2008-01-23 01:27:15 +0000
+++ b/python/Makefile.am	2008-01-23 20:28:19 +0000
@@ -1,27 +1,27 @@
 # -*- Mode: Makefile -*-
 builddir=${top_builddir}/python
-pythonarchdir=$(PYTHON_DIR)
-pythonarch_DATA=${builddir}/mysql/cluster/_ndbapi.so ${builddir}/mysql/cluster/_mgmapi.so
+pythonarchdir=$(PYTHON_PREFIX)/lib/python$(PYTHON_VERSION)/site-package 
+nobase_pythonarch_DATA=${builddir}/mysql/cluster/_ndbapi.so
${builddir}/mysql/cluster/_mgmapi.so ${srcdir}/mysql/__init__.py
${srcdir}/mysql/cluster/__init__.py ${srcdir}/mysql/cluster/NdbObject
${srcdir}/mysql/cluster/tests ${srcdir}/mysql/cluster/alchemy.py 
 
 CLEANFILES=ndbapi.cpp ndbapi.h mgmapi.cpp mysql/cluster/ndbapi.py mysql/cluster/mgmapi.py
mysql/cluster/events.py mysql/cluster/listeners.py *.so mysql/cluster/*pyc *pyc mgmapi.h
events.cpp listeners.cpp events.h listeners.h mysql/cluster/*.so ez_setup.pyc
${builddir}/mysql/__init__.pyc ndbapi.o mgmapi.o
-EXTRA_DIST = *py mgmapi.i ndbapi.i events.i listeners.i README mysql/cluster/alchemy.py
mysql/__init__.py mysql/cluster/__init__.py  mysql/cluster/NdbObject mysql/cluster/tests
+EXTRA_DIST = *py mgmapi.i ndbapi.i events.i listeners.i README mysql/__init__.py
mysql/cluster/__init__.py mysql/cluster/NdbObject mysql/cluster/tests
mysql/cluster/alchemy.py
 
 SWIG_OPTS=-O -I$(srcdir) -I$(top_srcdir) -I$(top_builddir) -I$(top_srcdir)/mgmpp
-I$(SWIG_DIR) @MYSQL_INCLUDES@ -outdir $(builddir)/mysql/cluster
 
-${SWIG_BIN}:
+ndbapi.cpp: ${SWIG_BIN} ${SWIG_NDB_SOURCES} ndbapi.i
+
+mgmapi.cpp: ${SWIG_BIN} ${SWIG_MGM_SOURCES} mgmapi.i
+
+events.cpp: ${SWIG_BIN} ${SWIG_MGM_SOURCES} events.i 
+
+listeners.cpp: ${SWIG_BIN} ${SWIG_MGM_SOURCES} listeners.i
+
+SUFFIXES = .cpp .i
+
+$(SWIG_BIN):
 	( cd $(top_builddir)/swig && $(MAKE) $(AM_MAKEFLAGS) )
 
-ndbapi.cpp: ${SWIG_NDB_SOURCES} ndbapi.i ${SWIG_BIN}
-
-mgmapi.cpp: ${SWIG_MGM_SOURCES} mgmapi.i ${SWIG_BIN}
-
-events.cpp: ${SWIG_MGM_SOURCES} events.i ${SWIG_BIN}
-
-listeners.cpp: ${SWIG_MGM_SOURCES} listeners.i ${SWIG_BIN}
-
-SUFFIXES = .cpp .i
-
-.i.cpp: $(SWIG_SOURCES) ${SWIG_BIN}
+.i.cpp:  $(SWIG_BIN) $(SWIG_SOURCES)
 	@test ! -d $(builddir)/mysql && cp -a $(srcdir)/mysql $(builddir) || true
 	@chmod -R u+w $(builddir)/mysql
 	$(SWIG) -c++ -python $(SWIG_OPTS) -o $@ $<
@@ -54,9 +54,11 @@
 	rm -rf ${builddir}/build
 	@test ${builddir}/mysql -ef ${srcdir}/mysql || rm -rf ${builddir}/mysql
 
-install-exec-local:
-	@mkdir -p ${pythondir}
+#install-exec-local:
+#	#@mkdir -p ${pythondir}
 
+install-data-local:
+	echo "DESTDIR = ${DESTDIR}"
 
 dist-hook:
 	@rm -f *pyc mysql/cluster/*pyc

=== modified file 'ruby/Makefile.am'
--- a/ruby/Makefile.am	2007-12-06 09:25:04 +0000
+++ b/ruby/Makefile.am	2008-01-23 20:28:19 +0000
@@ -1,6 +1,7 @@
 # -*- Mode: Makefile -*-
 
-rubyarchdir=$(RUBY_DIR)
+# TODO: this is a hack - please fix this
+rubyarchdir=$(prefix)/$(RUBY_ARCH_DIR)
 rubyarch_DATA=mysql/cluster/ndbapi.so mysql/cluster/mgmapi.so
 
 CLEANFILES=*.db test-out.rdf core* \
@@ -18,13 +19,13 @@
 mgmapi.cpp: $(SWIG_MGM_SOURCES) mgmapi.i 
 
 .i.cpp: $(SWIG_SOURCES)
-	$(SWIG) -c++ -ruby -autorename $(SWIG_OPTS) -o $@ $<
+	$(SWIG) -c++ -ruby -autorename -I$(top_srcdir) -I$(top_builddir) $(SWIG_OPTS) -o
$(builddir)/$@ $(srcdir)/$<
 
 .cpp.o: 
-	$(CXX) $(SWIG_OPTS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CXXFLAGS)
$(AM_CFLAGS) $(STANDARD_CFLAGS) -fPIC -DPIC -I$(rubyarchdir) -c $<  -o $@
+	$(CXX) $(SWIG_OPTS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CXXFLAGS)
$(AM_CFLAGS) $(STANDARD_CFLAGS) -fPIC -DPIC -I$(RUBY_DIR) -c $<  -o $@
 
-$(srcdir)/mysql/cluster/%.so: %.o
-	mkdir -p mysql/cluster
+$(builddir)/mysql/cluster/%.so: %.o
+	mkdir -p $(builddir)/mysql/cluster
 	echo $(CXX) $(AM_CFLAGS) $(CFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -shared $<
$(LIBRUBYARG_SHARED) -o $@ 
 	$(CXX) $(AM_CFLAGS) $(CFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -shared $<
$(LIBRUBYARG_SHARED) -o $@ 
 	if test `uname` = Darwin; then \

Thread
Rev 426: Made everything work with make distcheck _except_ for Perl uninstall. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/develMonty Taylor23 Jan