diff --git a/refpolicy/support/Makefile.devel b/refpolicy/support/Makefile.devel
index 6f2fbea..018de12 100644
--- a/refpolicy/support/Makefile.devel
+++ b/refpolicy/support/Makefile.devel
@@ -90,7 +90,11 @@ detected_layers =  $(filter-out CVS tmp $(docs),$(shell find $(wildcard *) -maxd
 3rd_party_ifs = $(3rd_party_mods:.te=.if)
 detected_mods = $(3rd_party_mods) $(foreach layer,$(detected_layers),$(wildcard $(layer)/*.te))
 detected_ifs = $(3rd_party_ifs) $(foreach layer,$(detected_layers),$(wildcard $(layer)/*.if))
-all_packages = $(detected_mods:.te=.pp)
+all_packages = $(notdir $(detected_mods:.te=.pp))
+
+vpath %.te $(detected_layers)
+vpath %.if $(detected_layers)
+vpath %.fc $(detected_layers)
 
 # if there are modules in the current directory, add them into the third party layer
 ifneq "$(3rd_party_ifs)" ""