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
Makefile::AST(3pm)					User Contributed Perl Documentation					Makefile::AST(3pm)

NAME
Makefile::AST - AST for (GNU) makefiles DESCRIPTION
The structure of this (GNU) makefile AST is designed based on GNU make's data base listing output produced by "--print-data-base". This AST library provides the following classes: Makefile::AST The primary class for ASTs. Provides interface for node adding and querying, such as "add_implicit_rule", "apply_implicit_rules", "add_explicit_rule", "apply_explicit_rules", "add_var", "add_auto_var", "get_var", as well as lots of other utility functions, like method "eval_var_value" for computing the ultimate values of makefile variables, method "enter_pad" and "leave_pad" for local variable's scoping pad. Makefile::AST::Rule::Base This is the base class for the rule nodes in the AST. It has properties like "normal_prereqs", "order_prereqs", "commands", and "colon". Makefile::AST::Rule This class represents the de-sugared form of simple rules and implicite rules after application. It inherits from Makefile::AST::Rule::Base, and adds new properties "target" and "other_targets". Makefile::AST::Rule::Implicit This class represents the implicit rule nodes in the AST. It inherits from Makefile::AST::Rule::Base, and adds new properties "targets", "match_anything", and "is_terminal". Makefile::AST::StemMatch This class encapsulates the file pattern matching (file names containing "%") and stem substitution algorithms. Makefile::AST::Variable It represents the makefile variable nodes in the AST, including "name", "value", "flavor", and "origin". Makefile::AST::Command Used to encapsulate information regarding makefile rule commands (e.g. command body, command modifiers "@", "-", "+", and etc.) as a whole. LIMITATIONS AND TODO
Adding support for other flavors' makes into this AST library should make a huge amount of sense. The most interesting candiate is Microsoft's NMAKE. CODE REPOSITORY
For the very latest version of this script, check out the source from http://github.com/agentzh/makefile-parser-pm <http://github.com/agentzh/makefile-parser-pm>. There is anonymous access to all. AUTHOR
Zhang "agentzh" Yichun "<agentzh@gmail.com>" COPYRIGHT AND LICENSE
Copyright (c) 2007-2008 by Zhang "agentzh" Yichun (agentzh). This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Makefile::AST::Evaluator, Makefile::Parser::GmakeDB, makesimple, pgmake-db, Makefile::DOM. perl v5.12.4 2011-08-17 Makefile::AST(3pm)
All times are GMT -4. The time now is 07:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy