all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Out of source compilation
@ 2019-09-01  3:57 Ergus
  2019-09-01  8:24 ` tomas
  0 siblings, 1 reply; 7+ messages in thread
From: Ergus @ 2019-09-01  3:57 UTC (permalink / raw)
  To: help-gnu-emacs

Hi:

Sorry if this is a too dumb question, but I don't find any related
reference.

What's the recommended method to do out of source compilation?  Right
now I am doing a cd dir && make. But maybe there is
something else, more complete?

Maybe a variable in the locals file?? Or a set command?

Thanks in advance,
Ergus



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

* Re: Out of source compilation
  2019-09-01  3:57 Out of source compilation Ergus
@ 2019-09-01  8:24 ` tomas
  2019-09-01 12:55   ` VanL
  2019-09-01 16:22   ` Ergus
  0 siblings, 2 replies; 7+ messages in thread
From: tomas @ 2019-09-01  8:24 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 897 bytes --]

On Sun, Sep 01, 2019 at 05:57:07AM +0200, Ergus wrote:
> Hi:
> 
> Sorry if this is a too dumb question, but I don't find any related
> reference.
> 
> What's the recommended method to do out of source compilation?

You are talking about compiling Emacs from source?

> Right now I am doing a cd dir && make. But maybe there is
> something else, more complete?
> 
> Maybe a variable in the locals file?? Or a set command?

If my guess above was right, it's easy (this is true of most well
managed "modern" Autotools projects):

 - just make yourself a build directory somewhere (in my case
   it's just a neighbour of the source dir, but that's not
   necessary)

 - cd to your build directory

 - call configure script from your build directory

 - the build machinery gets deployed in your build directory.

 - do there make && make install as usual.

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Out of source compilation
  2019-09-01  8:24 ` tomas
@ 2019-09-01 12:55   ` VanL
  2019-09-01 14:19     ` tomas
  2019-09-01 16:22   ` Ergus
  1 sibling, 1 reply; 7+ messages in thread
From: VanL @ 2019-09-01 12:55 UTC (permalink / raw)
  To: help-gnu-emacs

<tomas@tuxteam.de> writes:

> On Sun, Sep 01, 2019 at 05:57:07AM +0200, Ergus wrote:
>> Hi:
>> 
>> Sorry if this is a too dumb question, but I don't find any related
>> reference.
>> 
>> What's the recommended method to do out of source compilation?
>
> You are talking about compiling Emacs from source?

I was able to build the ordinary Emacs-26.3 source but EmacsMac is stuck.

  xxx% cd emacs-mac
  xxx% . ./autogen.sh 
  Checking whether you have the necessary tools...
  (Read INSTALL.REPO for more details on building Emacs)
  Checking for autoconf (need at least version 2.65) ... ok
  Your system has the required tools.
  Running 'autoreconf -fi -I m4' ...
  autom4te: cannot lock autom4te.cache/requests with mode 2: \
            Operation not supported
  autom4te: cannot lock autom4te.cache/requests with mode 2: \
            Operation not supported
  autom4te: cannot lock autom4te.cache/requests with mode 2: \
            Operation not supported
  Installing git hooks...
  cp: build-aux/git-hooks/ commit-msg pre-commit \
      prepare-commit-msg: No such file or directory
  ./autogen.sh:360: you have running jobs.
  
\help

>> Right now I am doing a cd dir && make. But maybe there is
>> something else, more complete?
>> 
>> Maybe a variable in the locals file?? Or a set command?
>
> If my guess above was right, it's easy (this is true of most well
> managed "modern" Autotools projects):
>
>  - just make yourself a build directory somewhere (in my case
>    it's just a neighbour of the source dir, but that's not
>    necessary)
>
>  - cd to your build directory
>
>  - call configure script from your build directory
>
>  - the build machinery gets deployed in your build directory.
>
>  - do there make && make install as usual.
                  ^
                  +--- Is it possible to set the target install-dir
                       after `make' soas not to confuse existing installs?

-- 
© 2019 VanL
gpg using EEF2 37E9 3840 0D5D 9183  251E 9830 384E 9683 B835
          'If the bug bites don't fight it.' - Nancy S. Steinhardt




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

* Re: Out of source compilation
  2019-09-01 12:55   ` VanL
@ 2019-09-01 14:19     ` tomas
  0 siblings, 0 replies; 7+ messages in thread
From: tomas @ 2019-09-01 14:19 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

On Sun, Sep 01, 2019 at 10:55:37PM +1000, VanL wrote:
> <tomas@tuxteam.de> writes:
> 
> > On Sun, Sep 01, 2019 at 05:57:07AM +0200, Ergus wrote:
> >> Hi:
> >> 
> >> Sorry if this is a too dumb question, but I don't find any related
> >> reference.
> >> 
> >> What's the recommended method to do out of source compilation?
> >
> > You are talking about compiling Emacs from source?
> 
> I was able to build the ordinary Emacs-26.3 source but EmacsMac is stuck.

Can't help with Mac, sorry :-/

Cheers
-- t

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: Out of source compilation
  2019-09-01  8:24 ` tomas
  2019-09-01 12:55   ` VanL
@ 2019-09-01 16:22   ` Ergus
  2019-09-01 16:52     ` Óscar Fuentes
  2019-09-01 17:12     ` tomas
  1 sibling, 2 replies; 7+ messages in thread
From: Ergus @ 2019-09-01 16:22 UTC (permalink / raw)
  To: tomas; +Cc: help-gnu-emacs

No, sorry I explained wrong myself ;)

I was asking about using the M-x compile command in general. So use
compilation buffers, recompile, goto-next-error and so on.

When compiling in source it is almost trivial, but when the building
directory is out of sources (like cmake does by default) I don't know if
there is a way to tell to emacs that the compilation directory is
somewhere else. 

On Sun, Sep 01, 2019 at 10:24:30AM +0200, tomas@tuxteam.de wrote:
>On Sun, Sep 01, 2019 at 05:57:07AM +0200, Ergus wrote:
>> Hi:
>>
>> Sorry if this is a too dumb question, but I don't find any related
>> reference.
>>
>> What's the recommended method to do out of source compilation?
>
>You are talking about compiling Emacs from source?
>
>> Right now I am doing a cd dir && make. But maybe there is
>> something else, more complete?
>>
>> Maybe a variable in the locals file?? Or a set command?
>
>If my guess above was right, it's easy (this is true of most well
>managed "modern" Autotools projects):
>
> - just make yourself a build directory somewhere (in my case
>   it's just a neighbour of the source dir, but that's not
>   necessary)
>
> - cd to your build directory
>
> - call configure script from your build directory
>
> - the build machinery gets deployed in your build directory.
>
> - do there make && make install as usual.
>
>Cheers
>-- t





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

* Re: Out of source compilation
  2019-09-01 16:22   ` Ergus
@ 2019-09-01 16:52     ` Óscar Fuentes
  2019-09-01 17:12     ` tomas
  1 sibling, 0 replies; 7+ messages in thread
From: Óscar Fuentes @ 2019-09-01 16:52 UTC (permalink / raw)
  To: help-gnu-emacs

Ergus <spacibba@aol.com> writes:

> No, sorry I explained wrong myself ;)
>
> I was asking about using the M-x compile command in general. So use
> compilation buffers, recompile, goto-next-error and so on.
>
> When compiling in source it is almost trivial, but when the building
> directory is out of sources (like cmake does by default)

No, CMake does not build out of source by default. CMake uses the
current directory by default :-)

> I don't know if
> there is a way to tell to emacs that the compilation directory is
> somewhere else. 

No that I know of, that's because I rolled my own.

On Emacs proper, there is project.el which has a TODO about
project-build:

;; * Build tool related functionality.  Start with a `project-build'
;;   command, which should provide completions on tasks to run, and
;;   maybe allow entering some additional arguments.

which is a bit vague.

Creating your own command to be used instead of `compile' (or advising
it) is quite easy, so easy that the value of any future built-in
functionality is questionable given the vast differences on build setups
that you will find out there.




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

* Re: Out of source compilation
  2019-09-01 16:22   ` Ergus
  2019-09-01 16:52     ` Óscar Fuentes
@ 2019-09-01 17:12     ` tomas
  1 sibling, 0 replies; 7+ messages in thread
From: tomas @ 2019-09-01 17:12 UTC (permalink / raw)
  To: Ergus; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

On Sun, Sep 01, 2019 at 06:22:16PM +0200, Ergus wrote:
> No, sorry I explained wrong myself ;)
> 
> I was asking about using the M-x compile command in general. So use
> compilation buffers, recompile, goto-next-error and so on.

Ah, got it. Hm. Since compile asks you for a compile command,
I don't think there's a general way to do it. It will depend
on the build system you use, I think.

Cheers
-- tomás

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2019-09-01 17:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-01  3:57 Out of source compilation Ergus
2019-09-01  8:24 ` tomas
2019-09-01 12:55   ` VanL
2019-09-01 14:19     ` tomas
2019-09-01 16:22   ` Ergus
2019-09-01 16:52     ` Óscar Fuentes
2019-09-01 17:12     ` tomas

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.