Sponsored Content
Operating Systems Solaris Setting/Modifying variable specific to target in Makefile Post 302490172 by nsriram on Monday 24th of January 2011 06:36:05 AM
Old 01-24-2011
Setting/Modifying variable specific to target in Makefile

Hi,

I have a small piece of Makefile script which throw's error on Sun Sparc machine, but works fine with Sun Optron, Linux, AIX machines.
Code:
FOO=Naveen
test1:FOO=Dhilip

test1:
@echo FOO is ${FOO}

test2:
@echo Me is ${FOO}

Output on Sun Sparc -
Code:
ukhml-v890new-~/test: make test1
make: *** No rule to make target `FOO=Dhilip', needed by `test1'. Stop.

Output on Sun Optron -
Code:
ukhml-helios-~/shivtest: make test1
FOO is Dhilip

Anyone has an idea, why this syntax error thrown on Sun Sparc ?

Regards.,
Naveen Sriram.

Moderator's Comments:
Mod Comment Please use code tags

Last edited by Yogesh Sawant; 02-01-2011 at 05:00 AM..
 

10 More Discussions You Might Find Interesting

1. Solaris

Makefile:57: *** multiple target patterns. Stop.

Hi, I am getting the following error while building on Solaris 64 , while I am trying to build. Error Snippet :- ---------------------- Makefile:57: *** multiple target patterns. Stop. make: Leaving directory `/work1/patch/vds6053sun64o/vobs/jvi' make: *** Error 2 make: Leaving directory... (0 Replies)
Discussion started by: nileshborate
0 Replies

2. Shell Programming and Scripting

Setting environment variables in Makefile

I've seen a few other threads like this, but they either went unanswered or failed to answer my question. How do I set an environment variable in a Makefile? What I'm trying to do is use GNU make to automate an ant build. In order to run ant, I've got to first set a few environment... (1 Reply)
Discussion started by: Bags
1 Replies

3. HP-UX

Oracle 9i install: Error in invoking target install of makefile

I receive an error while installing Oracle 9i: Error in invoking target install of makefile /opt/oracle/product/9.2.0/sqlplus/lib/ins_sqlplus.mk Furthermore: $ whoami oracle $ echo $ORACLE_HOME /opt/oracle/product/9.2.0 $ pwd /opt/oracle/product/9.2.0/sqlplus/lib $ ll total... (5 Replies)
Discussion started by: chris2005
5 Replies

4. Shell Programming and Scripting

Makefile debug target

Hello, I'm having a problem with a makefile script i'm trying to write. I want to compile a C++ program in two possible ways: "make" (default target, main) and "make debug". When i supply the debug target, exactly the same as main should be built, but then with the DEBUG flag (-g -D... (2 Replies)
Discussion started by: StevenR
2 Replies

5. Shell Programming and Scripting

modifying specific lines a file

Hi I need to modify entire file starting from the 3 line. file looks like this filename : exp first line second 1,"wes","est","ws" 1,"was","qwe","qwa" also i have to replace the third content from 3 line by a counter . so the output should look like this: first line second... (12 Replies)
Discussion started by: ciba
12 Replies

6. Programming

Makefile: multiple target variable substitution

Greetings! Basically, I would like to properly handle this with gnu make: alltools: my_tool mysecond_tool mythird_tool etc_tool %_tool: dir1/%_tool.vf dir2/%_tool/subdir2/%_tool.ver <tab>@echo done %.vf: <tab>RUN_VF $* %.ver: <tab>RUN_VER $* So, if I were to do something like:... (0 Replies)
Discussion started by: Harlinator
0 Replies

7. Shell Programming and Scripting

MakeFile Backup Target

Goal: I'm trying to create a PHONY target inside my Makefile so that when I run the command "make backup", It will move all the files that end in "~" into the specified backup folder. Here is my code currently, and I'll explain the problem after: .PHONY: backup backup: @mkdir -p... (2 Replies)
Discussion started by: Xploit
2 Replies

8. Programming

How to define dynamic Target/Prerequisite in Makefile?

I am writing a Makefile for Cobol on Linux.My sample Makefile looks like below. I do not want to Hardcode Program names in Makefile.Is there any way we can mention directories in Target and Prerequisites instead of File names sothat Makefile Pickup all the files in mentioned path as below.... (8 Replies)
Discussion started by: kiranksb
8 Replies

9. Shell Programming and Scripting

rsync delete specific files - from different target folder

Hi, I need to use rsync to delete multiple files(only specified files not all) using --delete option, these files are located in different target folders. Instead of running rsync command multiple times for each file, can we achieve this with one time execution? your help is much... (0 Replies)
Discussion started by: MVEERA
0 Replies

10. Programming

Makefile No rule to make target

I am trying to create a makefile to build a program and am getting the following error: make -f tsimplex.mk make: *** No rule to make target `/main/tsimplex_main.cpp', needed by `tsimplex_main.o'. Stop. OPSYS = $(shell uname -s ) TARGET = tsimplex ROOTDIR = ../../.. GTSDIR =... (1 Reply)
Discussion started by: kristinu
1 Replies
PPIx::Utilities::Statement(3)				User Contributed Perl Documentation			     PPIx::Utilities::Statement(3)

NAME
PPIx::Utilities::Statement - Extensions to PPI::Statement. VERSION
This document describes PPIx::Utilities::Statement version 1.1.0. SYNOPSIS
use PPI::Document qw< >; use PPIx::Utilities::Statement qw< get_constant_name_elements_from_declaring_statement >; my $document = PPI::Document->new('Readonly::Scalar my $THINGY => 47.2;'); # Returns the PPI::Token::Symbol for "$THINGY". my ($constant) = get_constant_name_elements_from_declaring_statement( $document->schild(0) ); DESCRIPTION
This is a collection of functions for dealing with PPI::Statements. INTERFACE
Nothing is exported by default. "get_constant_name_elements_from_declaring_statement($statement)" Given a PPI::Statement, if the statement is a Readonly or Const::Fast declaration statement or a "use constant", returns the names of the things being defined. Given use constant 1.16 FOO => 'bar'; this will return the PPI::Token::Word containing 'FOO'. Given use constant 1.16 { FOO => 'bar', 'BAZ' => 'burfle' }; this will return a list of the PPI::Tokens containing 'FOO' and 'BAZ'. Similarly, given Readonly::Hash my %FOO => ( bar => 'baz' ); or const my %FOO => ( bar => 'baz' ); this will return the PPI::Token::Symbol containing '%FOO'. BUGS AND LIMITATIONS
Please report any bugs or feature requests to "bug-ppix-utilities@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. AUTHOR
Thomas R. Wyant, III "<wyant at cpan dot org>" COPYRIGHT
Copyright (c) 2009-2010 Thomas R. Wyant, III. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.16.3 2010-12-02 PPIx::Utilities::Statement(3)
All times are GMT -4. The time now is 09:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy