2

Hoping for a bit of insight here. I have source code for one of our projects, with no documentation on how to compile, and all people who wrote it having left :) We have an issue in it and lucky moi has been tasked to investigate.

Currently I'm trying to build on AIX, the makefile keeps on complaining with either

make: 1254-055 Dependency line needs colon or double colon operator.

or

make: 1254-057 Shell command needs a leading tab.

The CPP options seem to be xlc options, and the software has been compiled many times before. The makefile contains control characters from windows in it and does have tabs against some of the entries but not all the shell commands.

Any thoughts on what could be the issue running make on the code? I haven't installed GNU make as of yet, could this solve the issues?

Keith Thompson
  • 254,901
  • 44
  • 429
  • 631
ShogunMonkey
  • 41
  • 2
  • 3
  • Does the Makefile have CR-LF end-of-line markers? The CRs could be confusing a finicky `make`. – mu is too short Nov 08 '11 at 06:46
  • 2
    There's no such thing as "gcc make". "gcc" is the GNU compiler collection, which includes the GNU C compiler. "make" is a build tool; GNU make is one of a number of implementations. – Keith Thompson Nov 08 '11 at 08:31
  • Thanks for the responses guys.. mu - the makefile does appear to have cr/lf's in it even though it's designed for AIX.. Keith - should have been more clearer, i meant gmake as opposed to make, as i understand it gmake is the implementation of make used by the GN compiler collection.. These files have worked in the past quite a few times so its more than likely something i'm doing/not doing that's causing the issues.. – ShogunMonkey Nov 08 '11 at 12:26
  • 1
    One person copying the makefile to a windows machine and saving it there could account for all of this. If it worked before, and you didnt make any changes that would require features of gmake, why not figure out what changed? Do you have a version-controlled copy back from when it worked? Diff with current. CR-LF as almost certainly a problem AND you must have leading tabs for shell commands. Good luck. – shellter Nov 08 '11 at 15:06
  • `make` is `PASE` only, not `ILE`. `gmake`is `ILE`, better. – Sandburg Sep 14 '18 at 12:20

3 Answers3

4

Classic SysV make is much more picky about formatting than gnumake is, never mind the feature set is much more restricted. I don't even bother writing "classic" compatible Makefiles anymore - too painful.

Even though we use the native compilers (xlc) on AIX, we still use gmake as our dependency/build tool.

I recommend installing a managed copy of gmake, downloadable from a couple sources:

Good luck!

CoreyStup
  • 1,488
  • 13
  • 14
0

With C++ sources, in my company :

  • On AIX, we use make (and xlC_r compiler).
  • On AS400, we use gmake (and ixlc compiler). Because make exists, but is PASE only.

gmake was certainly found on some old website... there are many other GNU programs on our iSeries. I haven't found any trace of it beside the PGM.

Sandburg
  • 757
  • 15
  • 28
0

I think you might need to use gmake even on AIX. The original make may not be working as expected. The Windows control character may or may not matter (usually does not), but can be edited out on vi.