Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GNU make yields “commands commence before first target” error

Tags:

emacs

makefile

Trying to install Emacs 22.3 from sources on Fedora 15 x86_64.

./configure

command goes ok, but

make yields error:

[sigrlami@server emacs-22.3]# make
cd lib-src; make all  \
CC='gcc' CFLAGS='-g -O2 -Wno-pointer-sign ' CPPFLAGS='-D_BSD_SOURCE  ' \
LDFLAGS='-Wl,-znocombreloc ' MAKE='make'
make[1]: Entering directory `/home/sigrlami/bin/emacs-22.3/lib-src'
Makefile:148: *** recipe commences before first target.  Stop.
make[1]: Leaving directory `/home/sigrlami/bin/emacs-22.3/lib-src'
make: *** [lib-src] Error 2

In makefile, where I don't touch anything, everything seems ok in row 148:

144 # ========================== start of cpp stuff =======================
145 LIBS_MOVE=$(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) $(COM_ERRLIB) $(HESIODLIB)
146 LOADLIBES= -lc
147 ALL_CFLAGS = -D_BSD_SOURCE -DHAVE_CONFIG_H
148           -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
149 LINK_CFLAGS = -D_BSD_SOURCE -DHAVE_CONFIG_H

Any suggestions how to fix this? Maybe system doesn't have some libraries?

like image 816
sigrlami Avatar asked Feb 03 '23 12:02

sigrlami


1 Answers

The make input language is white-space sensitive.

In particular commands (actions to be run in order to remake targets) begin with a tab, so the error is telling you unambiguously that you have a tab out of place.

While it is only tabs at the beginning of lines that have the special significance, I try to not use any tabs in my makefiles other than that the signal the beginning of commands.

like image 73
dmckee --- ex-moderator kitten Avatar answered May 11 '23 06:05

dmckee --- ex-moderator kitten