[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: pcb.git: branch: master updated (e2c7ff74e676e13ceb605d38a8ed0a27c6966a52)



The branch, master has been updated
       via  e2c7ff74e676e13ceb605d38a8ed0a27c6966a52 (commit)
       via  c81b2d09b281a357910759a373bd8e8bdc4b3cd1 (commit)
      from  c51f3cf1993611e43ca799bf0cfdd2fd9ab1a17a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 configure.ac    |   50 ++++++++++++++++++++++++++++++++++++++++++++------
 lib/Makefile.am |    8 +++++---
 2 files changed, 49 insertions(+), 9 deletions(-)


=================
 Commit Messages
=================

commit c81b2d09b281a357910759a373bd8e8bdc4b3cd1
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Try to be smarter about figuring out when we need to regenerate
    pcblib-newlib.  In particular, if we are building from a tarball
    then look in the stamp file to make sure that whoever built the tarball
    used the correct options for building pcblib-newlib to match what has
    been requested here.  Should address issues noted on geda-user.

:100644 100644 49d7714... 115bf91... M	configure.ac
:100644 100644 a3155da... 95be997... M	lib/Makefile.am

=========
 Changes
=========

commit c81b2d09b281a357910759a373bd8e8bdc4b3cd1
Author: Dan McMahill <dan@xxxxxxxxxxxx>
Commit: Dan McMahill <dan@xxxxxxxxxxxx>

    Try to be smarter about figuring out when we need to regenerate
    pcblib-newlib.  In particular, if we are building from a tarball
    then look in the stamp file to make sure that whoever built the tarball
    used the correct options for building pcblib-newlib to match what has
    been requested here.  Should address issues noted on geda-user.

diff --git a/configure.ac b/configure.ac
index 49d7714..115bf91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,11 +17,13 @@ AM_CONFIG_HEADER([config.h])
 # it is not unreasonable to require development tools.  What motivated
 # this is that using maintainer mode proved to cause regular confusion.
 
+pcb_sources="tarball"
 AC_MSG_CHECKING([if you are building from a git checkout])
 pcb_git_version=no
 if test -f $srcdir/.gitignore ; then
 	pcb_git_version=yes
 	AC_MSG_RESULT([yes])
+	pcb_sources="GIT"
 else
 	AC_MSG_RESULT([no])
 fi
@@ -32,12 +34,14 @@ pcb_cvs_version=no
 if test -f $srcdir/CVS/Root ; then
 	pcb_cvs_version=yes
 	AC_MSG_RESULT([yes])
+	pcb_sources="CVS"
 else
 	AC_MSG_RESULT([no])
 fi
 AM_CONDITIONAL(CVS_VERSION, test x$pcb_cvs_version = xyes)
 AM_CONDITIONAL(GIT_OR_CVS_VERSION, test x$pcb_git_version = xyes -o x$pcb_cvs_version = xyes)
 
+
 ##########################################################################
 #
 # See if we are supposed to build the docs
@@ -839,6 +843,46 @@ AC_ARG_ENABLE(
 AC_MSG_RESULT([$enable_m4lib_png])
 AM_CONDITIONAL(PNG_PREVIEW, test x$enable_m4lib_png = xyes)
 
+
+# Run away.... more ugly stuff here.  By default we don't actually build
+# pcblib-newlib from pcblib unless we are building from cvs or git sources.
+# The reason is it takes a while and requires the png HID.  The problem is,
+# what if someone wants to use --enable-m4lib-png but the tarball was built
+# without the previews.  Or, what if someone does not want the PNG previews
+# but the person building the tarball included them.  Ugh!  So what the following
+# code attempts to do is detect that mismatch situation.  Note that we only
+# want to kick this code in when *not* building from git or cvs sources.
+build_pcblib_newlib=no
+if test "$pcb_sources" = "tarball" ; then
+	AC_MSG_CHECKING([If pcblib-newlib was built with png previews])
+	stamp=${top_srcdir}/lib/pcblib-newlib.stamp 
+	if test ! -f ${stamp} ; then
+		AC_MSG_RESULT([unknown, missing ${stamp}])
+		build_pcblib_newlib=yes
+	else
+		if test "`cat ${stamp}`" = "png-preview=yes" ; then
+			AC_MSG_RESULT([yes])
+			# lib exists and built with preview.
+			# if we don't want the preview, than rebuild
+			if test x$enable_m4lib_png != xyes ; then
+				build_pcblib_newlib=yes
+			fi
+		else
+			AC_MSG_RESULT([no])
+			# lib exists and built without preview.
+			# if we want the preview, than rebuild
+			if test x$enable_m4lib_png = xyes ; then
+				build_pcblib_newlib=yes
+			fi
+		fi
+	fi
+else
+	build_pcblib_newlib=yes
+fi
+AC_MSG_CHECKING([If pcblib-newlib needs to be rebuilt])
+AC_MSG_RESULT([$build_pcblib_newlib])
+AM_CONDITIONAL(BUILD_PCBLIB_NEWLIB, test x$build_pcblib_newlib = xyes)
+
 if test "X$cross_compiling" = "Xyes" ; then
 	# we are cross compiling so we will need a build host binary for pcb
 	AC_PATH_PROG(PCB, [pcb], [notfound])
@@ -1098,12 +1142,6 @@ with_exporters=`echo $with_exporters | sed 's/,/ /g'`
 expandedXDGDATADIR=`eval "echo $XDGDATADIR"`
 expandedKDEDATADIR=`eval "echo $KDEDATADIR"`
 
-if test "X$pcb_git_version" = "Xyes" ; then
-	pcb_sources="GIT"
-else
-	pcb_sources="tarball"
-fi
-
 AC_MSG_RESULT([
 ** Configuration summary for $PACKAGE $VERSION:
 
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a3155da..95be997 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -38,11 +38,13 @@ all-local: $(NEWLIB).stamp
 # the added benefit of doing a PCB syntax check on all of them
 if PNG_PREVIEW
 PREVIEW=	--png
+PREVIEW_MSG=	png-preview=yes
 else
 PREVIEW=	
+PREVIEW_MSG=	png-preview=no
 endif
 
-if GIT_OR_CVS_VERSION
+if BUILD_PCBLIB_NEWLIB
 NEWLIB_DEPS=	${LIBCONTENTS} ${srcdir}/m4lib_to_newlib.sh
 else
 NEWLIB_DEPS=
@@ -53,7 +55,7 @@ ${NEWLIB}.stamp : footprint.pcb ${NEWLIB_DEPS}
 	${SHELL} ${srcdir}/m4lib_to_newlib.sh --contents \
 		${LIBRARYFILENAME}.contents --output ${NEWLIB} \
 		${PREVIEW} --pcb "${PCB}" --awk "${AWK}"
-	touch $@
+	echo '${PREVIEW_MSG}' > $@
 
 
 install-data-local: ${NEWLIB}.stamp
@@ -69,7 +71,7 @@ uninstall-local:
 
 EXTRA_DIST=	${NEWLIB} footprint.pcb ${NEWLIB}.stamp png_diff.sh
 
-if GIT_OR_CVS_VERSION
+if BUILD_PCBLIB_NEWLIB
 DISTCLEANFILES=	${NEWLIB}.stamp
 else
 DISTCLEANFILES=




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs