Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8001931

build-infra: Apply consistent formatting/indentation to new build-infra files



    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • None
    • 8
    • infrastructure
    • b112


      It would be great if we could try to give a consistent formatting before we make this the new build system that should live for another 20 years. :-)

      Since there are no well-known and accepted formatting rules for makefiles and configure script ("m4sh"), Erik and I suggested the following rules:
      * In makefiles, use four spaces for indentation. Use tabs *ONLY* were required by Make for rule interpretation.
      * In autoconf (*.m4) files, use two spaces for indentation.

      The rationale is this:
      * Four spaces matches the Java indentation level, and it felt like a good amount.
      * Two spaces is more suitable in autoconf files, since while you can typically get some editor assistance for makefile indentation, no known editor understands "m4sh", the weird "language" that configure scipts are written in, so all indentaion has to be done manually (and thus two spaces is simpler than four).

      Also, when Erik, Jonas and I discussed formatting in May, we decided that we should try to keep to this rule:
      * In the Setup*Compilation macro, there should never be any spaces before or after the = in the named argument lists.

      We should try to make this consistent as well.


        Issue Links



              Unassigned Unassigned
              ihse Magnus Ihse Bursie
              0 Vote for this issue
              2 Start watching this issue