Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

does a MAKEFILE need and extension

3 views
Skip to first unread message

don

unread,
Apr 29, 2007, 10:28:44 PM4/29/07
to
When writing a MakeFile for NMAKE should I give it an extension or just
leave it as MakeFile, would it matter if I gave it a .txt file extension,
just so windows notepad would reconize it?


ArarghMail704NOSPAM

unread,
Apr 29, 2007, 11:23:39 PM4/29/07
to
On Sun, 29 Apr 2007 21:28:44 -0500, "don" <spam...@crayne.org>
wrote:

>When writing a MakeFile for NMAKE should I give it an extension or just
>leave it as MakeFile, would it matter if I gave it a .txt file extension,
>just so windows notepad would reconize it?
>

NMAKE looks for just 'makefile' in the current directory, AFAIK. For
any other name, the -f or /f parameter is needed.

So, whichever floats your boat.
--
ArarghMail704 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.

Eric

unread,
Apr 29, 2007, 11:21:02 PM4/29/07
to
don wrote:

Dont use notepad! it will add .txt to everything and then your makefile will
no longer be a makefile it will be a windows notepad text file.
Use no extension, just call it Makefile or in Winders call it MAKEFILE
with no Dot_extension, there's an awfull lot of info on makefiles on the web
option: call it whatever you like and use the -f parameter to make/nmake or
whatever you use. ie nmake -f BobsYourUncle.zzz
Eric

Tim Roberts

unread,
Apr 30, 2007, 12:26:35 AM4/30/07
to

You can associate any extensions you want with Notepad. From a DOS shell,
if you type this:
assoc .txt
you'll see that the .txt extension is associated with the name "txtfile".
If you type this:
ftype txtfile
you'll see that this type brings up Notepad. So, if you type this:

assoc .mak=txtfile

it tells the system to bring up Notepad when you double-click a file with a
.mak extension.

However, as was previously pointed out, nmake by default looks for a file
called "makefile". If you use an extension, you'll have to specify the
filename when you call nmake.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Jim Carlock

unread,
Apr 30, 2007, 12:14:17 AM4/30/07
to
"don" asked...
: When writing a MakeFile for NMAKE should I give it an extension

: or just leave it as MakeFile, would it matter if I gave it a .txt file
: extension, just so windows notepad would reconize it?

I think I've seen a .mak extension somewhere, but don't quote me
on that.

--
Jim Carlock
Post replies to the group.

don

unread,
Apr 30, 2007, 6:04:10 AM4/30/07
to
Thank-you all for clearing that up - very good suggestions


cr88192

unread,
May 5, 2007, 5:23:02 AM5/5/07
to

"Eric" <spam...@crayne.org> wrote in message
news:FMidnSzvE7YD_ajb...@comcast.com...

where the hell do you get this claim?...
like everything else, it depends on what you do when saving, ...
damn near all other apps have this exact same issue.

you have to select 'all files' if using 'save as', it is as simple as that.


next are you going to claim that 3-letter extentions are hidden and
immutable, and as a result we should not use windows?... (denying the
existence of this simple little checkbox hidden in folder options?...)


for example, notepad is my primary editor of choice for damn near all things
coding (just as windows explorer, notepad, and a bash shell, are my
preferred IDE...).

I usually use wordpad for simple text/documentation writing as well.

.

cr88192

unread,
May 5, 2007, 5:12:29 AM5/5/07
to

"don" <spam...@crayne.org> wrote in message
news:f13gnd$4ee$1...@reader2.panix.com...

> When writing a MakeFile for NMAKE should I give it an extension or just
> leave it as MakeFile, would it matter if I gave it a .txt file
> extension, just so windows notepad would reconize it?
>
>

usually, if I include an extension, its main purpose is to declare the
particular OS or toolchain for which this makefile is intended, ie:
..cyg=cygwin;
..mingw=mingw;
..lnx=linux;
....

now, as noted:
it is easy enough to associate tools, ie, notepad, with various extensions
(context menu->'open with' is another way).

however, as others have pointed out, the '-f' option is required in this
case.

.

0 new messages