Article View: borland.public.delphi.commandlinetools
Article #205Macro modifiers in makefile
From: Richard Foersom
Date: Thu, 03 Mar 2005 18:03
Date: Thu, 03 Mar 2005 18:03
30 lines
1836 bytes
1836 bytes
In a makefile I have some filenames defined in macros (variables) that I would like to extract the filename and directory of. --- makefile start --- FullName = D:\lib\delphi32\item.pas DirName = $(FullName,D) BaseName = $(FullName,B) # expected: # DirName = D:\lib\delphi32\ # BaseName = item # but does not work! print: @echo "$(FullName)" @echo "$(DirName)" @echo "$(BaseName)" --- makefile end --- I want DirName to be "D:\lib\delphi32\" and BaseName to be "item" but I can not find a proper syntax for doing this. In the Delphi 7 help there is a page called "Modifying default MAKE macros" but it is very unclear how much is possible and if general macros can be used. The syntax using the comma in front of the D and B modifier was an idea (but not working) that I got from this page, see section Macro Modifiers: <http://www.opussoftware.com/tutorial/TutMakefile.htm> Is there a way to do this in the Delphi make?
Technical Details
Message-ID:
<4227516f@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: ff8f1,4e5669d13ad9fba4,start X-Google-Attributes: gidff8f1,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Richard Foersom" <r.nojunk.foersom@oberthurcs.nowhere.com> Sender: "Richard Foersom" <r.nojunk.foersom@oberthurcs.nowhere.com> Reply-To: "Richard Foersom" <r.nojunk.foersom@oberthurcs.nowhere.com> Subject: Macro modifiers in makefile Newsgroups: borland.public.delphi.commandlinetools X-User-Info: 194.151.64.243 X-Forwarded-For: 10.0.0.1 NNTP-Posting-Host: 207.105.83.66 Message-ID: <4227516f@newsgroups.borland.com> Date: 3 Mar 2005 10:03:27 -0800 X-Trace: newsgroups.borland.com 1109873007 207.105.83.66 (3 Mar 2005 10:03:27 -0800) Lines: 31 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!gatel-ffm!gatel-ffm!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail