Hello John,
On Saturday 17 September 2005 15:12, John Vandenberg wrote:
> This patch introduces a `compat' directory, prefixed to the PATH. The
> directory is to be filled with workarounds that are included when
> required.
>
> Three types of compatibility options are supported:
>
> symlinks: locations specifically chosen with --with-blah
> programs.in: alternative scripts to emulate missing binaries
> functions.sh: shell functions emulating missing binaries
>
> Included is one program (getopt) and two functions (mktemp and column)
Very nice, thanks a lot! I particularly like the configure.ac cleanup.
For the compatibility symlinks, you redefine the FOO variables in Makefile
(e.g., BASH). This confused me a little before I realized what was going on.
It's broken, too: you end up with relative paths in shebang lines (e.g., ``#!
bash'' for ``#! @BASH@''). Relative paths in shebang lines are invalid. We
should instead get rid of @FOO@ substitutions in the scripts where we can.
That's the cleanup we were heading for, anyway.
I think we can keep compat/ out of the path if the directory doesn't exist,
and only create this directory when needed).
Not sure whether we need compatfns and functions.sh; those can as well remain
as external programs IMHO. I would rather remove this again and convert the
two bash snippets in compat/ to standalone scripts.
> Three minor issues remain ..
> 1) $(BASH) in Makefile.in using --with-bash=... will be 'bash' rather
> than $withval. This should be solved by include compat/ in the
> Makefile PATH
This is also resolved by not redefining those variables. We should rather do
that.
> 2) older autoconf not support; a little m4 sugar can solve this.
I don't think we do care. People with an old autoconf can choose to either not
mess with configure.ac, or get a more recent autoconf. Depending on a recent
version of autoconf is common practice.
> 3) ln -s is not useful on MSYS, but I doubt anybody is clamouring for
> that at the moment :)
Yes, this is a separate issue ;-)
So I think we should include the following patch on top of yours, replace
instances @BASH@ and @INSTALL@ with $(BASH) and $(INSTALL) in Makefile, and
then go on and replace obsoleted @FOO@ instances from all the scripts.
Again, thank you very much for your work!
Cheers,
Andreas.
Index: quilt/Makefile.in
===================================================================
--- quilt.orig/Makefile.in
+++ quilt/Makefile.in
@@ -50,12 +50,6 @@ $(foreach symlink, $(COMPAT_SYMLINKS), $
install-compat-symlinks: $(COMPAT_SYMLINKS:%=install-compat-symlink-%)
-define COMPAT_SYMLINK_redefine
-$(shell echo $(1) | $(AWK) '{print toupper($$0)}') := $(1)
-endef
-
-$(foreach symlink, $(COMPAT_SYMLINKS), $(eval $(call COMPAT_SYMLINK_redefine, $(symlink))))
-
ifeq "$(MSGFMT)" ""
MAKE_NLS := @true
else
@@ -299,9 +293,9 @@ install-main: scripts
@INSTALL@ -m 644 quilt.quiltrc $(BUILD_ROOT)$(etcdir)/
install-compat:
+ @rm -rf $(BUILD_ROOT)$(COMPAT_DIR)
ifneq ($(COMPAT_PROGRAMS)$(COMPAT_FUNCTIONS)$(COMPAT_SYMLINKS),)
@INSTALL@ -d $(BUILD_ROOT)$(COMPAT_DIR)
- @rm -f $(BUILD_ROOT)$(COMPAT_DIR)/*
ifneq ($(COMPAT_PROGRAMS),)
@INSTALL@ -m 755 $(COMPAT_PROGRAMS:%=compat/%) $(BUILD_ROOT)$(COMPAT_DIR)
endif
Index: quilt/scripts/patchfns.in
===================================================================
--- quilt.orig/scripts/patchfns.in
+++ quilt/scripts/patchfns.in
@@ -24,12 +24,15 @@ DB_VERSION=2
: ${QUILT_PC:=.pc}
# Support compatibility layer
-if [ -r @QUILT@/compat/compatfns ]
+if [ -d @QUILT@/compat ]
then
- source @QUILT@/compat/compatfns
+ export PATH="@QUILT@/compat:$PATH"
+ if [ -r @QUILT@/compat/compatfns ]
+ then
+ source @QUILT@/compat/compatfns
+ fi
fi
-export PATH="@QUILT@/compat:$PATH"
unset CDPATH
shopt -s dotglob
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev