diff mbox series

[v2,22/30] Makefile: Correct the ans1_compiler rule for MSYS2

Message ID 20230430013003.1047454-23-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Allow building sandbox with MSYS2 | expand

Commit Message

Simon Glass April 30, 2023, 1:29 a.m. UTC
Add the required extension to the Makefile rule.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Use EXEEXT instead of ELFEXT

 Makefile               | 1 +
 scripts/Makefile.build | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Tom Rini April 30, 2023, 2:29 p.m. UTC | #1
On Sat, Apr 29, 2023 at 07:29:55PM -0600, Simon Glass wrote:

> Add the required extension to the Makefile rule.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
Bin Meng May 3, 2023, 2:31 a.m. UTC | #2
Hi Simon,

On Sun, Apr 30, 2023 at 9:30 AM Simon Glass <sjg@chromium.org> wrote:
>
> Add the required extension to the Makefile rule.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Use EXEEXT instead of ELFEXT
>
>  Makefile               | 1 +
>  scripts/Makefile.build | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 240562dff00b..a328652f0f23 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -48,6 +48,7 @@ ifeq ($(MSYS_VERSION),0)
>  export LIBEXT := so
>  else
>  export LIBEXT := dll

To make such handling consistent, please make LIBEXT be .so and .dll
(including the dot like exe)

> +export EXEEXT := .exe
>  endif
>
>  # Avoid funny character set dependencies
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 97dd4a64f6ef..a494e2f105b8 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -309,7 +309,7 @@ quiet_cmd_asn1_compiler = ASN.1   $@
>        cmd_asn1_compiler = $(objtree)/tools/asn1_compiler $< \
>                                 $(subst .h,.c,$@) $(subst .c,.h,$@)
>
> -$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/tools/asn1_compiler
> +$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/tools/asn1_compiler$(EXEEXT)
>         $(call cmd,asn1_compiler)
>
>  # Build the compiled-in targets
> --

Otherwise,
Reviewed-by: Bin Meng <bmeng@tinylab.org>
Pali Rohár May 3, 2023, 7:07 a.m. UTC | #3
On Wednesday 03 May 2023 10:31:06 Bin Meng wrote:
> Hi Simon,
> 
> On Sun, Apr 30, 2023 at 9:30 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > Add the required extension to the Makefile rule.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > Changes in v2:
> > - Use EXEEXT instead of ELFEXT
> >
> >  Makefile               | 1 +
> >  scripts/Makefile.build | 2 +-
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 240562dff00b..a328652f0f23 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -48,6 +48,7 @@ ifeq ($(MSYS_VERSION),0)
> >  export LIBEXT := so
> >  else
> >  export LIBEXT := dll
> 
> To make such handling consistent, please make LIBEXT be .so and .dll
> (including the dot like exe)

IIRC de-facto standard Makefile variable LIBEXT does not contain dot.
So this is how it is used...

> > +export EXEEXT := .exe
> >  endif
> >
> >  # Avoid funny character set dependencies
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index 97dd4a64f6ef..a494e2f105b8 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -309,7 +309,7 @@ quiet_cmd_asn1_compiler = ASN.1   $@
> >        cmd_asn1_compiler = $(objtree)/tools/asn1_compiler $< \
> >                                 $(subst .h,.c,$@) $(subst .c,.h,$@)
> >
> > -$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/tools/asn1_compiler
> > +$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/tools/asn1_compiler$(EXEEXT)
> >         $(call cmd,asn1_compiler)
> >
> >  # Build the compiled-in targets
> > --
> 
> Otherwise,
> Reviewed-by: Bin Meng <bmeng@tinylab.org>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 240562dff00b..a328652f0f23 100644
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,7 @@  ifeq ($(MSYS_VERSION),0)
 export LIBEXT := so
 else
 export LIBEXT := dll
+export EXEEXT := .exe
 endif
 
 # Avoid funny character set dependencies
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 97dd4a64f6ef..a494e2f105b8 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -309,7 +309,7 @@  quiet_cmd_asn1_compiler = ASN.1   $@
       cmd_asn1_compiler = $(objtree)/tools/asn1_compiler $< \
 				$(subst .h,.c,$@) $(subst .c,.h,$@)
 
-$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/tools/asn1_compiler
+$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/tools/asn1_compiler$(EXEEXT)
 	$(call cmd,asn1_compiler)
 
 # Build the compiled-in targets