Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
mr(R)

30.08.2008, 19:01
 

GNU make / DJGPP make difference? (Developers)

I know GNU make from *nix and the port mingw32-make, both are identical.

My makefiles working on windows with mingw32-make doesn't work under DOS with make from DJGPP, error message "no target specified and no makefile found". I simply join the folder with the source and the makefile and type not mingw32-make but simply make.

It seams like make from DJGPP is also a port and no clone. Any idea why it doesn't work as jump in replacement?

If I use make -f c:\fullpath\source\makefile then I get "missing separator. Stop". There are tabs and no spaces, created the tabs with windows notepad, wordpad and FreeDOS edit and rhide. Same...

Any advise?

Rugxulo(R)

Homepage

Usono,
31.08.2008, 00:38

@ mr
 

GNU make / DJGPP make difference?

> I know GNU make from *nix and the port mingw32-make, both are identical.

There's actually some reason they keep mingw32-make separate from just calling it "make", but I forget (not POSIX enough??). BTW, I'm no makefile pro, but I do know that makefiles are almost never portable and are hard to write effectively (or read, IMO).

> My makefiles working on windows with mingw32-make doesn't work under DOS
> with make from DJGPP, error message "no target specified and no makefile
> found". I simply join the folder with the source and the makefile and type
> not mingw32-make but simply make.

What OS? It may not be finding the default makefile. And it may be expecting a case sensitive filename, e.g. Makefile or makefile.mak or whatever.

> It seams like make from DJGPP is also a port and no clone. Any idea why it
> doesn't work as jump in replacement?

The DJGPP port has to deal with DOS limitations, e.g. workaround the cmdline size limit, lack of default *nix shell, SFNs, etc. Also, since DOS is (usually) single-tasking, -j doesn't do anything (or at least nobody with knowledge of DR-DOS or Desqview/X bothered to send in their patches).

> If I use make -f c:\fullpath\source\makefile then I get "missing
> separator. Stop". There are tabs and no spaces, created the tabs with
> windows notepad, wordpad and FreeDOS edit and rhide. Same...

Some editors expand all tabs to spaces upon saving (MS Edit?). RHIDE is pretty much abandoned, and Notepad is wimpy (no *nix LF compatibility), plus Wordpad probably isn't even intended for plain text.

> Any advise?

Get a better editor. Tell exactly what OS, what make versions, filesizes and dates, etc. Double check that tabs exist in your makefile. Watch out for filename case sensitivity. And don't expect makefiles to be as portable as you'd hope, they usually aren't. However, sometimes people manage a fairly good job (e.g. S-Lang or Allegro).

There are actually a lot of make clones, and there are equally as many make "improvements". So you've got a lot of exploring to do if you give up on make (mk, Scons, Jam, makemake, cmake, etc).

mr(R)

31.08.2008, 02:04

@ Rugxulo
 

GNU make / DJGPP make difference?

> > I know GNU make from *nix and the port mingw32-make, both are identical.
>
> There's actually some reason they keep mingw32-make separate from just
> calling it "make", but I forget (not POSIX enough??). BTW, I'm no makefile
> pro, but I do know that makefiles are almost never portable and are hard to
> write effectively (or read, IMO).
>
> > My makefiles working on windows with mingw32-make doesn't work under
> DOS
> > with make from DJGPP, error message "no target specified and no
> makefile
> > found". I simply join the folder with the source and the makefile and
> type
> > not mingw32-make but simply make.
>
> What OS?

Because this is a DOS forum I am using DOS. Mostly FreeDOS.

> It may not be finding the default makefile. And it may be
> expecting a case sensitive filename, e.g. Makefile or makefile.mak or
> whatever.

I think in case of DJGPP / make it's makefile.

> > If I use make -f c:\fullpath\source\makefile then I get "missing
> > separator. Stop". There are tabs and no spaces, created the tabs with
> > windows notepad, wordpad and FreeDOS edit and rhide. Same...
>
> Some editors expand all tabs to spaces upon saving (MS Edit?).

I am not using ms edit.

> RHIDE is pretty much abandoned, and Notepad is wimpy (no *nix LF compatibility),

Only used rhide because it was mentoined in the DJGPP faq http://www.delorie.com/djgpp/v2faq/faq22_17.html and I only used it to create the tab.

> plus Wordpad probably isn't even intended for plain text.
Well, I save as normal .txt. Always thought it's some kind of a simple standard. But well, it might be indeed not the best tool.

> > Any advise?
>
> Get a better editor.

FreeDOS edit isn't good? I see. Tabs on FreeDOS are spaces on windows...

> Tell exactly what OS

FreeDOS 1.0

> what make versions

GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
Built for i386-pc-msdosdjgpp

> filesizes and dates, etc.

My test examples have minimal size and made today.

> Double check that tabs exist in your makefile.

It does, it's perhaps just the wrong editor.

> Watch out for filename case sensitivity.

Ok.

