LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-26-2009, 11:02 PM   #1
sahil.jammu
Member
 
Registered: Jun 2008
Distribution: Ubuntu
Posts: 83

Rep: Reputation: 15
Modifications in Makefile - - any pointers!!


Hi,

I was getting argument list too long message for compilation and for that makefile needs to be tweaked as number of arguments passing was exceeding the limit defined in kernel - Linux.h

Orignal Makefile :-


--------------
$(call MultiFileRule,$(CASN_TAG),$(CASN_COBJ) $(CASN_HOBJ),$(CASN_SRCS),\
$(MKPREFIL) $(CASN) $(ASN2C) $(ASN2PER) $(ASN4SDT),$(ASN_CMD)$\
"ASN-SCRIPT $(CASN_TAG) [$(ASN1_MODULES_ALL)]")
--------------
--------------
define ASN_CMD
$(MKPREFIL) -option-file=$(OPT_FILE) $(ASN_PATH) $(ASN1_MODULES_ALL) && \
$(CASN) $(CASN_P_OPTS) $(ASN1_MODULES_ALL) && \
$(ASN2PER) $(ASN2PER_OPTS) $(ASN1_MODULES_ALL) && \
$(CASN) $(CASN_OPTS) $(ASN1_MODULES_ALL) && \
$(ASN2C) $(ASN2C_OPTS) $(ASN1_MODULES_ALL) && \
$(ASN4SDT) $(ASN4S_OPTS_P) $(ASN1_MODULES_P) && \
$(ASN4SDT) $(ASN4S_OPTS_B) $(ASN1_MODULES_B) Endef
--------------

I modified the define_cmd part :-

define ASN_CMD1
$(MKPREFIL) -option-file=$(OPT_FILE) $(ASN_PATH) $(ASN1_MODULES_ALL)
endef

define ASN_CMD2
$(CASN) $(CASN_P_OPTS) $(ASN1_MODULES_ALL)
endef


define ASN_CMD3
$(ASN2PER) $(ASN2PER_OPTS) $(ASN1_MODULES_ALL)
endef

define ASN_CMD4
$(CASN) $(CASN_OPTS) $(ASN1_MODULES_ALL)
endef


define ASN_CMD5
$(ASN2C) $(ASN2C_OPTS) $(ASN1_MODULES_ALL)
endef

define ASN_CMD6
$(ASN4SDT) $(ASN4S_OPTS_P) $(ASN1_MODULES_P)
endef

define ASN_CMD7
$(ASN4SDT) $(ASN4S_OPTS_B) $(ASN1_MODULES_B)
endef



-------
$(call MultiFileRule,$(CASN_TAG),$(CASN_COBJ) $(CASN_HOBJ),$(CASN_SRCS),\
$(MKPREFIL) $(CASN) $(ASN2C) $(ASN2PER) $(ASN4SDT),$(ASN_CMD1) $(ASN_CMD2) $(ASN_CMD3) $(ASN_CMD4) $(ASN_CMD5) $(ASN_CMD
6) $(ASN_CMD7) ,\
"ASN-SCRIPT $(CASN_TAG) [$(ASN1_MODULES_ALL)]")
-------

This call multifile rule also needs to be split....as i am getting the same error even after changes. And i feel its mainly bcos the number of arguments used in call multifile rule is also increasing the limits.


Any suggestions??
 
Old 07-30-2009, 04:23 AM   #2
sahil.jammu
Member
 
Registered: Jun 2008
Distribution: Ubuntu
Posts: 83

Original Poster
Rep: Reputation: 15
Make file small clarification

Hi,


Just had small doubt :-

In my makefile i have defined a module as ASN_CMD (comprised of 7 lines)

and in call multifile rule i am calling it as $(ASN_CMD)

now i need to split this define part to reduce the number of arguments i am passing in one line.

i have changed the definition as :-

define ASN_CMD1
---------
---------
endef

define ASN_CMD2
--------
--------
endef



define ASN_CMDn
---
---
endef


now in calling part i am calling it as :-

($(ASN_CMD1)$(ASN_CMD2) $(ASN_CMD3)...........$(ASN_CMDn))


Just a small doubt:-

the value of $(ASN_CMD) - - -original ....may or may not be equal to value of ($(ASN_CMD1)$(ASN_CMD2) $(ASN_CMD3)...........$(ASN_CMDn))

as need to take care of concatenation part as well...

can ne1 suggest the way out to split the makefile...!!

COmplete details @ :-

http://www.linuxquestions.org/questi...inters-743002/
 
Old 07-30-2009, 09:04 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,806

Rep: Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179Reputation: 4179
Quote:
Originally Posted by sahil.jammu View Post
Hi,


Just had small doubt :-

In my makefile i have defined a module as ASN_CMD (comprised of 7 lines)

and in call multifile rule i am calling it as $(ASN_CMD)

now i need to split this define part to reduce the number of arguments i am passing in one line.

i have changed the definition as :-

define ASN_CMD1
---------
---------
endef

define ASN_CMD2
--------
--------
endef



define ASN_CMDn
---
---
endef


now in calling part i am calling it as :-

($(ASN_CMD1)$(ASN_CMD2) $(ASN_CMD3)...........$(ASN_CMDn))


Just a small doubt:-

the value of $(ASN_CMD) - - -original ....may or may not be equal to value of ($(ASN_CMD1)$(ASN_CMD2) $(ASN_CMD3)...........$(ASN_CMDn))

as need to take care of concatenation part as well...

can ne1 suggest the way out to split the makefile...!!

COmplete details @ :-

http://www.linuxquestions.org/questi...inters-743002/
Please don't double-post the same question....
 
Old 07-30-2009, 12:32 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,570

Rep: Reputation: 171Reputation: 171
Moderator note: I have merged the threads as it's very hard to read them separately.
 
Old 07-31-2009, 12:26 PM   #5
sahil.jammu
Member
 
Registered: Jun 2008
Distribution: Ubuntu
Posts: 83

Original Poster
Rep: Reputation: 15
Guys,

Any inputs on this???????????
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it mandatory to have the name of the makefile as 'Makefile' for kernal module comp narender.d Linux - Kernel 3 05-29-2009 06:26 AM
makefiles and modifications disruptive Programming 1 04-26-2008 08:05 PM
grafburn modifications. gandhul Grafpup 6 07-03-2007 12:35 PM
nested makefile? Any good pointers? pir Programming 2 01-25-2006 06:15 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration