all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Management C Project Files with Emacs?
@ 2007-03-28 19:15 Daniel
  2007-03-28 20:28 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel @ 2007-03-28 19:15 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

If I want to compile a large project like Linux Kernel, I don't know
how I can use emacs.

1. For example, if I modified <linux>/drivers/usb/core/hcd.c with
emacs, then How I can compile linux kernel by M-x compile command?
When I do the command, it is saying that there is no makefile. So, I
use "M-x compile RET make -f /usr/src/linux/makefile", but it
complains that there is no definition of u32 etc. How do I do that?

2. Whenever opening a file, it seems that emacs change current
directory. So, I cannot simply type "M-x compile RET make". Is there
anyway to have emacs to stick on specific directory?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Management C Project Files with Emacs?
  2007-03-28 19:15 Management C Project Files with Emacs? Daniel
@ 2007-03-28 20:28 ` Peter Dyballa
       [not found] ` <mailman.1551.1175113870.7795.help-gnu-emacs@gnu.org>
  2007-03-28 23:15 ` Colin S. Miller
  2 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2007-03-28 20:28 UTC (permalink / raw)
  To: Daniel; +Cc: help-gnu-emacs


Am 28.03.2007 um 21:15 schrieb Daniel:

> If I want to compile a large project like Linux Kernel, I don't know
> how I can use emacs.

I remember that I was using rpm to build the kernel in shell ... and  
when you rename this buffer (to *kernel* for example), you can create  
a new *shell* buffer.

--
Greetings

   Pete      <\
              _\     O  _
             |o \  _\\_/-\='
_____________(_)|-(_)  (_)___________________________________

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Management C Project Files with Emacs?
       [not found] ` <mailman.1551.1175113870.7795.help-gnu-emacs@gnu.org>
@ 2007-03-28 20:59   ` Daniel
  2007-03-28 21:50     ` Peter Dyballa
       [not found]     ` <mailman.1554.1175118763.7795.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel @ 2007-03-28 20:59 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 28, 1:28 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 28.03.2007 um 21:15 schrieb Daniel:
>
> > If I want to compile a large project like Linux Kernel, I don't know
> > how I can use emacs.
>
> I remember that I was using rpm to build the kernel in shell ... and
> when you rename this buffer (to *kernel* for example), you can create
> a new *shell* buffer.
>
> --
> Greetings
>
>    Pete      <\
>               _\     O  _
>              |o \  _\\_/-\='
> _____________(_)|-(_)  (_)___________________________________

Thank you for your response, but that does not seem to be not what I
want.

First, the kernel compile is just for example to show for building big
project.
Second, I don't understand how I rename the buffer name, and how
creating a new *shell* buffer would help me out to compile.

Daniel.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Management C Project Files with Emacs?
  2007-03-28 20:59   ` Daniel
@ 2007-03-28 21:50     ` Peter Dyballa
       [not found]     ` <mailman.1554.1175118763.7795.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2007-03-28 21:50 UTC (permalink / raw)
  To: Daniel; +Cc: help-gnu-emacs


Am 28.03.2007 um 22:59 schrieb Daniel:

> First, the kernel compile is just for example to show for building big
> project.

What about X11R7.2? Less bleeding edge would be X11R7.1. The latter  
one takes for me a few hours – is this big enough? (Editing the  
build.sh script, or better a working copy of it, you can reduce the  
amount of X clients, libraries, and servers that get compiled.)

> Second, I don't understand how I rename the buffer name, and how
> creating a new *shell* buffer would help me out to compile.

	M-x rename-buffer RET new name RET
	M-x shell RET

A new *shell* buffer would allow you to do other things in it while  
the kernel is compiled in the previous one ...

--
Greetings

   Pete

What’s the difference between OS X and Vista?

Microsoft employees are excited about OS X…

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Management C Project Files with Emacs?
  2007-03-28 19:15 Management C Project Files with Emacs? Daniel
  2007-03-28 20:28 ` Peter Dyballa
       [not found] ` <mailman.1551.1175113870.7795.help-gnu-emacs@gnu.org>
@ 2007-03-28 23:15 ` Colin S. Miller
  2007-03-29  0:00   ` Daniel
  2007-03-29  0:20   ` Hadron
  2 siblings, 2 replies; 8+ messages in thread
From: Colin S. Miller @ 2007-03-28 23:15 UTC (permalink / raw)
  To: help-gnu-emacs

Daniel wrote:
> Hi,
> 
> If I want to compile a large project like Linux Kernel, I don't know
> how I can use emacs.
> 
> 
> 2. Whenever opening a file, it seems that emacs change current
> directory. So, I cannot simply type "M-x compile RET make". Is there
> anyway to have emacs to stick on specific directory?
> 

These easiest way to do this is to change the compile line to

cd /path/to/src/ && make -f Makefile ALL


HTH,
Colin S. Miller


-- 
Replace the obvious in my email address with the first three letters of the hostname to reply.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Management C Project Files with Emacs?
       [not found]     ` <mailman.1554.1175118763.7795.help-gnu-emacs@gnu.org>
@ 2007-03-28 23:58       ` Daniel
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel @ 2007-03-28 23:58 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 28, 2:50 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 28.03.2007 um 22:59 schrieb Daniel:
>
> > First, the kernel compile is just for example to show for building big
> > project.
>
> What about X11R7.2? Less bleeding edge would be X11R7.1. The latter
> one takes for me a few hours - is this big enough? (Editing the
> build.sh script, or better a working copy of it, you can reduce the
> amount of X clients, libraries, and servers that get compiled.)
>
> > Second, I don't understand how I rename the buffer name, and how
> > creating a new *shell* buffer would help me out to compile.
>
>         M-x rename-buffer RET new name RET
>         M-x shell RET
>
> A new *shell* buffer would allow you to do other things in it while
> the kernel is compiled in the previous one ...
>
> --
> Greetings
>
>    Pete
>
> What's the difference between OS X and Vista?
>
> Microsoft employees are excited about OS X...

Thank you, Pete. X11R7.1 or 2 could be big project enough.
Thank you for the response, and now I could get how to rename buffer.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Management C Project Files with Emacs?
  2007-03-28 23:15 ` Colin S. Miller
@ 2007-03-29  0:00   ` Daniel
  2007-03-29  0:20   ` Hadron
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel @ 2007-03-29  0:00 UTC (permalink / raw)
  To: help-gnu-emacs

On Mar 28, 4:15 pm, "Colin S. Miller" <no-spam-
thank-...@csmiller.demon.co.uk> wrote:
> Daniel wrote:
> > Hi,
>
> > If I want to compile a large project like Linux Kernel, I don't know
> > how I can use emacs.
>
> > 2. Whenever opening a file, it seems that emacs change current
> > directory. So, I cannot simply type "M-x compile RET make". Is there
> > anyway to have emacs to stick on specific directory?
>
> These easiest way to do this is to change the compile line to
>
> cd /path/to/src/ && make -f Makefile ALL
>
> HTH,
> Colin S. Miller
>
> --
> Replace the obvious in my email address with the first three letters of the hostname to reply.

Hi Colin,

That is good idea.

Moreover, I also find I could make it this:
     M-x make RET make -C /usr/src/linux RET
Above make option indicates the root directory for the make no matter
where I am in.

Thank you guys, it was helpful to me.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Management C Project Files with Emacs?
  2007-03-28 23:15 ` Colin S. Miller
  2007-03-29  0:00   ` Daniel
@ 2007-03-29  0:20   ` Hadron
  1 sibling, 0 replies; 8+ messages in thread
From: Hadron @ 2007-03-29  0:20 UTC (permalink / raw)
  To: help-gnu-emacs

"Colin S. Miller" <no-spam-thank-you@csmiller.demon.co.uk> writes:

> Daniel wrote:
>> Hi,
>>
>> If I want to compile a large project like Linux Kernel, I don't know
>> how I can use emacs.
>>
>>
>> 2. Whenever opening a file, it seems that emacs change current
>> directory. So, I cannot simply type "M-x compile RET make". Is there
>> anyway to have emacs to stick on specific directory?
>>
>
> These easiest way to do this is to change the compile line to
>
> cd /path/to/src/ && make -f Makefile ALL
>
>
> HTH,
> Colin S. Miller

This would be really limiting at a later date. Better to open the
makefile or the c file you are interested in so emacs deafults to the
right directory when you then make.

Here is my compile command:

(defun my-compile ()
  (lambda ()
    (unless (file-exists-p "Makefile")
      (set (make-local-variable 'compile-command)
	   ;; emulate make's .c.o implicit pattern rule, but with
	   ;; different defaults for the CC, CPPFLAGS, and CFLAGS
	   ;; variables:
	   ;; $(CC) -c -o $@ $(GTKFLAGS) $(CPPFLAGS) $(CFLAGS) $<
	   (let ((file (file-name-nondirectory buffer-file-name)))
	     (format "%s -o %s %s %s %s %s"
		     (or (getenv "CC") "gcc")
		     (file-name-sans-extension file)
		     (or (getenv "GTKFLAGS") "")
		     (or (getenv "CPPFLAGS")"-DDEBUG=9")
		     (or (getenv "CFLAGS") "-std=c99 -pedantic -Wall -Werror -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion  -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -g")
		     file)))))
  )



-- 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2007-03-29  0:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-28 19:15 Management C Project Files with Emacs? Daniel
2007-03-28 20:28 ` Peter Dyballa
     [not found] ` <mailman.1551.1175113870.7795.help-gnu-emacs@gnu.org>
2007-03-28 20:59   ` Daniel
2007-03-28 21:50     ` Peter Dyballa
     [not found]     ` <mailman.1554.1175118763.7795.help-gnu-emacs@gnu.org>
2007-03-28 23:58       ` Daniel
2007-03-28 23:15 ` Colin S. Miller
2007-03-29  0:00   ` Daniel
2007-03-29  0:20   ` Hadron

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.