[Issue 3413] New: DMD makefiles needs improvements

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Oct 17 11:47:56 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3413

           Summary: DMD makefiles needs improvements
           Product: D
           Version: 1.051
          Platform: All
        OS/Version: Linux
            Status: NEW
          Keywords: patch
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: llucax at gmail.com


--- Comment #0 from Leandro Lucarella <llucax at gmail.com> 2009-10-17 11:47:54 PDT ---
Created an attachment (id=477)
Patch against DMD 1.x branch r215 for adding dependency handling to linux.mak

The DMD make-based build system has a few problems. The main problems I see
are:

1) Lack of dependency handling
2) Excessive duplication

1) Is bad because you have to do a 'make clean all' each time you change
something to be sure that the compiled binary wont have problems. This is
really easy to fix, see the attached file which implement this for the Linux
makefile (but can be applied to any makefile using GCC).

2) Is bad because is really hard to write, read and maintain, and very error
prone (for instance, r215 is missing the new json.{h,c,o} files in the
solaris.mak file). The ideal would be to have a makefile with the common stuff
and other specific makefiles with the specifics for each OS.

I can redesign the DMD makefiles to support automatic dependency handling and
to be highly readable and simple to maintain, if there are any interest in
this. I will only need some assistance for testing it in other OSs than Linux
because I don't have them installed.

I'm attaching just a "teaser" patch that fixes 1) for Linux as a prove of
concept, I didn't wanted to spend time redesigning the DMD build system because
I have the feeling that maybe is not something that Walter wants.

You can apply the patch with patch -p2 < 0001-WIP-Improve-build-system.patch in
the src directory.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list