views:

233

answers:

2

Hi all.

1) We have a need for Makefiles to build C++ on both z/OS USS and a Linux platform. Is it advisable to use gnu make on z/OS USS in order to keep our makefiles common ?

2) If the Makefiles are common, then some steps in the Makefiles, would still be conditional to the platform. Can we do that by steps that are similar to conditional compilation? If yes, can we please get help with the syntax?

3) Our z/OS USS Makefiles have shell scripts or groups of commands, as in example below, with the square brackets [] presenting the commands to the shell as a group, rather than one line at a time. It seems that using the GNU make, we had to modify these commands to become one line, which is messy, and the nested loop was a problem. Is there an easier way to group commands using gmake?

  [ 
  dirs=$(targets) 
  rc=0 
  for dir in $$dirs 
  do 
    cd $$dir/src 
    make -r 
    rc=$$? 
    if [ $$rc != 0 ]; then 
      echo "build failed for directory:" $$dir: 
      break; 
    fi 
    cd ../..
   done 
   echo "return code from make = " $$rc 
 ]
A: 
Beta
A: 

If you have a need for portable Makefiles, by all means use GNU make. I've been running it under USS for years now without any problems. If you don't feel comfortable building it yourself, you can get a a copy from here

Nighthawk