Microsoft NMake documentation FAIL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zaimoni
    Knight
    • Apr 2007
    • 590

    Microsoft NMake documentation FAIL

    (Hit this while preparing Z.C++ V0.0.2 for release, but very tangentially related as it would be nice to have a systematic Microsoft Nmake build system for *bands. Please do not check out the development environment flamethrower from the armory.)

    So...trying out Visual Studio/C++ 2008 Express. I want to implement a partially parallel build system for nmake so that it would be possible to build at least the partial cmp reimplementation under MSVC. (This goes in under augmenting the test drivers: Z.C++ is officially in feature freeze, but test drivers are still open).

    GUI help for "export makefile" comes up with:
    To export a makefile
    1. From the Project menu, select Export Makefile.

    2. ....
    You know, it really would be nice if that menu entry existed.

    Reopening the URL in a true web browser shows that it is for MSVC 6.0, which is decisively out of date (but useful to know for pedantically completist documentation, as it's very difficult to pull up that version of the documentation at all.)

    As it is, it looks like Makefile export was killed as part of a marketing decision to create Vendor Lock-in in MSVC 2002. I wouldn't be expecting it back anytime soon.
    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
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    Originally posted by zaimoni
    Please do not check out the development environment flamethrower from the armory.

    ... it looks like Makefile export was killed as part of a marketing decision to create Vendor Lock-in in MSVC 2002.
    In the absence of the flamethrower, how about the anti-collaboration howitzer?
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • ekolis
      Knight
      • Apr 2007
      • 921

      #3
      You may not be able to convert between NMake and GNU make, but have you tried "new project with existing code", then "makefile project"? Then if you have, say, cygwin or mingw or something, you should be able to specify make out of those as the external build tools or whatever it is in the new project wizard...
      You read the scroll labeled NOBIMUS UPSCOTI...
      You are surrounded by a stasis field!
      The tengu tries to teleport, but fails!

      Comment

      • zaimoni
        Knight
        • Apr 2007
        • 590

        #4
        Originally posted by ekolis
        You may not be able to convert between NMake and GNU make, but have you tried "new project with existing code", then "makefile project"? Then if you have, say, cygwin or mingw or something, you should be able to specify make out of those as the external build tools or whatever it is in the new project wizard...
        I've used "New project with existing code" on small sections of this, to verify that various code fragments build under MSVC. (I had to patch in stdbool.h and stdint.h, of course. Very easy. After stripping all those
        Code:
        #pragma ZCC lock ...
        with grep -v, stdbool.h from Z.C++ works with one modification to handle the absence of the built-in C99 type _Bool; Z.C++'s auto-generated stdint.h works as-is.)

        There is no option to create an NMake makefile from there in Visual Studio 2008. You get the "external tools" option from the plain New Project menu entry; it looks meant to allow things like using a GNU makefile system while keeping Visual Studio as the IDE. (Which is also an admirable marketing goal, just not the precise feature I'm looking for.)

        The full "New project from existing code" won't work as-is, as the codebase being imported includes a test program whose sole purpose in life is to create a feature-test header, then get deleted.
        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

        • RogerN
          Swordsman
          • Jul 2008
          • 308

          #5
          You can just create an NMake makefile manually. The syntax very similar to other makefiles.

          Comment

          • zaimoni
            Knight
            • Apr 2007
            • 590

            #6
            That is what I am doing, yes. (Slowly, as I'm using spinoff time unusable for work for this.) It would have been more convenient to simply export the makefiles when that would have worked (which is most of the time).

            The big difference in syntax, is that nmake (unlike GNU make and BSD make) does not provide build-in looping constructs over variables. So NMake makefiles tend to be bloated because I don't have a clean way of specifying chained dependencies centrally.

            The theoretical POSIX make (which I am not aware of any strict implementations of, both GNU make and BSD make extend the specifications) also does not provide built-in looping constructs.
            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

            • takkaria
              Veteran
              • Apr 2007
              • 1951

              #7
              Originally posted by zaimoni
              That is what I am doing, yes. (Slowly, as I'm using spinoff time unusable for work for this.) It would have been more convenient to simply export the makefiles when that would have worked (which is most of the time).

              The big difference in syntax, is that nmake (unlike GNU make and BSD make) does not provide build-in looping constructs over variables. So NMake makefiles tend to be bloated because I don't have a clean way of specifying chained dependencies centrally.

              The theoretical POSIX make (which I am not aware of any strict implementations of, both GNU make and BSD make extend the specifications) also does not provide built-in looping constructs.
              I should have mentioned this a while ago, but V has src/Makefile.nmake.
              takkaria whispers something about options. -more-

              Comment

              • Pete Mack
                Prophet
                • Apr 2007
                • 6883

                #8
                Originally posted by takkaria
                I should have mentioned this a while ago, but V has src/Makefile.nmake.

                You beat me to it. As it doesn't include an install target, it's a trivial file.



                The V make environment is really impressive now.

                Comment

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