Commit 54099349 authored by Vincent Bernat's avatar Vincent Bernat

Imported Upstream version 3.06

parent 46284143
2010-05-27 Henrik Sandklef <hesa@sandklef.com>
* libxnee/src/xnee_record.c:
Removed debug/printf printout when closing context
* libxnee/src/xnee_session.c:
Re-enabling closing of displays
* cnee/src/main.c (main):
Removing set_verbose in main (huah!!)
* libxnee/src/xnee_keysym.c (xnee_token_to_km):
Checking if keycode/modifier is valid before using it
2010-05-26 Henrik Sandklef <hesa@sandklef.com>
* configure.in:
Bumping version to 3.06
* libxnee/src/xnee_resource.c:
Replace "forced-reparent-recording" with
"no-reparent-recording"
* libxnee/src/xnee_record.c (xnee_record_handle_event_printer):
Don't print reparent event if no-reparent
* libxnee/src/print.c (xnee_print_xnee_settings):
If no-reparent-recording used, print option to file
* libxnee/src/xnee_session.c (xnee_init):
no-reparent turned OFF default
* libxnee/src/xnee_setget.c (xnee_set_no_reparent_recording):
set, get and is functions for no-reparent functionality
* libxnee/include/libxnee/xnee_resource.h (enum XNEE_OPTION_KEYS):
Replace XNEE_FORCED_REPARENT_RECORD with
XNEE_NO_REPARENT_RECORD
* libxnee/include/libxnee/xnee.h (struct):
forced_reparent_recording turned into no_reparent_recording
2010-05-12 Henrik Sandklef <hesa@sandklef.com>
* libxnee/src/xnee_fileop.c (xnee_free_file):
Checking if file is null before printing (only debug print)
* libxnee/src/xnee_utils.c (xnee_record_from_data_display):
Adding code to prepare for new XLIB fixes
* libxnee/src/xnee_record.c:
* libxnee/src/xnee_replay.c:
Using functions in xnee_utils to find which display
to use for sending control data
Removed unused code
* libxnee/src/xnee_session.c (xnee_close_down):
Added some debug printouts
Removed clsoing of data display (don't know what's wrong :( )
* libxnee/include/libxnee/xnee_utils.h:
* libxnee/src/xnee_utils.c:
Added functions:
xnee_record_from_data_display(xnee_data *xd);
xnee_get_display_for_recordcontext(xnee_data *xd);
to handle workaround for Xorg server in 2009-2010
2010-05-11 Henrik Sandklef <hesa@sandklef.com>
* libxnee/src/xnee_record.c (xnee_record_handle_event_printer):
Removed debug printout
Check if string is NULL before strcmp
* cnee/src/main.c:
Removed sleep workaround
* libxnee/src/xnee_record.c:
Removed debug printouts
* libxnee/src/print.c:
Added printing of forced reparent mode when
writing to sessions file
* libxnee/src/xnee_error.c:
Fixed typo (filure => failure)
* libxnee/src/xnee_record.c:
Only recording all ReparentNotify when forced reparent
mode
* libxnee/src/xnee_resource.c:
Added parser functions for new forced reparent
functionality
* libxnee/include/libxnee/xnee.h:
Added variable for new forced reparent
functionality
* libxnee/src/xnee_session.c:
Set forced reparent flag to 0 during init.
* libxnee/src/xnee_setget.c:
Added helper functions (is, set, get) for new forced reparent
functionality
* libxnee/include/libxnee/xnee_resource.h:
Added new enum (XNEE_FORCE_REPARENT_RECORD)
2010-02-06 Henrik Sandklef <hesa@sandklef.com>
* libxnee/test/callback.c (main):
Casting xd to XPointer to silent warning
2010-01-24 Henrik Sandklef <hesa@bach.sandklef.com>
* pixmap/512x512/xnee-new.png
New file (logo) from Luis Santander
2010-01-21 Henrik Sandklef <hesa@schnittke.sandklef.com>
* libxnee/src/xnee_resource.c:
* libxnee/src/xnee_record.c:
Updated (c) year
* libxnee/src/xnee_resource.c (xnee_key2string):
Not crashing due to options[-1] indexing
2010-01-02 Henrik Sandklef <hesa@schnittke.sandklef.com>
* libxnee/src/xnee_record.c (xnee_record_from_data_display):
Checking if x_vendor_name is NULL before use
2009-12-31 Henrik Sandklef <hesa@sandklef.com>
* Makefile.am (EXTRA_DIST):
Adding build/autobuild.sh to dist file
* configure.in:
Added AB_INIT
Preparing for 3.06
* build/autobuild.sh:
New file: Autobuild wrapper
2009-12-30 Henrik Sandklef <hesa@sandklef.com>
* libxnee/test/test-wrapper.sh:
exit instead of return
* libxnee/test/Makefile.am (TEST_WRAPPER):
Adding "./" to test-wrapper.sh since we don't want to add . to PATH
2009-12-29 Henrik Sandklef <hesa@sandklef.com>
* Makefile.am (check):
Cleaner calls to test targets in libxnee and cnee
target check will (soon) not rely on X
target xcheck will need X
* libxnee/test/Makefile.am:
Put test-wrapper in a var
Made separate test when requesting to test with X
* libxnee/test/test_setget.h:
Casts to int before print
* libxnee/test/Makefile.am:
Calling test programs through test-wrapper.sh
* cnee/test/test_all.sh:
No args is handled better
* cnee/test/etc/base_funs:
Added handling of no X up
Function decl./def now in bourne shell syntax
* cnee/test/scripts/options/print-error-name.sh:
* cnee/test/scripts/options/print-error-names.sh:
Redirect misleading (from negative tests) error messages
* cnee/test/scripts/options/print-event-name-human.sh:
Removed test of non existing event
2009-12-26 Henrik Sandklef <hesa@sandklef.com>
* configure.in:
gtk/gnomeui cflags/ldflags fixes
* configure.in:
More fixes to get get rid of pkg-config deps, when not needing it
2009-12-22 Henrik Sandklef <hesa@sandklef.com>
* Makefile.cvs (generate):
......
......@@ -2,7 +2,8 @@ SUBDIRS = ${LIB_DIR} ${CLI_DIR} ${GUI_DIR} ${GNOME_APPLET_DIR} ${DOC_DIR} share
AUTOMAKE_OPTIONS = gnu
EXTRA_DIST = Makefile.xnee Makefile.cvs autotools/* projects/test.xnp sessions/example1.xns README README.debian BUGS FAQ EXAMPLES doc/Makefile.am doc/Makefile.in ChangeLog
EXTRA_DIST = Makefile.xnee Makefile.cvs autotools/* projects/test.xnp sessions/example1.xns README README.debian README.cvs BUGS FAQ EXAMPLES doc/Makefile.am doc/Makefile.in ChangeLog build/autobuild.sh
......@@ -48,18 +49,19 @@ test:
check: all
cd libxnee/test && ./libtest
cd libxnee/test && ./testsetget
cd libxnee/test && ./testfeedback
cd libxnee/test && ./testprint
cd libxnee/test && ./testdisplay
cd cnee/test && ./test_all.sh --clean
cd cnee/test && ./test_all.sh --build
cd cnee/test && ./test_all.sh --option
cd libxnee/test && make test
cd cnee/test && ./test_all.sh
xcheck: all
cd libxnee/test && make xtest
cd cnee/test && ./test_all.sh
$(srcdir)/package.m4 : $(topdir)/configure.in
:;{\
echo '# ' && \
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])' ; \
} > '$$(srcdir)/package.m4'
autobuild:
cd build && autobuild.sh
\ No newline at end of file
# Makefile.in generated by automake 1.11 from Makefile.am.
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
......@@ -36,12 +36,12 @@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure ./autotools//compile \
./autotools//config.guess ./autotools//config.sub \
./autotools//depcomp ./autotools//install-sh \
./autotools//ltmain.sh ./autotools//mdate-sh \
./autotools//missing ./autotools//texinfo.tex AUTHORS COPYING \
ChangeLog INSTALL NEWS TODO
$(top_srcdir)/configure ./autotools//config.guess \
./autotools//config.sub ./autotools//depcomp \
./autotools//install-sh ./autotools//ltmain.sh \
./autotools//mdate-sh ./autotools//missing \
./autotools//texinfo.tex AUTHORS COPYING ChangeLog INSTALL \
NEWS TODO
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
......@@ -182,7 +182,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
PDF2PS = @PDF2PS@
PIXMAP_DIR = @PIXMAP_DIR@
PKGCFG = @PKGCFG@
PKG_CONFIG = @PKG_CONFIG@
PS2PDF = @PS2PDF@
RANLIB = @RANLIB@
SED = @SED@
......@@ -258,7 +257,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = ${LIB_DIR} ${CLI_DIR} ${GUI_DIR} ${GNOME_APPLET_DIR} ${DOC_DIR} share examples sessions ${PIXMAP_DIR} man
AUTOMAKE_OPTIONS = gnu
EXTRA_DIST = Makefile.xnee Makefile.cvs autotools/* projects/test.xnp sessions/example1.xns README README.debian BUGS FAQ EXAMPLES doc/Makefile.am doc/Makefile.in ChangeLog
EXTRA_DIST = Makefile.xnee Makefile.cvs autotools/* projects/test.xnp sessions/example1.xns README README.debian README.cvs BUGS FAQ EXAMPLES doc/Makefile.am doc/Makefile.in ChangeLog build/autobuild.sh
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
......@@ -331,7 +330,7 @@ distclean-libtool:
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
......@@ -356,7 +355,7 @@ $(RECURSIVE_TARGETS):
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
......@@ -520,7 +519,8 @@ distdir: $(DISTFILES)
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
......@@ -564,17 +564,17 @@ dist dist-all: distdir
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
......@@ -793,14 +793,12 @@ test:
cd libxnee/test && make clean all test
check: all
cd libxnee/test && ./libtest
cd libxnee/test && ./testsetget
cd libxnee/test && ./testfeedback
cd libxnee/test && ./testprint
cd libxnee/test && ./testdisplay
cd cnee/test && ./test_all.sh --clean
cd cnee/test && ./test_all.sh --build
cd cnee/test && ./test_all.sh --option
cd libxnee/test && make test
cd cnee/test && ./test_all.sh
xcheck: all
cd libxnee/test && make xtest
cd cnee/test && ./test_all.sh
$(srcdir)/package.m4 : $(topdir)/configure.in
:;{\
......@@ -808,6 +806,9 @@ $(srcdir)/package.m4 : $(topdir)/configure.in
echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])' ; \
} > '$$(srcdir)/package.m4'
autobuild:
cd build && autobuild.sh
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
Changes in coming version 3.04 (futsanaj)
Changes in coming version 3.06 ('Dio')
==============================
* New logo:
pixmap/512x512/xnee-new.png
* Build changes:
configure bails out when building any gui
and no pkg-config installed
* Test changes:
Separated tests:
* make check - does not need an X server to connect to
* make xcheck - needs an X server to connect to
* Fixed bugs as reported on bug-xnee@gnu.org:
"crash in xnee_key2string when verbose"
"cnee causing segfault"
* New options:
--no-reparent-recording
* Options that didn't make it:
--force-reparent-recording
Changes in version 3.05 ('Merry X11-mas')
==============================
* Bugs report on bug-xnee@gnu.org:
"Bug report: libpanelapplet-2.0" (12/15/2009 11:07 AM)
"Bug report: No package 'libgnomeui-2.0' found" (12/15/2009 11:03 AM)
"Configure Error" (12/15/2009 11:07 AM)
"Error in configure." (12/15/2009 11:09 AM)
"Building from CVS" (12/17/2009 07:19 PM)
* Build changes:
configure bails out when building any gui
and no pkg-config installed
Better help during configure if no gtk, gnomeui found
Telling user to run configure with --enable-doc option set,
when building from CVS (make -f Makefile.cvs)
New file (README.cvs) to ease up for users building from CVS
Changes in version 3.04 (futsanaj)
==============================
* Bugs fixed:
......
Instructions on how to build from CVS can be found in the README file
\ No newline at end of file
# generated automatically by aclocal 1.11 -*- Autoconf -*-
# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
......@@ -7985,164 +7985,6 @@ m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
#
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
# this or PKG_CHECK_MODULES is called, or make sure to call
# PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_ifval([$2], [$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$PKG_CONFIG"; then
if test -n "$$1"; then
pkg_cv_[]$1="$$1"
else
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
fi
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT
])],
[AC_MSG_RESULT([no])
$4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
......@@ -8158,7 +8000,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11], [],
m4_if([$1], [1.11.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -8174,7 +8016,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11])dnl
[AM_AUTOMAKE_VERSION([1.11.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
......
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2005-05-14.22
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
scriptversion=2005-06-29.22
scriptversion=2009-04-28.21; # UTC