Loading ...
Sorry, an error occurred while loading the content.

Re: configure and Makefile

Expand Messages
  • Bram Moolenaar
    ... [...] Yeah, I know how autocof is often used. But I don t like it. It involves creating a bunch of template files, which are then transformed into the
    Message 1 of 6 , Nov 1, 2002
    View Source
    • 0 Attachment
      Zvi Har'El wrote:

      > You wrote:
      > > I have always wondered what is so special about configure that people
      > > don't run it from the Makefile, like everything else. The recommended
      > > way for Vim is to uncomment a few lines in the Makefile and then run
      > > "make". No need to write a shell script to remember the configure
      > > arguments.
      >
      > I believe that people are used to the fact that most packages are
      > shipped with no Makefiles at all. If you look at the autoconf info
      > file,
      >
      > The configuration scripts that Autoconf produces are by convention
      > called `configure'. When run, `configure' creates several files,
      > replacing configuration parameters in them with appropriate values.
      > The files that `configure' creates are:
      [...]

      Yeah, I know how autocof is often used. But I don't like it. It
      involves creating a bunch of template files, which are then transformed
      into the actual Makefiles by configure. Thus you have an extra file
      format, the Makefile template. And a lot of extra files when building
      an application.

      > Therefore, the standard procedure is to run
      >
      > ./configure
      > make
      > make install (as root)

      You can still do that with Vim, if you want. When you need arguments
      for configure you must remember them for each time you run it. Most
      people write a shell script to do this, thus creating yet another file.

      > I suppose from now on I'll have to use for Vim the commands
      >
      > vim +'g/with-features=big/s/^#//' +x -e src/Makefile
      > make
      > make install
      >
      > where the first one will uncomment the correct feature line, if it is still
      > commented out,

      This indeed isn't a nice solution. The best would probably be to leave
      the Makefile alone, and include a separate Makefile_arg that contains the
      definitions that you want to use. You can copy these from the Makefile.
      When upgrading to a new version you still have your Makefile_arg. You
      only need to check if one of the arguments you use has changed (which
      hardly ever happens).

      This is similar to the way config files in /etc are used on FreeBSD.
      One of the big advantages is that examples and explanations can be put
      together. I'm trying to use this scheme with A-A-P as well.

      --
      The war between Emacs and Vi is over. Vi has won with 3 to 1.
      http://www.ssc.com/lg/issue30/raymond.html

      /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
      /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
      \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
      \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
    • Charles E. Campbell
      ... How about a make/environment variable: say, VIMCONFIG. Then the would have configure ${VIMCONFIG} which will normally expand to nothing, but
      Message 2 of 6 , Nov 1, 2002
      View Source
      • 0 Attachment
        On Fri, Nov 01, 2002 at 03:11:25PM +0100, Bram Moolenaar wrote:
        >...snip...
        > This indeed isn't a nice solution. The best would probably be to leave
        > the Makefile alone, and include a separate Makefile_arg that contains the
        > definitions that you want to use.
        >...snip...
        ---------------------------------------------------------------------

        How about a make/environment variable: say, VIMCONFIG. Then the <Makefile>
        would have

        configure ${VIMCONFIG}

        which will normally expand to nothing, but if set will allow
        user-specified options to the configure.

        export VIMCONFIG="--with-features=huge"
        make

        Regards,
        Chip Campbell

        --
        Charles E Campbell, Jr, PhD _ __ __
        Goddard Space Flight Center / /_/\_\_/ /
        cec@... /_/ \/_//_/
        PGP public key: http://www.erols.com/astronaut/pgp.html
      • Bram Moolenaar
        ... Hmm, then you would need to set VIMCONFIG in your ~/.shrc file, which is not really related to building Vim. Typing it doesn t make sense, you might as
        Message 3 of 6 , Nov 1, 2002
        View Source
        • 0 Attachment
          Charles Campbell wrote:

          > On Fri, Nov 01, 2002 at 03:11:25PM +0100, Bram Moolenaar wrote:
          > >...snip...
          > > This indeed isn't a nice solution. The best would probably be to leave
          > > the Makefile alone, and include a separate Makefile_arg that contains the
          > > definitions that you want to use.
          > >...snip...
          > ---------------------------------------------------------------------
          >
          > How about a make/environment variable: say, VIMCONFIG. Then the <Makefile>
          > would have
          >
          > configure ${VIMCONFIG}
          >
          > which will normally expand to nothing, but if set will allow
          > user-specified options to the configure.
          >
          > export VIMCONFIG="--with-features=huge"
          > make

          Hmm, then you would need to set VIMCONFIG in your ~/.shrc file, which is
          not really related to building Vim. Typing it doesn't make sense, you
          might as well run configure right away then.

          --
          Lose weight, NEVER Diet again with
          The "Invisible Weight Loss Patch"
          (spam e-mail)

          /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
          \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
          \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
        • Benji Fisher
          ... You could put the Chip s two lines in a shell script. I remember being confused when I first compiled vim. There are some options (perl support is one, I
          Message 4 of 6 , Nov 2, 2002
          View Source
          • 0 Attachment
            Bram Moolenaar wrote:
            >
            > Charles Campbell wrote:
            >
            > > How about a make/environment variable: say, VIMCONFIG. Then the <Makefile>
            > > would have
            > >
            > > configure ${VIMCONFIG}
            > >
            > > which will normally expand to nothing, but if set will allow
            > > user-specified options to the configure.
            > >
            > > export VIMCONFIG="--with-features=huge"
            > > make
            >
            > Hmm, then you would need to set VIMCONFIG in your ~/.shrc file, which is
            > not really related to building Vim. Typing it doesn't make sense, you
            > might as well run configure right away then.

            You could put the Chip's two lines in a shell script.

            I remember being confused when I first compiled vim. There are
            some options (perl support is one, I think) that can only be compiled in
            via a configure argument, and some (such as features) that are supposed
            to be set from the Makefile. Maybe I did not read the docs carefully
            enough, or maybe they could be made more clear. I think it will be a
            Good Thing if we can decide on a recommended way to compile vim, whether
            it be "configure; make" or just "make" or some other suggestion. The
            recommendation should include a solution to the current discussion, how
            to avoid typing in configure arguments each time you build.

            --Benji Fisher
          • Bram Moolenaar
            ... The recommended way is to edit src/Makefile and run make . I thought this was mentioned in a few places. Obviously you can take over these changes to a
            Message 5 of 6 , Nov 3, 2002
            View Source
            • 0 Attachment
              Benji Fisher wrote:

              > I remember being confused when I first compiled vim. There are
              > some options (perl support is one, I think) that can only be compiled in
              > via a configure argument, and some (such as features) that are supposed
              > to be set from the Makefile. Maybe I did not read the docs carefully
              > enough, or maybe they could be made more clear. I think it will be a
              > Good Thing if we can decide on a recommended way to compile vim, whether
              > it be "configure; make" or just "make" or some other suggestion. The
              > recommendation should include a solution to the current discussion, how
              > to avoid typing in configure arguments each time you build.

              The recommended way is to edit src/Makefile and run "make". I thought
              this was mentioned in a few places.

              Obviously you can take over these changes to a Makefile of a new
              version, but you have to do a bit of work for it. When using CVS it's
              simple, changes in the new version will be merged in and conflicts are
              reported. When unpacking a new version from archives you might want to
              use diff and patch.

              I think this is not perfect, but easy enough for someone to figure out
              himself.

              --
              BEDEVERE: How do you know so much about swallows?
              ARTHUR: Well you have to know these things when you're a king, you know.
              "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

              /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
              /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\
              \\\ Project leader for A-A-P -- http://www.a-a-p.org ///
              \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///
            Your message has been successfully submitted and would be delivered to recipients shortly.