Let me begin by telling you a little story. Some time ago I needed to run a script at work once a day. We had tons of machines ranging from big Unix servers to Linux desktops. Due to various reasons the script could only be run on a desktop machine. However using cron was disabled on desktops. All other machines allowed cron.
Permalink for comment 231693
To read all comments associated with this story, please click here.
I don't think it's caused by header files, I'd say it's actually caused by linking issues; and I wouldn't call this a hack.
Some of the complexity of making a working makefile is finding header files; but it's not an issue of header files: It still exists in Java for example with $CLASSPATH.
In my opinion the trouble is a lack of separation of concern. The makefile is definitely well suited to building code: Most of us could probably make a makefile to build a medium complexity project for one system. The trouble comes into effect that there's no effective separation between makefile commands and the shell and so you end up dependent on the OS.
One place you get stuck is installing, and another is the joy of filling in the -I and -L's.
I think that what we need is a smarter makefile that encapsulate's our -I and -L's. Some kind of make + pkg-config (note that what we have is _ok_ but it's a hack since you need both, and then you need your packages to install .pc files). The beauty is that programs installed with this system would automatically contribute their .pc because it would be automatically generated by the install section!
I don't think syntax actually needs to change much. But I would prefer to separate make from the shell in typical sequences with some extra keyword to get shell integration (and a big warning about how you're going to break compatibility in books).
Member since:
2005-06-29
I don't think it's caused by header files, I'd say it's actually caused by linking issues; and I wouldn't call this a hack.
Some of the complexity of making a working makefile is finding header files; but it's not an issue of header files: It still exists in Java for example with $CLASSPATH.
In my opinion the trouble is a lack of separation of concern. The makefile is definitely well suited to building code: Most of us could probably make a makefile to build a medium complexity project for one system. The trouble comes into effect that there's no effective separation between makefile commands and the shell and so you end up dependent on the OS.
One place you get stuck is installing, and another is the joy of filling in the -I and -L's.
I think that what we need is a smarter makefile that encapsulate's our -I and -L's. Some kind of make + pkg-config (note that what we have is _ok_ but it's a hack since you need both, and then you need your packages to install .pc files). The beauty is that programs installed with this system would automatically contribute their .pc because it would be automatically generated by the install section!
I don't think syntax actually needs to change much. But I would prefer to separate make from the shell in typical sequences with some extra keyword to get shell integration (and a big warning about how you're going to break compatibility in books).
all: target
target { needs gtk+-2.0 }: file1.object file2.object
->link file1.object file2.object as target
file1.object { needs gtk+-2.0 }: file1.source [c]
->compile file1.source to file1.object
file2.object: file2.source [c++]
->compile file2.source to file2.object
Maybe not so many keywords, but I think you get the idea.
Edit: And of course osnews doesn't help me out and it's all flat, just pretend it's indented if you see "->".
Edited 2007-04-17 20:41 UTC