Skip to content

Conversation

@gustavla
Copy link
Contributor

Commands, such as $(error ...), are not allowed to be indented with tabs
outside of targets, throwing an error instead of outputting the actual
error. The solution is to use innocuous spaces instead. Ideally, spaces
should be used everywhere outside targets, but since make does not mind
it if variable assignments are tab-indented outside targets, a complete
overhaul is not necessary. However, if more errors are added, it might
make more sense to be consistent.

You can easily see what happens by creating a simple Makefile:

ifeq (,)
    $(error test)
endif

Try tab-indenting the error, and you will see the error (at least for GNU make 3.81):

Makefile:2: *** commands commence before first target.  Stop.

The problem is resolved if you switch to spaces.

Commands, such as $(error ...), are not allowed to be indented with tabs
outside of targets, throwing an error instead of outputting the actual
error. The solution is to use innocuous spaces instead. Ideally, spaces
should be used everywhere outside targets, but since make does not mind
it if variable assignments are tab-indented outside targets, a complete
overhaul is not necessary. However, if more errors are added, it might
make more sense to be consistent.

Also, make will already add a period so I removed it.
@longjon
Copy link
Contributor

longjon commented Feb 25, 2015

Oh gee, what a mess. You do seem to be correct, thanks for the fix.

longjon added a commit that referenced this pull request Feb 25, 2015
Replaced illegal tab in Makefile with spaces.
@longjon longjon merged commit b9aa166 into BVLC:master Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants