chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] fix: eval.scm: use soname only with when U


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] fix: eval.scm: use soname only with when USES_SONAME present
Date: Sat, 25 Jan 2014 22:36:43 +0100
User-agent: Mutt/1.4.2.3i

On Fri, Jan 03, 2014 at 03:37:45PM +0100, Kristian Lein-Mathisen wrote:
> Hi folks,
> 
> In the process of trying to ease the Android build cycle, I stumbled across
> sonames. I don't know what they are or what they do, but I know Android
> doesn't like them. In eval.scm, the binary version number is appended on
> all linux software-versions, which includes Android.
> 
> This patch tries to fix and clean that up. Hopefully the patch commit
> message makes sense.

Hi all,

I believe this patch does basically the correct thing, so here's a
signed-off copy.  However, it breaks the Cygwin and MingW builds because
they have their own Makefile fragments for generating chicken-defaults.h
and set CUSTOM_CHICKEN_DEFAULTS to override the generation of that
file from defaults.make.

The first of the two remaining patches in this mail resolve the immediate
problem of the breakage and removes the duplication in Cygwin.  It also
simplifies *some* of the "target" flag-passing and file-copying mess in
csc.scm.

The reason Cygwin has its own copy of the chicken-defaults.h generator
is unclear; the only differences seem to be a no-longer used
C_DEFAULT_TARGET_STACK_SIZE, which is initialised to a nonexistant
$(NURSERY) Make variable, and the TARGET_RUN_LIB_HOME.  I've removed
this unnecessary copy and moved the TARGET_RUN_LIB_HOME into
defaults.make with a condition on $(DLLSINPATH), which should control
this because Windows requires .dll files to exist in %PATH% or live
in the same location as the program.  csc.scm is cleaned up by removing
the "win" declaration and pulling mingw in line with Cygwin as
requiring TARGET_RUN_LIB_HOME to be defined as $(PREFIX)/bin.

The third and final patch is purely optional but I think it should be
applied to prevent more future mistakes.  Let me explain why:
The (plain) mingw Makefile also has its own code for generating
chicken-defaults and the resource files, because the Windows command
interpreter's quotation rules are different from the UNIX shell,
and "echo" works differently too (it does not strip surrounding double
quotes).  I looked at the GNU Make manual, and it turns out GNU Make
can now write files itself, but only since version 4.0 which is not
shipped by Debian or Mingw, so we can't use it yet.  However, in
preparation for that I've made a simple helper function called "echo"
which just applies basic quotation on UNIX and no quotation(!) on
Windows.  This is enough for our needs and will hopefully get us by
for some time to come.

While cleaning up the resource files I noticed another mistake and
inconsistency between defaults.make and Makefile.mingw:
the chicken-uninstall.rc rule in defaults.make (which will be used
by mingw-msys) used the name "chicken-install" for the program,
and the Makefile.mingw copy did not apply PROGRAM_PREFIX and
PROGRAM_SUFFIX to the program's name.  Both problems are now
solved in the defaults.make version.

So while this makes defaults.make really even uglier I do think
it's quite an improvement, and should prevent future mistakes due
to code duplication.  Please consider applying them.

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-fix-eval.scm-use-soname-only-with-when-USES_SONAME-p.patch
Description: Text document

Attachment: 0002-Fix-SONAME-handling-on-Windows.patch
Description: Text document

Attachment: 0003-Remove-more-Makefile-redundancy.patch
Description: Text document


reply via email to

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