Best practice for extracting information from a makefile