Re: [PATCH] use "share/chicken" also on compilation target

2021-08-10 Thread Peter Bex
On Fri, Aug 06, 2021 at 10:22:42PM +0200, felix.winkelm...@bevuta.com wrote:
> This patch changes TARGET_SHARE_HOME to also include the "chicken" suffix,
> so it should be identical to INSTALL_SHARE_HOME in normal situations (when
> not cross-compiling). This also addresses the installation location of "mac.r"
> (only on macs, which should use IDATADIR and not ISHAREDIR).

Thanks, pushed!

Cheers,
Peter


signature.asc
Description: PGP signature


Re: [PATCH] use "share/chicken" also on compilation target

2021-08-07 Thread felix . winkelmann
> > This patch changes TARGET_SHARE_HOME to also include the "chicken" suffix,
> > so it should be identical to INSTALL_SHARE_HOME in normal situations (when
> > not cross-compiling). This also addresses the installation location of 
> > "mac.r"
> > (only on macs, which should use IDATADIR and not ISHAREDIR).
>
> defaults.make has this line:
>
> DATADIR ?= $(SHAREDIR)/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)
>
> so this line in the patch:
>
> $(call echo, >>, $@,# define C_TARGET_SHARE_HOME
> "$(TARGET_PREFIX)/share/chicken")
>
> should probably be:
>
> $(call echo, >>, $@,# define C_TARGET_SHARE_HOME
> "$(TARGET_PREFIX)/share/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)")

No, this is intentional. The prefix/suffix is for distinguishing the built 
chicken on the host
(in case you have multiple cross-chickens for multiple targets).


felix




Re: [PATCH] use "share/chicken" also on compilation target

2021-08-06 Thread Lassi Kortela

This patch changes TARGET_SHARE_HOME to also include the "chicken" suffix,
so it should be identical to INSTALL_SHARE_HOME in normal situations (when
not cross-compiling). This also addresses the installation location of "mac.r"
(only on macs, which should use IDATADIR and not ISHAREDIR).


defaults.make has this line:

DATADIR ?= $(SHAREDIR)/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)

so this line in the patch:

$(call echo, >>, $@,# define C_TARGET_SHARE_HOME 
"$(TARGET_PREFIX)/share/chicken")


should probably be:

$(call echo, >>, $@,# define C_TARGET_SHARE_HOME 
"$(TARGET_PREFIX)/share/$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)")


Otherwise the patch looks good to me. Thanks for fixing this.



[PATCH] use "share/chicken" also on compilation target

2021-08-06 Thread felix . winkelmann
This patch changes TARGET_SHARE_HOME to also include the "chicken" suffix,
so it should be identical to INSTALL_SHARE_HOME in normal situations (when
not cross-compiling). This also addresses the installation location of "mac.r"
(only on macs, which should use IDATADIR and not ISHAREDIR).


felix

From a493ebbf90341f311a46b226b2d81cf0903875a2 Mon Sep 17 00:00:00 2001
From: felix 
Date: Fri, 6 Aug 2021 21:15:54 +0200
Subject: [PATCH] TARGET_SHARE_HOME should include "chicken".

TARGET_SHARE_HOME differs from INSTALL_SHARE_HOME by not having PROGRAM_PREFIX 
and PROGRAM_SUFFIX applied
(this is only necessary to distinguish multiple cross-chickens on the host), but
The chicken-specific destination directory should still be included on the 
target.
This patch also ensures "mac.r" is installed in the chicken-specific 
subdirectory of
PREFIX/share, which was previously incorrect, as reported by Lassi Kortela.
---
 README| 2 +-
 defaults.make | 2 +-
 rules.make| 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README b/README
index fe355887..61121977 100644
--- a/README
+++ b/README
@@ -349,10 +349,10 @@ _/_/_/_/_/_/  _/_/
_/_/_/
|   |   |-- chicken.png
|   |   `-- *.html
|   |-- CHICKEN.icns  (Macintosh)
+   |   |-- mac.r (Macintosh)
|   |-- chicken.rc.o  (Windows)
|   |-- feathers.tcl
|   `-- setup.defaults
-   |-- mac.r (Macintosh)
`-- man
`-- man1
|-- chicken-install.1
diff --git a/defaults.make b/defaults.make
index 36461445..ef3edee6 100644
--- a/defaults.make
+++ b/defaults.make
@@ -458,7 +458,7 @@ else
 endif
$(call echo, >>, $@,#endif)
$(call echo, >>, $@,#ifndef C_TARGET_SHARE_HOME)
-   $(call echo, >>, $@,# define C_TARGET_SHARE_HOME 
"$(TARGET_PREFIX)/share")
+   $(call echo, >>, $@,# define C_TARGET_SHARE_HOME 
"$(TARGET_PREFIX)/share/chicken")
$(call echo, >>, $@,#endif)
$(call echo, >>, $@,#ifndef C_TARGET_INCLUDE_HOME)
$(call echo, >>, $@,# define C_TARGET_INCLUDE_HOME 
"$(TARGET_PREFIX)/include/chicken")
diff --git a/rules.make b/rules.make
index 83ab53cf..6af705bd 100644
--- a/rules.make
+++ b/rules.make
@@ -307,7 +307,7 @@ endif
$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.h 
"$(DESTDIR)$(ICHICKENINCDIR)"
$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(CHICKEN_CONFIG_H) 
"$(DESTDIR)$(ICHICKENINCDIR)"
 ifeq ($(PLATFORM),macosx)
-   $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)mac.r 
"$(DESTDIR)$(ISHAREDIR)"
+   $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)mac.r 
"$(DESTDIR)$(IDATADIR)"
$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) 
$(SRCDIR)CHICKEN.icns "$(DESTDIR)$(IDATADIR)"
 endif
 ifdef WINDOWS
-- 
2.26.2