On Tue, Apr 20, 2010 at 11:06 PM, Peter Hutterer
<[email protected]> wrote:
>
> would also be good checking through Matthias' script from radeonhd for any
> obvious use-cases that this patch doesn't cover. It certainly seems more
> complex.

Another way to handle this would be distributing a script from the
macro. So, instead of substituting a huge make command, the macro
would install a script which you'd just have to distribute from the
Makefile. Then it would be a lot easier to have a complex script. Just
a scratch implementation:

AC_DEFUN([XORG_GIT_MODULE_VERSION],
[# use m4 so it only happens when you run autoconf
m4_syscmd([install -m755 /usr/share/xorg-macros/xorg-git-version.sh "$srcdir"])
AC_SUBST([xorg_git_version_sh], ['$(top_srcdir)/xorg-git-version.sh'])
])

module's configure.ac:
XORG_GIT_MODULE_VERSION

module's Makefile.am:
EXTRA_DIST = $(xorg_git_version_sh)
xorg-git-version.h:
    $(SHELL) $(xorg_git_version_sh) $@
DISTCLEANFILES = xorg-git-version.h
.PHONY: xorg-git-version.h

And then you could put any fanciness you want in the script. The only
minor worry I'd have is that the script wouldn't have all the make
variables available to it like $(top_srcdir) since automake
intentionally unexports the variables.

--
Dan
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to