[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/5] Allow Poke to be built relocatable
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH 3/5] Allow Poke to be built relocatable |
Date: |
Fri, 26 Mar 2021 10:50:45 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> > diff --git a/configure.ac b/configure.ac
>> > index 7ca26abb..2b19683d 100644
>> > --- a/configure.ac
>> > +++ b/configure.ac
>> > @@ -173,6 +173,10 @@ dnl following macro is also supposed to work when
>> > cross-compiling.
>> > AC_C_BIGENDIAN
>> > +dnl Gnulib libpoke relocatable-lib-lgpl needs this
>> > +AM_CONDITIONAL([SHLIBS_IN_BINDIR],
>> >
>> > - [case "$host_os" in mingw* | cygwin*) true;; *) false;;
>> > esac])
>> >
>> >
>> > -
>>
>> I think it is Windows that really needs that setting right, rather than
>> relocatable-lib, right? I would make it clear in the comment.
>
> The code in gl-libpoke/Makefile.am uses that conditional, whether it is
> on Windows or not, so it must be defined.
> The conditional is used to decide whether -DINSTALLDIR is bin/ or lib/,
> which is used by relocatable-lib, thus my comment.
Ok, thanks for clarifying.
>> > diff --git a/gl-libpoke/Makefile.am b/gl-libpoke/Makefile.am
>> > new file mode 100644
>> > index 00000000..df8bc0a1
>> > --- /dev/null
>> > +++ b/gl-libpoke/Makefile.am
>> > @@ -0,0 +1,27 @@
>> > +AUTOMAKE_OPTIONS = 1.11 gnits
>>
>> Why gnits?
>>
>> > +SUBDIRS =
>> > +noinst_HEADERS =
>> > +noinst_LIBRARIES =
>> > +noinst_LTLIBRARIES =
>> > +EXTRA_DIST =
>> > +BUILT_SOURCES =
>> > +SUFFIXES =
>> > +MOSTLYCLEANFILES = core *.stackdump
>>
>> Is the configure or build supposed to dump a core? :D
>>
>> > +MOSTLYCLEANDIRS =
>> > +CLEANFILES =
>> > +DISTCLEANFILES =
>> > +MAINTAINERCLEANFILES =
>> > +
>> > +AM_CFLAGS =
>> > +AM_CPPFLAGS =
>
> All of the stuff above this point comes from Makefile.am as generated by
> gnulib-tool without --makefile-name.
>
> As per
> https://www.gnu.org/software/gnulib/manual/html_node/Modified-build-rules.html
> I needed to initialize all of the relevant variables on Gnulib's behalf.
Ok.
>> > AM_LFLAGS = -d
>> >
>> > The Automake generated .l.c rule is broken: When executed in a VPATH build,
>> >
>> > ============================================================================
>> >
>> > diff --git a/poke/pk-map.c b/poke/pk-map.c
>> > index 67bb6056..e960ea62 100644
>> > --- a/poke/pk-map.c
>> > +++ b/poke/pk-map.c
>> > @@ -17,6 +17,7 @@
>> > */
>> > #include <config.h>
>> > +#include <relocatable.h>
>> > #include <stdio.h>
>> > #include <inttypes.h>
>> > @@ -678,7 +679,7 @@ pk_map_resolve_map (const char *mapname, int
>> > filename_p)
>> > const char *s, *e;
>> >
>> > char *fixed_load_path
>> >
>> >
>> > - = pk_str_replace (map_load_path, "%DATADIR%", PKGDATADIR);
>> >
>> >
>> >
>> > - = pk_str_replace (map_load_path, "%DATADIR%", relocate
>> > (PKGDATADIR));
>> >
>> >
>>
>> This is not directly related to this patch, but I think it would be good
>> to use the global poke_datadir here instead of PKGDATADIR, and include
>> relocate.h only in poke.c.
>
> I'll do that in v2, then.
Thanks! :)
[PATCH 5/5] First version of REPL Ctrl-C trampoline for Woe32, Georgiy Tugai, 2021/03/25
Re: [PATCH 1/5] Rename CHAR, IN, VOID, ERROR to avoid collision, Jose E. Marchesi, 2021/03/26