Sponsored Content
Top Forums UNIX for Advanced & Expert Users Makefile problem - How to run module load in a Makefile Post 302306618 by munkymorgy on Monday 13th of April 2009 10:20:52 AM
Old 04-13-2009
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
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

problem with Makefile

Hi, I have a makefile which looks like this ProcessA : commands touch pro1 ProcessB : pro1 commands touch pro2 ProcessC: pro3 commands and after some runs, i wish only pro3 to run and I check that "pro1" and "pro2" are there in the directory, but still, if i give make... (3 Replies)
Discussion started by: sskb
3 Replies

2. Programming

Problem with a Makefile

Hi, I am very new with makefile topics , maybe this is a very symple question... I have this code wich compile very good ( I get it from the net), I will call it code A. I have to add it with a program that is all ready in use, (code B) that also compile good. When I put together it doesnt... (7 Replies)
Discussion started by: pmoren
7 Replies

3. Programming

Problem with makefile

My make file is CFLAGS = -Wall -g LDFLAGS = -lm CC = g++ all: server client rc4.o: rc4.cpp rc4.h ${CC} ${CFLAGS} -c rc4.cpp server.o: server.cpp rc4.h ${CC} ${CFLAGS} -c .cpp client.o: client.cpp rc4.h ${CC} ${CFLAGS} -c client.cpp server: server.o... (2 Replies)
Discussion started by: neerajgoyal12
2 Replies

4. Programming

A question about Makefile run by GNU make

Hello everybody, Currently I'm learning how to build projects (C programming) with GNU make. I have a problem with one Makefile and I would appreciate if you could kindly give me a hand. Here is the environment: OS: Redhat linux 5 compiler: gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)... (2 Replies)
Discussion started by: dariyoosh
2 Replies

5. UNIX for Advanced & Expert Users

Makefile executing another Makefile first?

I have 2 libraries in 2 different directories that I build with Makefiles. library B depends on library A. If I modify a .cpp file in library A and run lib B's Makefile can I have B's makefile to automatically rebuild library A? I am now rebuilding A, followed by B... but I'd like B to... (0 Replies)
Discussion started by: wwuster
0 Replies

6. Programming

Problem with Makefile

Hi, Here is my makefile http://pastie.org/1104332. I am trying to compile different .c files and .s files (assembly files) from different sub directories into E:/em35x/build/mfg-sample-app-cortexm3-iar-em357-em3xx-dev0680/ then the linker should link all the .o files from the build directory... (1 Reply)
Discussion started by: blade2008
1 Replies

7. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

8. Emergency UNIX and Linux Support

Problem With Makefile

I had created a Makefile for my project. my project file hierarchy is like this: 1. a source folder with main.c and Makefile in it 2. and a top level Makefile here is the Makefile in src folder all: program program: main.c gcc -o program main.c clean: rm programand here is top... (3 Replies)
Discussion started by: majid.merkava
3 Replies

9. Shell Programming and Scripting

how to run a shell script through Makefile

I want to run a target defined in a shell script. The shell script name is 'ua.sc' and the target in it is 'N' i.e. (ua N) throught a makefile. How can i do it so that i can run it with a make target. (3 Replies)
Discussion started by: vineet.dhingra
3 Replies

10. AIX

Error when run makefile to compile C program

I have a make file for C program, which always gives the error ld: 0711-738 ERROR: Input file ../src/file_name.o XCOFF32 object files are not allowed in 64 mode Does anybody know the problem? Thanks for contribution (2 Replies)
Discussion started by: digioleg54
2 Replies
Module::Load(3pm)					 Perl Programmers Reference Guide					 Module::Load(3pm)

NAME
Module::Load - runtime require of both modules and files SYNOPSIS
use Module::Load; my $module = 'Data:Dumper'; load Data::Dumper; # loads that module load 'Data::Dumper'; # ditto load $module # tritto my $script = 'some/script.pl' load $script; load 'some/script.pl'; # use quotes because of punctuations load thing; # try 'thing' first, then 'thing.pm' load CGI, ':standard' # like 'use CGI qw[:standard]' DESCRIPTION
"load" eliminates the need to know whether you are trying to require either a file or a module. If you consult "perldoc -f require" you will see that "require" will behave differently when given a bareword or a string. In the case of a string, "require" assumes you are wanting to load a file. But in the case of a bareword, it assumes you mean a module. This gives nasty overhead when you are trying to dynamically require modules at runtime, since you will need to change the module notation ("Acme::Comment") to a file notation fitting the particular platform you are on. "load" eliminates the need for this overhead and will just DWYM. Rules "load" has the following rules to decide what it thinks you want: o If the argument has any characters in it other than those matching "w", ":" or "'", it must be a file o If the argument matches only "[w:']", it must be a module o If the argument matches only "w", it could either be a module or a file. We will try to find "file.pm" first in @INC and if that fails, we will try to find "file" in @INC. If both fail, we die with the respective error messages. Caveats Because of a bug in perl (#19213), at least in version 5.6.1, we have to hardcode the path separator for a require on Win32 to be "/", like on Unix rather than the Win32 "". Otherwise perl will not read its own %INC accurately double load files if they are required again, or in the worst case, core dump. "Module::Load" cannot do implicit imports, only explicit imports. (in other words, you always have to specify explicitly what you wish to import from a module, even if the functions are in that modules' @EXPORT) ACKNOWLEDGEMENTS
Thanks to Jonas B. Nielsen for making explicit imports work. BUG REPORTS
Please report bugs or other issues to <bug-module-load@rt.cpan.org<gt>. AUTHOR
This module by Jos Boumans <kane@cpan.org>. COPYRIGHT
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Module::Load(3pm)
All times are GMT -4. The time now is 05:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy