[Top][All Lists]

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

Re: Case-insensitive targets

From: Gisle Vanem
Subject: Re: Case-insensitive targets
Date: Thu, 2 Aug 2018 16:44:06 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Eli Zaretskii wrote:

I'm not sure Make can distinguish between the two kinds.  E.g., the
rules for generating the "phony" target could be given later.  Paul
will know for sure.

And anyway, wouldn't it be confusing if case-sensitivity changed
depending on whether a file exists or doesn't?

Thanks for answering.  I guess so, yes.

I fail to understand all the details around '-DHAVE_CASE_INSENSITIVE_FS',
but is the above .mak-file working as designed on Windows?

Yes.  AFAIR, We deliberately down-case file names we read from the
filesystem before recording them in the Make's internal memory.

Then are there not a problem with adding default suffix rules
for e.g. '.s' and '.S'. According to you "down-case" argument
they must use the same default command?

Can you take a look at 'default.c' in:

install_default_suffix_rules (void)
  for (s = default_suffix_rules; *s != 0; s += 2, loop++)
      struct file *f = enter_file (strcache_add (s[0]));
      /* This function should run before any makefile is parsed.  */
      assert (f->cmds == 0);

I put some trace in this loop and saw that some ".c"/".C",
".f"/".F" etc. rules returned 'f->cmds != NULL' and the
assert() triggers in '-DMAKE_MAINTAINER_MODE'.

From makeint.h:

/* Disable assert() unless we're a maintainer.
   Some asserts are compute-intensive.  */
# define NDEBUG 1

That assert() doesn't seems to consider Windows.
Besides, there seems to be a mem-leak in that loop.

I'm not building with 'MAKE_MAINTAINER_MODE' normally,
but this time I needed some more details.


reply via email to

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