I would like to tell ASDF that the status of a particular component has changed and it should be recompiled the next time the enclosing system gets loaded. Motivation: I envision having configuration variables which trigger this process upon being modified.
The necessary tools appear to be in the asdf/plan package, if I have to guess.
3 March 2022: My use of the word 'variables' in my example may have misled @coredump, whose reply deals with environment variables. For clarification, what I had in mind was a special variable acting as a compile-time constant for everything downstream of it in the build process. Modifying it would involve a setf-expansion side effect to set the theoretical "dirty" state for the appropriate component tree.
Despite the miscommunication, I'm fairly certain his technique of subclassing asdf:cl-source-file and specializing asdf:operation-done-p--something I hadn't tried--could still do it.