AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Makefile error "make: 1254-057 Shell command needs a leading tab"

  • 1.  Makefile error "make: 1254-057 Shell command needs a leading tab"

    Posted Thu July 05, 2007 05:22 AM

    Originally posted by: SystemAdmin


    Hi,
    I am getting the below error while running 'make'. I have also attached the Makefile details below. Kindly advice me to rectify this errror.
    $ make
    "Makefile", line 20: make: 1254-057 Shell command needs a leading tab.
    "Makefile", line 23: make: 1254-057 Shell command needs a leading tab.
    "Makefile", line 26: make: 1254-057 Shell command needs a leading tab.
    "Makefile", line 29: make: 1254-057 Shell command needs a leading tab.
    "Makefile", line 30: make: 1254-057 Shell command needs a leading tab.
    make: 1254-058 Fatal errors encountered -- cannot continue.
    $

    Makefile:
    PROJECT=glMqLib
    VERSION=1.2.0
    TARGET=lib$(PROJECT).$(VERSION).so
    CC=/usr/vacpp/bin/xlC_r
    CCFLAGS=-g -qthreaded -qrtti=all -qfuncsect -qnamemangling=v5 -brtl
    #-qchars=signed -qtemplateregistry=registry/myreg.reg
    MQ_DIR=/usr/mqm
    INCLUDE=-I/usr/jbc/include -I$(MQ_DIR)/inc
    LIB=-L$(MQ_DIR)/lib -L/usr/jbc/lib -limqb23ia_r -limqc23ia_r -ljbase -lloadjBASE
    #-lmqmcs_r

    OBJECTS=mq_connection_manager.o glMqLibImpl.o

    SUFFIXES: .cxx

    all: $(OBJECTS)
    $(CC) $(CCFLAGS) -qmkshrobj -o $(TARGET) $(OBJECTS) $(LIB) -lthread

    test : test.o
    $(CC) $(CCFLAGS) -o test test.o $(LIB) -lsvld

    cxx.o:
    $(CC) $(CCFLAGS) $(INCLUDE) -c $<

    clean:
    rm -f $(TARGET) $(OBJECTS)
    rm -f test test.o

    Thanks & Regards
    Peru.


  • 2.  Re: Makefile error "make: 1254-057 Shell command needs a leading tab"

    Posted Thu July 05, 2007 07:59 AM

    Originally posted by: SystemAdmin


    This message means exactly what it says. Lines in a makefile that consist of commands to be run during the make must begin with a tab character. In your case that is the $(CC) and rm lines. The syntax of a makefile is a bit opaque so you would do well to read up a bit. It looks like you're using the AIX make command but the GNU manual should still be helpful. Take a look at

    http://www.gnu.org/software/make/manual/make.html

    HTH

    Jim Lane