>>26840C's preprocessor+linking approach works well enough with simple projects and few dependencies. For some languages robust build systems are a solved problem though, notably common lisp and ada. Common lisp has packages, so a build system only needs to load the relevant files, which is what asdf and quicklisp do. Ada has rock solid dependency resolution guided by include dirs and package name/file name identity. What truly elevates it from similar schemes like java's is gprbuild, which lets you set environment variables and select modules in an ada-like syntax.
All that is to say, the languages with the best build systems support packages as a language construct. Objects in java come close, but their more fine-grained nature make them impractical for managing dependencies.