LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   "make" does not work with command line arguements (https://www.linuxquestions.org/questions/linux-general-1/make-does-not-work-with-command-line-arguements-631575/)

%$hfydt%$ 03-29-2008 03:44 PM

"make" does not work with command line arguements
 
when I type "make arch=arm help" I get output for
the default i386 architecture instead of for the ARM architecture. This also leads to problems with cross compilation for the ARM platform. Top level Makefile appears to be where problem starts but I can't see it.

Thanks for any help

cmnorton 03-29-2008 04:04 PM

Where's the Makefile Section?
 
Why not post enough of the makefile here, so someone can look at it?

%$hfydt%$ 03-29-2008 04:18 PM

SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ )

# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
#
# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:
# make ARCH=ia64
# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.

# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile

ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=



if I change to ARCH = arm, it will work, but this is an unacceptable bandaid.

cmnorton 03-30-2008 02:42 PM

Is symbol defined correctly?
 
I thought symbols were defined

MYMODS=mod1.o mod2.o mod3.o

tredegar 03-30-2008 04:19 PM

Quote:

if I change to ARCH = arm, it will work, but this is an unacceptable bandaid.
Why is it "unacceptable" ?

%$hfydt%$ 03-30-2008 06:06 PM

why is it unacceptable ??
 
you never want to hard variables, especially envirionment variables in makefiles. Are you familiar with the kernel configuration subsystem?

tredegar 03-31-2008 12:27 PM

Oooooo Kkkkkkk.
Now I begin to understand the question.
Are you familiar with asking questions?

cmnorton 04-01-2008 10:59 AM

Additional Information
 
Quote:

Originally Posted by cmnorton (Post 3105144)
I thought symbols were defined

MYMODS=mod1.o mod2.o mod3.o

This post is in response to an external email I received.

I am not familiar with the subsystem for this makefile. I was curious as to how the symbol had been defined, and thought that might me one of the problems.


All times are GMT -5. The time now is 02:46 PM.