bmake: variable modifiers in SysV include

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

bmake: variable modifiers in SysV include

Pietro Cerutti-4
Hi,

our make (contrib/bmake) does not currently support variable modifiers
in SysV-style "include" directives. See this simple example:

==============================================================================

% cat Makefile Makefile1.inc Makefile2.inc Makefile3.inc
# Makefile

SUB=    Makefile2.foo Makefile3.foo

include Makefile1.inc $(SUB:.foo=.inc) # ===== THIS =====

# Makefile1.inc

FOO=    foo

# Makefile2.inc

BAR=    bar

# Makefile3.inc

all:
        @echo ${FOO} ${BAR}

% make
make: "/usr/home/gahr/tmp/mk-sysv-include/Makefile" line 5: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/gahr/tmp/mk-sysv-include

==============================================================================

This patch [1] corrects this problem, and results in the expected

% make
foo bar

Apart from parentheses reshuffling, the patch just removes a check that
inhibits SysV inclusion if the line being parsed contains a colon (:)
character.

This has been there since bmake has supported SysV includes [2].

Questions:

1. Any ideas why the check is there, and what problem it's preventing?
2. Anybody with src bit would like to approve me committing the fix?

Thanks!

[1] https://people.freebsd.org/~gahr/bmake-inc-subst.diff
[2] http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/make/parse.c.diff?r1=1.4&r2=1.5


--
Pietro Cerutti

signature.asc (915 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: bmake: variable modifiers in SysV include

Simon J. Gerraty
Pietro Cerutti <[hidden email]> wrote:

> our make (contrib/bmake) does not currently support variable modifiers
> in SysV-style "include" directives. See this simple example:

> Apart from parentheses reshuffling, the patch just removes a check
> that inhibits SysV inclusion if the line being parsed contains a colon
> (:) character.
>
> This has been there since bmake has supported SysV includes [2].
>
> Questions:
>
> 1. Any ideas why the check is there, and what problem it's preventing?
> 2. Anybody with src bit would like to approve me committing the fix?

Can you pls fwd your issue to [hidden email] (cc me)
that way whoever it was who added the support for sysV style include
can comment.

Thanks
--sjg
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: bmake: variable modifiers in SysV include

Pietro Cerutti-4
On Mar 28 18 17:13, Simon J. Gerraty wrote:

>Pietro Cerutti <[hidden email]> wrote:
>
>> our make (contrib/bmake) does not currently support variable modifiers
>> in SysV-style "include" directives. See this simple example:
>
>> Apart from parentheses reshuffling, the patch just removes a check
>> that inhibits SysV inclusion if the line being parsed contains a colon
>> (:) character.
>>
>> This has been there since bmake has supported SysV includes [2].
>>
>> Questions:
>>
>> 1. Any ideas why the check is there, and what problem it's preventing?
>> 2. Anybody with src bit would like to approve me committing the fix?
>
>Can you pls fwd your issue to [hidden email] (cc me)
>that way whoever it was who added the support for sysV style include
>can comment.
Hi Simon,

I can't reply to Christos' email properly because I'm not subscribed to
that ML. Anyway, it looks like the original reason for the check on the
colon doesn't look too sustainable anymore :)

Would you like to commit my fix to NetBSD?

Thanks!

--
Pietro Cerutti

signature.asc (915 bytes) Download Attachment