project Remove_Var is

   type B_Type is
      ("B1", "B2");
   B : B_Type := external ("B");
   for Object_Dir use "." & "A1";
   for Source_Dirs use ("." & "A1", ".." & "A1");

   case B is

      when "B2" =>
         for Source_Dirs use (".." & "A1");

      when "B1" =>
         for Source_Dirs use ("." & "A1");
         for Object_Dir use "../" & "A1";
   end case;

end Remove_Var;

