Hacker News new | ask | show | jobs
by overanalytcl 638 days ago
> Good luck writing Makefiles for Fortran, OCaml or (whenever they will really, actually work) C++ modules.

I've successfully written Makefiles for Fortran and they worked with ifort/ifx and gfort. In my experiments I've also made GNU Cobol, GNU Modula-2 and Vishap Oberon fit within the Makefile paradigm without much trouble. You have failed to provide reasons as to why those languages in particular (or more likely any language that's not of C heritage) can't be used with Makefiles. For instance, you can definitely couple OCaml with Makefiles, just use ocamlopt and treat .cmx files as object files, generated beforehand by ocamlopt -c (like you'd do with GCC). I am not familiar with C++ modules and as such I didn't experiment with them.

1 comments

> I've successfully written Makefiles for Fortran and they worked with ifort/ifx and gfort.

Did the samé (I'm not sure if gfortran did exist at all at the time, I guess it had been g95), plus they worked with Absoft, PGI and Pathscale too (yes, that has been some time ago). And it was a great PITA. Not the least because at the time no Fortran compiler did generate the dependency description, so you either had to parse the Fortran sources by yourself or use makedepf90, which didn't work with all sources.

> You have failed to provide reasons as to why those languages in particular [...] can't be used with Makefiles.

I have obviously badly worded that. I didn't mean it is impossible, just that is a great PITA.

> I am not familiar with C++ modules and as such I didn't experiment with them.

They have the same problem, you don't know the name of the module that is going to be produced.