Re: Help needed for writing a rule

Kaz Kylheku <[email protected]>
Newsgroups gmane.comp.gnu.make.general
Message-ID <[email protected]>
On 2022-11-25 09:06, Patrick Begou wrote:
> @David I think I'll have the same pitfall than with Kaz strategy. No ?

The strategy with regard to dependencies is to isolate the
compiler that is fussy about upper case, but deal with lower
case everywhere else.

Imagine we had a C compiler that needed upper case:

   foo.o: foo.c           # dependencies know nothing about FOO.o or FOO.c
      ln -sf foo.c FOO.c  # make temporary FOO.c -> foo.c symlink
      $(CC) FOO.c -c      # compile FOO.c to FOO.o
      rm -f FOO.c         # don't need symlink any more
      mv FOO.o foo.o      # rename to lower case

We're basically scripting around the compiler to make it
look like it accepts and produces lower case; we confine
all that into the small "firewall" around the compiler,
and prevent that from spreading into our build system.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.