Re: Doing case conversion in a make file ?

From: Anton Erasmus (nobody_at_nowhere.net)
Date: 07/19/04


Date: Mon, 19 Jul 2004 19:35:41 +0200

On Mon, 19 Jul 2004 16:42:30 GMT, R Adsett
<radsett@junk.aeolusdevelopment.cm> wrote:

>In article <EdedndBT4eSQtmbdRVn-hw@nildram.net>,
>steve@NOSPAMTAfivetrees.com says...
>> "Anton Erasmus" <nobody@nowhere.net> wrote in message
>> news:2chlf05qp85r897uvu96ug2o17s1u0k7l1@4ax.com...
>> > I use gnu make for most of my make file these days.
>> > Now I have to change some old code that used the old
>> > IAR DOS 8051 tools. The problem is that the output file names
>> > are all converted to upper case, which causes havoc with the make
>> > rules, since all my input files are lower case filenames.
>> > Does anyone have a way of getting gnu make to do
>> > a case insensitive compare ?
>>
>> I presume you're using *nix.
>Since he is using DOS tools tht seems less likely. In fact given the
>problem description is seems most probable to me that he is using one of
>the newer windows variants (NT, 9X etc..). They have adopted the
>unfortunate case perserving but case insensitive approach. The GNU tools
>ported to NT generally maintain their case sensitive nature. A lot of
>the DOS based tools uppercase filenames before opening or creating a file
>which gives no problem when they open an existing lower case file (name)
>but when they create a file NT then preserves the upper case name which
>the GNU tools now think is different from the lower case name.
>
>What I have done when I have run across this is make the compile a two
>command process. The first is the usual compile command (cc, c85comp,
>whatever). The second is a simple rename command something like
>
>rename OUT.OBJ out.obj
>
>Some rename utilities attempt to help you and since the name hasn't
>changed they don't touch it. There should be some rename/lowercase
>filename utilities around (I don't know if cygwins mv will work). It's
>been a while since I've dealt with it so I can't offer much more than
>that as genreal guidance. But take comfort in the fact that it can be
>done. Worst case involves a copy to a new filename.
>

Thanks,

You described my problem much better than I did. I want to use cygwin
under Windows2000 for building my old DOS based projects. The 2 step
approach looks like it will work, even if I have to write my own
special rename command. (I am sure there should be a simple script
based method using something available under cygwin)

Regards
   Anton Erasmus



Relevant Pages

  • Re: Changing Uppercase filenames into Lowercase
    ... > I already found MAKEUP.COM which breaks down a filename ... > uses the RENAME command to rename lowercase names and ... > lowercase filename. ... > The filename remains uppercase because DCL uppercases ...
    (comp.os.vms)
  • Re: Renaming files using wildcards
    ... When I strip down the filenames of their ... spaces, the rename works well. ... strip the filename of it's spaces, ... rename command can't find the file name to rename when it ...
    (microsoft.public.windowsxp.general)
  • Re: remove words from mutiple files
    ... could edit those text files running Windows. ... That would be a good use for the rename feature if its in Ubuntu. ... # Checks if filename already lowercase. ...
    (alt.linux)
  • Re: Renaming a lot of files
    ... simply rename them as you use them. ... The simplest approach is to patch the registry to give you a dos prompt from ... Graham Mayor - Word MVP ... Word MVP web site http://word.mvps.org ...
    (microsoft.public.word.docmanagement)
  • Re: Cannot delete file with long name
    ... Completely ignores attempts to rename. ... Did find a utility which is able to display the short filename and delete ... Explorer shell to crash. ... I can delete the problem files by deleting the entire folder they are ...
    (microsoft.public.windowsxp.general)