quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] Make problems with 0.43 and up


From: Jean Delvare
Subject: Re: [Quilt-dev] Make problems with 0.43 and up
Date: Sun, 19 Mar 2006 23:29:00 +0100

Hi Andreas,

> > This must explain why the pseudo-symlinks cannot be created with make
> > 3.79.1. Andreas, do you have any idea how we can replace this
> > construct? I don't.
> 
> It can probably be done relatively easily by recursively calling make. Just 
> now I simply don't have the time for looking into this, though.

I had some time to work on this and came up with the following fix.
Then compat pseudo-symlinks seem to build OK with both GNU make 3.79.1
and 3.80. Are we supposed to support earlier versions too, or non-GNU
incarnations?

Index: Makefile.in
===================================================================
RCS file: /cvsroot/quilt/quilt/Makefile.in,v
retrieving revision 1.125
diff -u -r1.125 Makefile.in
--- Makefile.in 12 Mar 2006 13:53:16 -0000      1.125
+++ Makefile.in 19 Mar 2006 22:24:41 -0000
@@ -283,20 +283,15 @@
 #   Usage: $(call VIRTUAL_SYMLINK, source, target)
 define VIRTUAL_SYMLINK
        @echo "Generating $(strip $(1)) wrapper" >&2;
-       @printf "#!%s\nexec %s "'"$$$$@"'"\n" $(BASH) $(strip $(1)) > $(2);
+       @printf "#!%s\nexec %s "'"$$@"'"\n" $(BASH) $(strip $(1)) > $(2);
 endef
 
-# Generate rules to create compat/<binary> for each binary in 
$(COMPAT_SYMLINKS)
-define COMPAT_SYMLINK_local_install
-compat/$(strip $(1)) : Makefile
+# Rule to create compat/<binary> for each binary in $(COMPAT_SYMLINKS)
+$(COMPAT_SYMLINKS:%=compat/%) :: Makefile
        $(call VIRTUAL_SYMLINK, \
-               $($(shell echo $(1) | $(AWK) '{print toupper($$1)}')), \
-               compat/$(strip $(1)))
-       @chmod +x compat/$(strip $(1));
-
-endef
-
-$(eval $(foreach symlink,$(COMPAT_SYMLINKS),$(call 
COMPAT_SYMLINK_local_install, $(symlink))))
+               $($(shell echo $@ | $(AWK) '{split($$1, ar, "/"); print 
toupper(ar[2])}')), \
+               $(strip $@))
+       @chmod +x $(strip $@)
 
 install-main :: scripts
        $(INSTALL) -d $(BUILD_ROOT)$(bindir)
@@ -336,7 +331,9 @@
        $(INSTALL) -m 644 quilt.quiltrc $(BUILD_ROOT)$(etcdir)/
 
 install-compat: install-compat1 $(COMPAT_SYMLINKS:%=install-compat-symlink-%)
-$(COMPAT_SYMLINKS:%=install-compat-symlink-%) :: install-compat1
+install-compat-symlink-% :: install-compat1
+       ln -sf $($(shell echo $* | $(AWK) '{print toupper($$1)}'))      \
+              $(BUILD_ROOT)$(datadir)/$(PACKAGE)/compat/$*
 
 install-compat1:
        rm -rf $(BUILD_ROOT)$(datadir)/$(PACKAGE)/compat
@@ -348,15 +345,6 @@
 endif
 endif
 
-# Generate rules to install symlinks for each binary in $(COMPAT_SYMLINKS)
-define COMPAT_SYMLINK_install
-install-compat-symlink-$(strip $(1)) ::
-       ln -sf $($(shell echo $(1) | $(AWK) '{print toupper($$1)}'))    \
-              $(BUILD_ROOT)$(datadir)/$(PACKAGE)/compat/$(strip $(1))
-endef
-
-$(foreach symlink,$(COMPAT_SYMLINKS),$(eval $(call COMPAT_SYMLINK_install, 
$(symlink))))
-
 install: install-main install-compat
 
 uninstall ::

Dustin, Josh, please test and report. People using exotic setups are
also welcome to report if this change breaks the build for them.

-- 
Jean Delvare




reply via email to

[Prev in Thread] Current Thread [Next in Thread]