I have been reading about the libraries people have written for languages like Java and C# that make use of byte code weaving to do things like intercept function calls, insert logging code, etc. I have also been reading up on Lisp/Clojure macros in an attempt to better understand how to utilize them. The more I read about macros, the more it seems like they provide the same kind of functionality as byte code weaving libraries. By functionality, I mean the ability to manipulate code at compile time.
Examples of libraries I have been looking at would be AspectJ, PostSharp, and Cecil.
Is there anything that can be done with one and not the other? Do they actually solve the same problems or am I comparing apples and oranges?