Permalink
Browse files

added new reversioning script for build process

  • Loading branch information...
1 parent 95ab34b commit 977c87136966274f800435c30844502b70ece653 @pchilds committed Aug 20, 2012
Showing with 110 additions and 39 deletions.
  1. +4 −2 INSTALL
  2. +2 −5 Makefile.am
  3. +4 −3 README
  4. +12 −26 configure.ac
  5. +3 −3 gtk2plot/Makefile.am
  6. +85 −0 reversion.sh
View
@@ -24,8 +24,10 @@ the optional part of step 1 below).
The simplest way to compile this package is:
- 1. `cd' to the directory of the package (it should contain this file
- and (optionally) type `autoreconf --install' to create the
+ 1. `cd' to the directory of the package (it should contain this
+ file), (optionally) type `./reversion 2 0 0 0 0' (or whatever
+ version numbers are needed) to regenerate the build files and
+ (also optionally) type `autoreconf --install' to create the
appropriate scripts and convert the configure and Makefile to
something appropriate for your system.
View
@@ -1,11 +1,8 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS=${PLOT_SDIR}
+SUBDIRS=gtk2plot
ACLOCAL_AMFLAGS=-I m4 ${ACLOCAL_FLAGS}
MAINTAINERCLEANFILES=Makefile.in configure
DISTCLEANFILES= =
pkgconfigdir=$(libdir)/pkgconfig
-pkgconfig_DATA=gtkplot-${PLOT_API_VERSION}.pc
-
-
-
+pkgconfig_DATA=gtkplot-2.0.pc
View
7 README
@@ -1,6 +1,6 @@
The GtkPlot Widget Family
----------------------
-Version 0.1.0, January 2011
+Version 0.0.0, January 2011
GtkPlotLinear provides a widget for automated plotting of data on a linear-linear scale.
GtkPlotLogLinear, PlotLinearLog will provide similar functionality for plotting on a semilog scale.
@@ -11,8 +11,8 @@ The program is coded preferentially to an in-line structure to maximise performa
Motivation; Technology; License
-------------------------------
-GtkPlot builds upon GtkDrawingArea. It compiles & works under gtk+2. As drawing is performed using cairo graphics, upgrading to be compatible with gtk+3 in the near future should be trivial.
-This code is released under the GNU LGPL version 2 or (at your option) any later versions, making it suitable for pretty much anything.
+GtkPlot builds upon GtkDrawingArea. It compiles & works under gtk+2. upgrading to gtk+3 is currently under work.
+This code is released under the GNU LGPL version 2 (for the gtk+2 version; the LGPL version 3 for the gtk+3 version) or (at your option) any later versions, making it suitable for pretty much anything.
Usage
-----
@@ -43,6 +43,7 @@ Data can be sent to the plot using GArray structures as:
(plot->sizes)=sizes;
(plot->ind)=indices;
(for polar plotting these xdata and ydata arrays are replaced by rdata and thdata with similar x,y -> r,th replacements throughout)
+A new interface for doing this without memory leaks is under development.
Redrawing the axes can be done by:
gdouble xmin, xmax, ymin, ymax;
gtk_plot_linear_update_scale(plotname, xmin, xmax, ymin, ymax);
View
@@ -1,40 +1,26 @@
AC_PREREQ([2.65])
-m4_define(gtkplot_configure_ac)
-m4_define([gtk_major_dependency], [2])
-m4_define([gtk_minor_dependency], [14])
-m4_define([gtk_api_revision], [0])
-m4_define([gtkplot_lt_current], [0])
-m4_define([gtkplot_lt_age], [0])
-m4_define([gtkplot_lt_revision], [0])
-m4_define([gtk_req], [gtk+-gtk_major_dependency.gtk_api_revision >= gtk_major_dependency.gtk_minor_dependency])
-m4_append([Sdir], [Gtk])
-m4_append([sdir], [gtk])
-m4_append([Sdir], m4_unquote([gtk_major_dependency]))
-m4_append([sdir], m4_unquote([gtk_major_dependency]))
-m4_append([Sdir], [Plot])
-m4_append([sdir], [plot])
-AC_INIT([Sdir],[gtk_major_dependency.gtkplot_lt_current.gtkplot_lt_revision],[pchilds@physics.org],[sdir],[https://github.com/pchilds/GtkPlot])
+AC_INIT([Gtk2Plot],[2.0.0],[pchilds@physics.org],[gtk2plot],[https://github.com/pchilds/GtkPlot])
AC_CONFIG_HEADERS([config.h gtkplotconfig.h])
-AC_CONFIG_SRCDIR([sdir/gtkplotlinear.h])
+AC_CONFIG_SRCDIR([gtk2plot/gtkplotlinear.h])
AC_CONFIG_AUX_DIR([confsupp])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC([gcc cc])
LT_PREREQ([2.2])
LT_INIT([win32-dll])
-AC_SUBST([LT_CURRENT], [gtkplot_lt_current])
-AC_SUBST([LT_REVISION], [gtkplot_lt_revision])
-AC_SUBST([LT_AGE], [gtkplot_lt_age])
-AC_SUBST([PLOT_API_VERSION], [gtk_major_dependency.gtk_api_revision])
-AC_SUBST([PLOT_GTK_MAJOR], [gtk_major_dependency])
-AC_SUBST([PLOT_GTK_VERSION], [gtk_req])
-AC_SUBST([PLOT_SDIR], [sdir])
-lt_enable_auto_import=""
+AC_SUBST([LT_CURRENT], [0])
+AC_SUBST([LT_REVISION], [0])
+AC_SUBST([LT_AGE], [0])
+AC_SUBST([PLOT_API_VERSION], [2.0])
+AC_SUBST([PLOT_GTK_MAJOR], [2])
+AC_SUBST([PLOT_GTK_VERSION], [gtk+-2.0 >= 2.14])
+AC_SUBST([PLOT_SDIR], [gtk2plot])
+lt_enable_auto_import=
case "$host_os" in
mingw*)
lt_enable_auto_import="-Wl,--enable-auto-import"
esac
AC_SUBST([lt_enable_auto_import])
-PKG_CHECK_MODULES([PLOT], [gtk_req])
-AC_CONFIG_FILES([Makefile ${PLOT_SDIR}/Makefile gtkplot-${PLOT_API_VERSION}.pc:gtkplot.pc.in COPYING:COPYING-${PLOT_API_VERSION}.in])
+PKG_CHECK_MODULES([PLOT], [gtk+-2.0 >= 2.14])
+AC_CONFIG_FILES([Makefile gtk2plot/Makefile gtkplot-2.0.pc:gtkplot.pc.in COPYING:COPYING-2.0.in])
AC_OUTPUT()
View
@@ -1,7 +1,7 @@
AM_CFLAGS=$(PLOT_CFLAGS)
MAINTAINERCLEANFILES=Makefile.in
-gtkplot_libincludedir=$(libdir)/gtkplot-$(PLOT_API_VERSION)/include
+gtkplot_libincludedir=$(libdir)/gtkplot-2.0/include
nodist_gtkplot_libinclude_HEADERS=../gtkplotconfig.h
lib_LTLIBRARIES=libgtkplot-@PLOT_API_VERSION@.la
@@ -11,9 +11,9 @@ libgtkplot_@PLOT_API_VERSION@_la_SOURCES= \
libgtkplot_@PLOT_API_VERSION@_la_LDFLAGS= \
@lt_enable_auto_import@ \
-no-undefined \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -version-info 0:0:0 \
$(PLOT_LIBS)
-gtkplotincludedir=$(includedir)/gtkplot-$(PLOT_API_VERSION)
+gtkplotincludedir=$(includedir)/gtkplot-2.0
gtkplotinclude_HEADERS= \
gtkplotlinear.h \
gtkplotpolar.h
View
@@ -0,0 +1,85 @@
+#!/bin/bash
+if [ $# -ne 5 ]
+then
+ echo "usage - $0 v w x y z"
+ echo " Where v.w is the GTK API version (e.g. 2.0),"
+ echo " and x,y,z is the library current, age, and revision versions"
+ exit 1
+fi
+if [ $1 -eq 3 ]
+then
+ gmx=3
+ gmn=0
+else
+ gmx=2
+ gmn=14
+fi
+gar=$2
+lcr=$3
+lag=$4
+lrv=$5
+{
+echo "AC_PREREQ([2.65])"
+echo "AC_INIT([Gtk${gmx}Plot],[${gmx}.${lcr}.${lrv}],[pchilds@physics.org],[gtk${gmx}plot],[https://github.com/pchilds/GtkPlot])"
+echo "AC_CONFIG_HEADERS([config.h gtkplotconfig.h])"
+echo "AC_CONFIG_SRCDIR([gtk${gmx}plot/gtkplotlinear.h])"
+echo "AC_CONFIG_AUX_DIR([confsupp])"
+echo "AC_CONFIG_MACRO_DIR([m4])"
+echo "AM_INIT_AUTOMAKE([-Wall -Werror foreign])"
+echo "AC_PROG_CC([gcc cc])"
+echo "LT_PREREQ([2.2])"
+echo "LT_INIT([win32-dll])"
+echo "AC_SUBST([LT_CURRENT], [${lcr}])"
+echo "AC_SUBST([LT_REVISION], [${lrv}])"
+echo "AC_SUBST([LT_AGE], [${lag}])"
+echo "AC_SUBST([PLOT_API_VERSION], [${gmx}.${gar}])"
+echo "AC_SUBST([PLOT_GTK_MAJOR], [${gmx}])"
+echo "AC_SUBST([PLOT_GTK_VERSION], [gtk+-${gmx}.${gar} >= ${gmx}.${gmn}])"
+echo "AC_SUBST([PLOT_SDIR], [gtk${gmx}plot])"
+echo "lt_enable_auto_import="""
+echo "case \"\$host_os\" in"
+echo " mingw*)"
+echo " lt_enable_auto_import=\"-Wl,--enable-auto-import\""
+echo "esac"
+echo "AC_SUBST([lt_enable_auto_import])"
+echo "PKG_CHECK_MODULES([PLOT], [gtk+-${gmx}.${gar} >= ${gmx}.${gmn}])"
+echo "AC_CONFIG_FILES([Makefile gtk${gmx}plot/Makefile gtkplot-${gmx}.${gar}.pc:gtkplot.pc.in COPYING:COPYING-${gmx}.${gar}.in])"
+echo "AC_OUTPUT()"
+} >configure.ac
+{
+echo "## Process this file with automake to produce Makefile.in"
+echo "SUBDIRS=gtk${gmx}plot"
+echo "ACLOCAL_AMFLAGS=-I m4 \${ACLOCAL_FLAGS}"
+echo "MAINTAINERCLEANFILES=Makefile.in configure"
+echo "DISTCLEANFILES= ="
+echo ""
+echo "pkgconfigdir=\$(libdir)/pkgconfig"
+echo "pkgconfig_DATA=gtkplot-${gmx}.${gar}.pc"
+} >Makefile.am
+{
+echo "AM_CFLAGS=\$(PLOT_CFLAGS)"
+echo "MAINTAINERCLEANFILES=Makefile.in"
+echo ""
+echo "gtkplot_libincludedir=\$(libdir)/gtkplot-${gmx}.${gar}/include"
+echo "nodist_gtkplot_libinclude_HEADERS=../gtkplotconfig.h"
+echo ""
+echo "lib_LTLIBRARIES=libgtkplot-@PLOT_API_VERSION@.la"
+echo "libgtkplot_@PLOT_API_VERSION@_la_SOURCES= \\"
+echo " gtkplotlinear.c \\"
+echo " gtkplotpolar.c"
+echo "libgtkplot_@PLOT_API_VERSION@_la_LDFLAGS= \\"
+echo " @lt_enable_auto_import@ \\"
+echo " -no-undefined \\"
+echo " -version-info ${lcr}:${lrv}:${lag} \\"
+echo " \$(PLOT_LIBS)"
+echo "gtkplotincludedir=\$(includedir)/gtkplot-${gmx}.${gar}"
+echo "gtkplotinclude_HEADERS= \\"
+echo " gtkplotlinear.h \\"
+echo " gtkplotpolar.h"
+echo ""
+echo "bin_PROGRAMS=TestPlotLinear TestPlotPolar"
+echo "TestPlotLinear_SOURCES=testplotlinear.c"
+echo "TestPlotLinear_LDADD=\$(PLOT_LIBS) libgtkplot-@PLOT_API_VERSION@.la"
+echo "TestPlotPolar_SOURCES=testplotpolar.c"
+echo "TestPlotPolar_LDADD=\$(PLOT_LIBS) libgtkplot-@PLOT_API_VERSION@.la"
+} >gtk${gmx}plot/Makefile.am

0 comments on commit 977c871

Please sign in to comment.