Mk build system?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CJNyfalt
    Swordsman
    • May 2007
    • 289

    Mk build system?

    I am looking to learn how the mk build system used by vanilla and FA works. Can anyone point me in the right direction?
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9647

    #2
    Copy and paste
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • Kiyoshi Aman
      Scout
      • Apr 2007
      • 27

      #3
      Originally posted by CJNyfalt
      I am looking to learn how the mk build system used by vanilla and FA works. Can anyone point me in the right direction?
      Pretty much it's just 'look at the existing makefiles'. It's fairly simple to use, relative to most other autotools-based build systems—which is one of the reasons I ported V to it. My guess is FA uses it for the same reason.
      "The Earth...is for the living. The dead have neither rights nor powers on it." -- Thomas Jefferson
      "Aim above morality. Be not simply good, be good for something." -- Mark Twain

      Comment

      • CJNyfalt
        Swordsman
        • May 2007
        • 289

        #4
        You know I need more info than that to try it out.
        - Which files are the config files that are edited?
        - Where do I get the files that are used to run the build system and which ones are they?
        - What do they replace compared to standard autotools?
        - Where do I find documentation?
        - What commands are run to set up the build system?

        Comment

        • zaimoni
          Knight
          • Apr 2007
          • 590

          #5
          Originally posted by CJNyfalt
          I am looking to learn how the mk build system used by vanilla and FA works. Can anyone point me in the right direction?
          Sadly, the master reference for this build system was taken offline within a couple of months of V adopting it. There wasn't enough left for me to make an intelligible local mirror.

          It is optimized for manual maintenance, and relies heavily on gmake extensions. Follow the include directives and all shall become clear.
          Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
          Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
          Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

          Comment

          • zaimoni
            Knight
            • Apr 2007
            • 590

            #6
            Originally posted by CJNyfalt
            I am looking to learn how the mk build system used by vanilla and FA works. Can anyone point me in the right direction?
            Your problem is that http://www.atheme.org/ has pulled virtually all references to their Objective Make build system from the Internet. I think Angband is the last holdout on accurate documentation. (Not even the project infighting notes over this are making Google now.)
            Zaiband: end the "I shouldn't have survived that" experience. V3.0.6 fork on Hg.
            Zaiband 3.0.10 ETA Mar. 7 2011 (Yes, schedule slipped. Latest testing indicates not enough assert() calls to allow release.)
            Z.C++: pre-alpha C/C++ compiler system (usable preprocessor). Also on Hg. Z.C++ 0.0.10 ETA December 31 2011

            Comment

            • Kiyoshi Aman
              Scout
              • Apr 2007
              • 27

              #7
              Originally posted by CJNyfalt
              You know I need more info than that to try it out.
              - Which files are the config files that are edited?
              configure.ac is where your standard configure script stuff goes. buildsys.mk.in and extras.mk.in is where environment variables go.

              - Where do I get the files that are used to run the build system and which ones are they?
              configure.ac, Makefile, buildsys.mk.in, extras.mk.in — they are included with Angband.

              - What do they replace compared to standard autotools?
              This is standard autotools; the difference lies in how everything is put together. All the automake rubbish goes into configure.ac along with autoconf's stuff; additionally, the buildsystem itself is in one place and one place only: buildsys.mk.in (which is transmogrified into buildsys.mk once ./configure is run). This means you only need to have autotools substitute three files: config.h, buildsys.mk.in, and extras.mk.in.

              - Where do I find documentation?
              So far as I know, there isn't any aside from the relevant files themselves (Makefile, configure.ac, buildsys.mk.in, autoconf.mk.in).

              - What commands are run to set up the build system?
              • sh autogen.sh # only if you're working with a development snapshot which doesn't have a ./configure script already.
              • ./configure ...
              • make
              • make install


              Additionally, the bare buildsystem may be obtained, with comments where appropriate, via the original author's mercurial repository.
              "The Earth...is for the living. The dead have neither rights nor powers on it." -- Thomas Jefferson
              "Aim above morality. Be not simply good, be good for something." -- Mark Twain

              Comment

              • CJNyfalt
                Swordsman
                • May 2007
                • 289

                #8
                Thanks that will help, and at least I will know enough to ask the right questions if I run into trouble.

                Comment

                • CJNyfalt
                  Swordsman
                  • May 2007
                  • 289

                  #9
                  I did study the files a bit, a now I wonder if it is true that the build system does not calculate dependencies at all? That was at least the impression I got.

                  Comment

                  • Kiyoshi Aman
                    Scout
                    • Apr 2007
                    • 27

                    #10
                    Originally posted by CJNyfalt
                    I did study the files a bit, a now I wonder if it is true that the build system does not calculate dependencies at all? That was at least the impression I got.
                    The version in Hg does—if Angband's doesn't, blame the devteam.
                    "The Earth...is for the living. The dead have neither rights nor powers on it." -- Thomas Jefferson
                    "Aim above morality. Be not simply good, be good for something." -- Mark Twain

                    Comment

                    • myshkin
                      Angband Devteam member
                      • Apr 2007
                      • 334

                      #11
                      Originally posted by zaimoni
                      Your problem is that http://www.atheme.org/ has pulled virtually all references to their Objective Make build system from the Internet. I think Angband is the last holdout on accurate documentation. (Not even the project infighting notes over this are making Google now.)
                      The author of the build system popped into IRC to note that its new home is https://webkeks.org/git?p=buildsys.git. Angband's version is well out of date.

                      Comment

                      • AnonymousHero
                        Veteran
                        • Jun 2007
                        • 1393

                        #12
                        Speaking of build systems... would there by any interest in replacing the current Angband one with a CMake-based one? I believe it should work better for Windows users (at least if building using MSVC is supported for Vanilla in general), and it is much simpler and saner when handling things like choosing between clang/gcc and carrying flags like "-fsanitize" over to the linking stage. (Though, I believe the latter is actually a problem with the Vanilla makefile(s), rather than anything autoconf related per se. I couldn't see any simple way of fixing that generally so I just hacked around in the makefile until I got a Clang+-fsanitize build going.)

                        It would also make support for (at least some) IDEs better, since e.g. QtCreator has support for CMake.

                        EDIT: I should say: I already have a working CMake build set up for Tome2-AH, and it should be relatively straightforward to port that to Angband.

                        Comment

                        Working...
                        😀
                        😂
                        🥰
                        😘
                        🤢
                        😎
                        😞
                        😡
                        👍
                        👎