GNU make with xlc compiler

3.1k views Asked by At

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?

3

There are 3 answers

0
CPPCafe On

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.

0
CoreyStup On

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!

0
Sandburg On

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.