> However, sometimes people manage a fairly good job (e.g. S-Lang or Allegro).

> There are actually a lot of make clones, and there are equally as many
> make "improvements". So you've got a lot of exploring to do if you give up
> on make (mk, Scons, Jam, makemake, cmake, etc).

Well, make is the usual way. I've just downloaded the source for an DOS application with premade makefiles but make didn't work. Make also didn't work with minimal 100% working on mingw32-make. I think I am just messing up something and it's not the limit of make.

marcov(R)

01.09.2008, 11:44

@ Rugxulo
 

GNU make / DJGPP make difference?

> > I know GNU make from *nix and the port mingw32-make, both are identical.
>
> There's actually some reason they keep mingw32-make separate from just
> calling it "make", but I forget (not POSIX enough??). BTW, I'm no makefile
> pro, but I do know that makefiles are almost never portable and are hard to
> write effectively (or read, IMO).

I suspect it has something to do with hard tabs (the whitespace before targets) and newlines format. Some windows/dos makes allow crlf, some are still lf, and consider cr chars "error".

For editing makefiles I use (on Windows) cygwin joe, but I'm a bit rusty since FPC changed to entirely generated makefiles 4-5 years ago.

mr(R)

31.08.2008, 02:07

@ mr
 

GNU make / DJGPP make difference?

Seams more complicated then I thought.

Can you suggest me a 100 % working minimal DJGPP sample make project? It's hopefully more easy to answer this way.
+
A confirmed to work editors for DOS and Windows with tabs?

Laaca(R)

Homepage

Czech republic,
31.08.2008, 09:55

@ mr
 

GNU make / DJGPP make difference?

> A confirmed to work editors for DOS and Windows with tabs?

Setedit

---
DOS-u-akbar!

Rugxulo(R)

Homepage

Usono,
31.08.2008, 20:40

@ mr
 

GNU make / DJGPP make difference?

> Can you suggest me a 100 % working minimal DJGPP sample make project? It's
> hopefully more easy to answer this way.
> +
> A confirmed to work editors for DOS and Windows with tabs?

TDE works fine for me, and its 32-bit DOS version is built with DJGPP itself. So the included "makefile" should work out of the box (assuming your GCC supports "-mtune=pentiumpro", e.g. change that to "-mcpu=" if GCC 3.2.3 or older). Two birds with one stone! :-D

http://www.geocities.com/jadoxa/tde/

EDIT: There's actually a few separate makefiles in there. The default will work for Linux w/ Ncurses if you change the OS value. And I think the Win32 version by default was compiled with LCC-Win32 (but MinGW also claims to work in the main makefile, set OS=win32).

Rugxulo(R)

Homepage

Usono,
02.09.2008, 04:50

@ mr
 

GNU make / DJGPP make difference?

> I know GNU make from *nix and the port mingw32-make, both are identical.

Except not always the same version. Plus DJGPP has quirks that MinGW doesn't (e.g. no separate shell for each command??). Besides, this is what my mingw32-make.exe says:

> GNU Make 3.81
> ...
> This program built for i386-pc-mingw32

And this is what my DJGPP make says:

> GNU Make 3.81
> ...
> This program built for i386-pc-msdosdjgpp

So, technically, you're using an outdated GNU/DJGPP make! (See here.)

P.S. You could always try CBuild, it's only one .C source file (!), and it's portable and (possibly) easier to use than true makefiles. Done by the same author as APEG (see other thread). :-)

mr(R)

02.09.2008, 14:40

@ mr
 

GNU make / DJGPP make difference?

I found the reason. Unbelievable. Anything worked, but make. After copying, deleting and renaming my folder everything worked. Guess somehow I trashed a part of my filesystem.

Rugxulo(R)

Homepage

Usono,
02.09.2008, 22:49

@ mr
 

GNU make / DJGPP make difference?

> I found the reason. Unbelievable. Anything worked, but make. After copying,
> deleting and renaming my folder everything worked. Guess somehow I trashed
> a part of my filesystem.

Well, FAT is not exactly immune to corruption. DOSFSCK is your friend. :-D Anyways, two other notes I forgot to mention:

FreeDOS Edit? It's not a bad editor, but it has a 64k filesize limit, which is kinda lame, IMO, but whatever. Of course, it's got a nice UI, so I guess it's still somewhat usable. (Heck, some people would say your sources shouldn't exceed 64k just for maintenance reasons.)

Also, since you said you're working on pure FreeDOS, don't forget that FAT can only store times in limited format: e.g. the seconds field only records every other second. So, you'll always have 01:05:02pm and never 01:05:03pm. So on a moderately fast machine (e.g. CWS's 550 Mhz P3 running super-fast Borland C), sometimes you can have problems rebuilding small projects. Not a huge issue, just a little quirk to be aware of.

Back to index page
Thread view  Board view
15192 Postings in 1365 Threads, 250 registered users, 12 users online (0 registered, 12 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum