Makefile problem - How to run module load in a Makefile | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Makefile problem - How to run module load in a Makefile

UNIX for Advanced & Expert Users


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 07-24-2008
hernandinho hernandinho is offline
Registered User
 
Join Date: Jul 2008
Last Activity: 24 July 2008, 7:01 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error:

make: module: command not found

Why is this? Is there any way to run this command in a Makefile?

NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile
Sponsored Links
    #2  
Old 07-25-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
 
Join Date: Mar 2008
Last Activity: 28 March 2011, 6:41 AM EDT
Location: /there/is/only/bin/sh
Posts: 3,653
Thanks: 0
Thanked 10 Times in 8 Posts
You mean like NERSC Software Modules? It looks like it's only supported for interactive shells, based on a very brief look.
Sponsored Links
    #3  
Old 04-13-2009
munkymorgy munkymorgy is offline
Registered User
 
Join Date: Apr 2009
Last Activity: 13 April 2009, 10:20 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Makefile problem - How to run module load in a Makefile

>module load msjava/sunjdk/1.5.0 works on the command line but fails with:
>module: command not found
when used in make, bash, etc script files.

This is because the module enviroment has not been loaded, as it is for a normal user session.

try adding some thing similar to this before your module load call:

. /usr/share/modules/init/bash
module load msjava/sunjdk/1.5.0

Morgan
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem With Makefile majid.merkava Emergency UNIX and Linux Support 3 03-09-2011 12:57 PM
Help with Simple Multi-Level Makefile (Extremely New at Makefile) Tatl Homework & Coursework Questions 1 03-09-2011 03:48 AM
Problem with Makefile blade2008 Programming 1 08-26-2010 09:29 AM
Makefile executing another Makefile first? wwuster UNIX for Advanced & Expert Users 0 07-20-2010 07:21 AM
problem with Makefile sskb UNIX for Advanced & Expert Users 3 08-27-2002 09:01 AM



All times are GMT -4. The time now is 06:24 PM.