Sponsored Content
Full Discussion: Make and gmake issues
Operating Systems Solaris Make and gmake issues Post 302801591 by Revathi R on Thursday 2nd of May 2013 09:50:48 AM
Old 05-02-2013
Make and gmake issues

Hello
I am working on a CPP code written for SUN CC 5.5
and make
we used make to compile the code then it compilation went smooth
now i am using gmake:
I have a make file like this
Code:
WSROOT=..
include $(WSROOT)/etc/wsmkinclude.common
all:
        @for subdir in */Makefile; \
          do \
            echo "+ Making $@ in `dirname $$subdir` ..."; \
            (cd `dirname $$subdir`; make $(MAKEFLAGS) $@); \
          done

.DEFAULT:
        @for subMake in */Makefile; \
          do \
            if [ -f $$subMake ]; then \
            echo "+ Making $@ in `pwd`/`dirname $$subMake` ..."; \
            (cd `dirname $$subMake`; make $(MAKEFLAGS) $@); \
            fi; \
          done

and $(WSROOT)/etc/wsmkinclude.common is

Code:
all : check_options
sqlpath_chk:sh= \
        if [ ${SQLPATH:-NOTDEFINED} = NOTDEFINED ] ;\
         then \
             echo NOTDEFINED ;\
         else \
             echo ${SQLPATH} ;\
        fi
ora_version:sh= \
        if [ ${ORACLE_VERS:-NOTDEFINED} = NOTDEFINED ] ;\
         then \
             echo NOTDEFINED ;\
         else \
             echo ${ORACLE_VERS} ;\
        fi
product_name:sh= \
        if [ ${WM_PRODUCT:-NOTDEFINED} = NOTDEFINED ] ;\
         then \
             echo NOTDEFINED ;\
         else \
             echo ${WM_PRODUCT} ;\
        fi
check_options :
        @if [ ${sqlpath_chk} = NOTDEFINED ] ;\
          then \
            echo 'The environment variable SQLPATH is not defined' ;\
            echo ' ' ;\
            echo 'This should have $$FLEXPM_HOME/config at a minimum' ;\
            echo ' ' ;\
            exit 1 ; \
        fi ;\
        if [ ${product_name} = NOTDEFINED ] ;\
          then \
            echo 'The environment variable WM_PRODUCT is not defined' ;\
            exit 1 ; \
        fi ;\
        case ${ora_version} in \

some extra content also there


when i did
Code:
$gmake
/bin/sh: syntax error at line 15: `NOTDEFINED' unexpected
gmake: *** [check_options] Error 2


Last edited by zaxxon; 05-02-2013 at 10:59 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

gmake

Can somebody tell me about "gmake "utility and its apparent advantage with "Imake" and "Make".??? can somebody send me the URLs where I can get more material on above topics? (1 Reply)
Discussion started by: Abhishek
1 Replies

2. AIX

gmake For AIX 5.3

hello everybody i will be very thankful if someone tells me where i can find the gmake for AIX 5.3 (2 Replies)
Discussion started by: eternalflame
2 Replies

3. Programming

what is the distinguish between gmake and make?

I am working on solaris 9. and use gmake to compile and linke c/c++ program. anybody can tell me the distinguish between gmake and make? :confused: (10 Replies)
Discussion started by: robin.zhu
10 Replies

4. HP-UX

Perl, gmake and make software

Hi, I'm searching website where there is software for HP-UX operating system in free download because I must install Perl, Make and Gmake on HP-UX server. Have you goods URL for me ? Thank you very much! bye Staaan (2 Replies)
Discussion started by: staaan
2 Replies

5. UNIX for Advanced & Expert Users

build - make -gmake: execvp: mcu: Permission denied

Hi All, sorry it was application related.. i am deleting it Thanks & Regards Shihab (0 Replies)
Discussion started by: shihabvk
0 Replies

6. Programming

Two issues in make file, g++, gfortran

Question 1: I have a c++ project that I am trying to re-organize. I am trying to subdivide the src directory to move some src files that seldom are changed to a more out of the way location. The project is a c++ application with a fortran function called from the c. The reorganization went... (9 Replies)
Discussion started by: LMHmedchem
9 Replies

7. Programming

GMAKE error returns - What does that mean ?

I am using xmake which I guess calls gmake which ... whatever. I get an error in my compiling and want to know what the error number means. For example, the message might be "Error 139". Rather then post the exact code fragment and exact output, I want to find the a list of error codes and... (1 Reply)
Discussion started by: intcwrtr
1 Replies

8. UNIX for Dummies Questions & Answers

gmake on Mac

I am using my teminal on Mac to run some files with gmake, (I used unix before,but now I am trying to run it frm my mac) and I get the error message: -bash: gmake: command not found Any idea what the problem might be? Thanks! (10 Replies)
Discussion started by: cosmologist
10 Replies

9. Programming

Make and gmake issues

Hello I am working on a CPP code written for SUN CC 5.5 and make we used make to compile the code then it compilation went smooth now i am using gmake: I have a make file like this WSROOT=.. include $(WSROOT)/etc/wsmkinclude.common all: @for subdir in */Makefile; \ do \... (1 Reply)
Discussion started by: Revathi R
1 Replies

10. UNIX for Dummies Questions & Answers

Gmake

hi with regard that i am new with linux , i don't have any information about GNU make? is it a part of linux or it must be installed in linux separately? thanks in advance for you attention best regard fereshte (1 Reply)
Discussion started by: komijani
1 Replies
MAKE(1) 						      General Commands Manual							   MAKE(1)

NAME
make - a program for maintaining large programs SYNOPSIS
make [-f file] [-iknpqrst] [option] ... [target] OPTIONS
-f Use file as the makefile -i Ignore status returned by commands -k On error, skip to next command -n Report, but do not execute -p Print macros and targets -q Question up-to-dateness of target -r Rule inhibit; do not use default rules -s Silent mode -t Touch files instead of making them EXAMPLES
make kernel # Make kernel up to date make -n -f mfile # Tell what needs to be done DESCRIPTION
Make is a program that is normally used for developing large programs consisting of multiple files. It keeps track of which object files depend on which source and header files. When called, it does the minimum amount of recompilation to bring the target file up to date. The file dependencies are expected in makefile or Makefile , unless another file is specified with -f. Make has some default rules built in, for example, it knows how to make .s files from .c files. Here is a sample makefile . d=/user/ast # d is a macro program: head.s tail.s# program depends on these cc -o program head.s tail.s# tells how to make program echo Program done. # announce completion head.s: $d/def.h head.c # head.s depends on these tail.s: $d/var.h tail.c # tail.s depends on these A complete description of make would require too much space here. Many books on UNIX discuss make . Study the numerous Makefiles in the MINIX source tree for examples. SEE ALSO
cc(1). MAKE(1)
All times are GMT -4. The time now is 07:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy