unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Need to modify src/epaths.in for custom prefix? (Was: Cleaner way to not build the ctags..)
@ 2016-03-10 16:00 Kaushal Modi
  2016-03-10 16:28 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Kaushal Modi @ 2016-03-10 16:00 UTC (permalink / raw)
  To: Emacs developers

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

Hi all,

As I was reviewing my emacs build script, I realized I needed to address
this another nugget I have in there for a while:

    sed -i 's|/usr/local|${MY_EMACS_INSTALL_DIR}|g' src/epaths.in

Here ${MY_EMACS_INSTALL_DIR} is the path I set as prefix to the configure
command.

Here is my configure command:

./configure --prefix=${MY_EMACS_INSTALL_DIR} CPPFLAGS="-fgnu89-inline
-I/home/kmodi/usr_local/6/include -I/usr/include/freetype2 -I/usr/include"
CFLAGS="-O2 -march=native" LDFLAGS="-L/home/kmodi/usr_local/6/lib
-L/home/kmodi/usr_local/6/lib64"

I have to use this prefix as I am installing emacs in my $HOME and I don't
have write access to /usr/local/.

I needed to add that sed command because something about the build did not
work correctly by simply adding that prefix to the configure command... I
also needed to update the hard coded paths in src/epaths.in. (Unfortunately
I did not document the exact reason why this file had to be manually
edited; but I know for sure that it definitely needed to be.)

So, I am trying to understand the exact reason why we need to manually
update the src/epaths.in .. Or do we need to?

In addition, as plain "./configure" does not work for me, I also have this
to call my custom configure command instead of plain ./configure in
GNUmakefile. So I have this too in my build script:

    sed -i 's|./configure|${MY_EMACS_CONFIGURE}|g'  GNUmakefile

The value of ${MY_EMACS_CONFIGURE} is the above mentioned custom configure
command with prefix and all.

The default ./configure caused Makefile build failure as it could not find
the giflib automatically.

--
Kaushal Modi

[-- Attachment #2: Type: text/html, Size: 2273 bytes --]

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

* Re: Need to modify src/epaths.in for custom prefix? (Was: Cleaner way to not build the ctags..)
  2016-03-10 16:00 Need to modify src/epaths.in for custom prefix? (Was: Cleaner way to not build the ctags..) Kaushal Modi
@ 2016-03-10 16:28 ` Eli Zaretskii
  2016-03-10 19:31   ` Kaushal Modi
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2016-03-10 16:28 UTC (permalink / raw)
  To: Kaushal Modi; +Cc: emacs-devel

> From: Kaushal Modi <kaushal.modi@gmail.com>
> Date: Thu, 10 Mar 2016 11:00:11 -0500
> 
> As I was reviewing my emacs build script, I realized I needed to address this another nugget I have in there
> for a while:
> 
> sed -i 's|/usr/local|${MY_EMACS_INSTALL_DIR}|g' src/epaths.in
> 
> Here ${MY_EMACS_INSTALL_DIR} is the path I set as prefix to the configure command.

What's wrong with using --datadir= and --enable-locallisppath= ?
(Maybe also --libexecdir and others.)

IOW, I think the configure script already has all the knobs you need
for that.



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

* Re: Need to modify src/epaths.in for custom prefix? (Was: Cleaner way to not build the ctags..)
  2016-03-10 16:28 ` Eli Zaretskii
@ 2016-03-10 19:31   ` Kaushal Modi
  0 siblings, 0 replies; 3+ messages in thread
From: Kaushal Modi @ 2016-03-10 19:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Emacs developers

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

Thanks.

I reread the INSTALL document and turns out I do not need to use --datadir,
etc as --prefix will set them all accordingly.

'prefix' doesn't give a path for any specific part of Emacs; instead,
its value is used to determine the defaults for all the
architecture-independent path variables - 'datadir',
'sharedstatedir', 'infodir', and 'mandir'.  Its default value is
'/usr/local'; the other variables add on 'lib' or 'man' to it
by default.

For example, suppose your site generally places GNU software
under '/usr/users/software/gnusoft' instead of '/usr/local'.
By including
   'prefix=/usr/users/software/gnusoft'
in the arguments to 'make', you can instruct the build process
to place all of the Emacs data files in the appropriate
directories under that path.

So for now I have removed the below from my build script

  sed -i 's|/usr/local|${MY_EMACS_INSTALL_DIR}|g' src/epaths.in

Emacs built just fine without that and elisp source navigation, etc. works
just fine. I'm glad to take out that relic snippet from my build script. If
I do need to add it again, I will revisit this thread.

Can you please comment on the requirement of

  sed -i 's|./configure|${MY_EMACS_CONFIGURE}|g'  GNUmakefile

(where the value of ${MY_EMACS_CONFIGURE} is

./configure --prefix=/home/kmodi/usr_local/apps/6/emacs/emacs-25
CPPFLAGS="-fgnu89-inline -I/home/kmodi/usr_local/6/include
-I/usr/include/freetype2 -I/usr/include" CFLAGS="-O2 -march=native"
LDFLAGS="-L/home/kmodi/usr_local/6/lib -L/home/kmodi/usr_local/6/lib64" )

If I don't have that sed in place, my build fails with below and no
Makefile is created:

checking for GifMakeMapObject in -lgif... no
checking for EGifPutExtensionLast in -lgif... no
checking for EGifPutExtensionLast in -lungif... no
configure: error: The following required libraries were not found:
     libgif/libungif
Maybe some development libraries/packages are missing?
If you don't want to link with them give
     --with-gif=no
as options to configure
make: *** [Makefile] Error 1
build_info_fie: Undefined variable.


Thanks.

[-- Attachment #2: Type: text/html, Size: 4171 bytes --]

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

end of thread, other threads:[~2016-03-10 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-10 16:00 Need to modify src/epaths.in for custom prefix? (Was: Cleaner way to not build the ctags..) Kaushal Modi
2016-03-10 16:28 ` Eli Zaretskii
2016-03-10 19:31   ` Kaushal Modi

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).