What is wrong with this makefile fragment?

What is wrong with this makefile fragment?

Post by Marc » Sat, 28 Jun 2003 21:52:27



Here is the beginning of the makefile I wrote

include stdmk_nt

!IF "$(VBROKERVER)" == "4" || "$(VBROKERVER)" == "VB4" || "$(VBROKERVER)" ==
"VBC4"
        CCFLAGS = $(CCFLAGS)
!ELSE
        CCFLAGS = $(CCFLAGS)
!ENDIF

And I am getting the following error while running nmake -f Makefile:

        CCFLAGS =  -I. -Iv:\\include -Iv:\\include\stubs
'CCFLAGS' is not recognized as an internal or external command,

This while in another makefile 'stdmk_nt' totally equal statements are
written, that do not give an error. I am puzzled, I am probably doing
something really stupid, but I am trying several things for about an hour
now. What is this? In stdmk_nt there are lots of simular statements like:

!IF "$(BUILD_TYPE)" == "debug" || "$(BUILD_TYPE)" == "DEBUG"
        DEBUG = 1
!ENDIF

### Compiler flags
CCFLAGS = $(CCINCLUDES) $(DEBUG) $(CCDEFS)

and that  all works....

 
 
 

What is wrong with this makefile fragment?

Post by Lew Pitche » Sat, 28 Jun 2003 22:00:04



> Here is the beginning of the makefile I wrote

> include stdmk_nt

> !IF "$(VBROKERVER)" == "4" || "$(VBROKERVER)" == "VB4" || "$(VBROKERVER)" ==
> "VBC4"
>         CCFLAGS = $(CCFLAGS)
> !ELSE
>         CCFLAGS = $(CCFLAGS)
> !ENDIF

> And I am getting the following error while running nmake -f Makefile:

>         CCFLAGS =  -I. -Iv:\\include -Iv:\\include\stubs
> 'CCFLAGS' is not recognized as an internal or external command,

First off, the main problem is that you are using an MSDOS/MSWindows
Makefile on a Unix system. File and directory names are not compatable
between the two, and you'll have to correct your Makefile to point to the
proper Unix directories using the proper pathname format.

--

Lew Pitcher, IT Consultant, Application Architecture
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)

 
 
 

What is wrong with this makefile fragment?

Post by Ralf Fasse » Sat, 28 Jun 2003 22:21:27



|         CCFLAGS = $(CCFLAGS)

Infinite Recursion?

And to your original question `What is wrong with this makefile
fragment': it is written for the wrong platform to be discussed in
this group.  It isn't even written for `make'.

R'

 
 
 

What is wrong with this makefile fragment?

Post by Marc » Sat, 28 Jun 2003 22:42:28



Quote:> And to your original question `What is wrong with this makefile
> fragment': it is written for the wrong platform to be discussed in
> this group.  It isn't even written for `make'.

You are right,  I have to write it for unix/dos both, anyway, changing a tab
to a space worked. It's probably a bug in nmake.?
 
 
 

What is wrong with this makefile fragment?

Post by Ralf Fasse » Sat, 28 Jun 2003 23:53:55



| I have to write it for unix/dos both, anyway,

On which Unix platform does nmake run?

| changing a tab to a space worked. It's probably a bug in nmake.?

Yup, TAB vs. SPC is always a problem in makefile.  Though I never
experienced a problem with the context of your problem with
`make/gmake' Makefiles.

R'

 
 
 

What is wrong with this makefile fragment?

Post by llewell » Sun, 29 Jun 2003 10:36:53




> | I have to write it for unix/dos both, anyway,

> On which Unix platform does nmake run?

M$ Visual Studio comes with a creature called nmake (which the OP
    appears to be using.) It has make-like syntax, but I've never
    actually seen a makefile that works for both (any) unix make and
    M$ nmake, though M$ claims they are possibile.

I have no idea if M$ nmake has anything to do with plan9 nmake.    
[snip]