Re: [cc65] THE Makefile V1.2 available - was: automatic generation of makefile dependencies

From: thefox xofeht <thefox1aspekt.fi>
Date: 2011-05-30 21:04:14
On Sat, May 28, 2011 at 5:18 PM,  <silverdr@wfmh.org.pl> wrote:
> Isn't it easier/better to just install the lib?

It's kind of a problem for me since I'm using my own customized
version of the library so there would be conflicts... I guess the
"proper" solution indeed is to set the target as "none"...

> BTW - not a complete solution to the inelegance of the above, but version 1.2.1 of the makefile, (which is behind the corner now, unless Oliver finds compelling reasons for not releasing it in current shape) allows for arbitrary "extensions" by using appropriately named src subdirectories.

That's good to hear. :)

On Sat, May 28, 2011 at 11:46 PM, Oliver Schmidt <ol.sc@web.de> wrote:
>> (of course
>> make from MinGW/whatever is required as well). This would mean
>> replacing mkdir/rmdir/rm/etc with Windows equivalents when Windows is
>> detected. It's up to you if you want to pursue that or not.
>
> I personally don't see any point in doing so. Where ever you get your
> make from should be a great place to get mkdir/rmdir/rm from.

Yeah I understand you completely. In the case of cmd.exe the problem
isn't getting mkdir/rmdir/rm however, it's that it implements built-in
versions of mkdir/rmdir that (AFAIK) can't be overridden without
specifying the full path to the executables... correct me if I'm
wrong.

Because of that, if nothing else, it might be good to give the user a
warning if cmd.exe is used because there's just no way "mkdir -p" is
going to work when run from cmd.exe. I think this piece of code should
be pretty reliable for detecting cmd.exe in case you want to add that:

ifeq ($(firstword $(shell echo)),ECHO)
  $(info DOS-like shell detected)
else
  $(info Seems to be an unix shell)
endif

> Check out this:
> http://www.gnu.org/software/make/manual/make.html#Utilities-in-Makefiles
>
> To get anywhere near reproducable results with 'make' one needs to
> envision make and the enumerated utilities as a single entitiy to be
> provided/installed/used together.
>
> Build tools trying to improve/replace 'make' typically have the
> functionality of those utilities built in. But with 'make' they happen
> to be separate - neverless they are part of a 'make' environment.
>
> Trying to have 'make' work with some other utilities that happen to
> come with Windows is like trying to have ld65 work with another
> compiler instead of cc65.

Yeah I understand this view. Funnily enough in that manual they also
advise against using "mkdir -p". :)

>>> I haven't however tested the Makefile with GunWin32 so far, maybe
>>> someone else...
>
>> I'll try it out and let you know.
>
> That would be great - thanks in advance :-)

You're right, GnuWin32 is far superior to UnxUtils (albeit a little
bit more complicated to install). The version of make they ship seems
to be the same as in MinGW.

-thefox
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon May 30 21:04:32 2011

This archive was generated by hypermail 2.1.8 : 2011-05-30 21:04:37 CEST