be more structured in how we exclude some files from the build

swap a bunch of conditionals with a list comparison