Thread: makefile woes

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    4

    makefile woes

    I have a makefile such that when I type the 'make' command I get this error:

    make: Fatal error in reader: makefile, line 5: Unexpected end of line seen

    I just can't seem to understand where the error lies.
    Is there a UNIX help file that describes what this error means?
    Where can I go to find out what it means?
    Can someone tell me what it means perhaps?

    Here is the code up to line 5.

    Code:
         1  # pe4 makefile
         2
         3   frodo.exe : main.o initialize.o empty.o full.o insert.o remov.o
         4      gcc -o frodo.exe main.o initialize.o empty.o full.o insert.o remov.o
         5
    I can individually compile each of the source files and object file. In fact, I can create the a.out file just fine using line 4 (without the frodo.exe), and the program runs how it is supposed to. The makefile however is not cooperating. Please help if you can!

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    Tried this?

    Note that the line with gcc is prefixed by a tab - a real tab character, not eight spaces!
    If this does not help, check some sites on make-files, like:
    http://www.delorie.com/djgpp/doc/ug/...makefiles.html

    An easy example:

    Code:
    main.exe : main.o foo.o
            gcc main.o foo.o -o main.exe
    main.o : main.c
            gcc -c main.c

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Newer version of make do not have this problem. Maybe it is about time to do a little compiler updating.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Building a project using a Makefile
    By starcatcher in forum Windows Programming
    Replies: 2
    Last Post: 11-23-2008, 11:50 PM
  2. Need help with Makefile
    By xshapirox in forum C++ Programming
    Replies: 14
    Last Post: 09-28-2004, 03:32 PM
  3. about Makefile and Macro
    By tom_mk in forum C++ Programming
    Replies: 1
    Last Post: 09-18-2003, 01:07 PM
  4. makefile woes
    By darfader in forum C Programming
    Replies: 2
    Last Post: 08-08-2003, 02:44 AM
  5. Borland 5.5 Makefile woes...
    By gprogga in forum C++ Programming
    Replies: 3
    Last Post: 06-01-2003, 02:20 AM