project Add_Attr5 is

   type A_Type is
      ("1", "2");
   A : A_Type := external ("A");
   type B_Type is
      ("B1", "B2");
   B : B_Type := external ("B");

   case A is

      when "2" =>

         case B is

            when "B2" =>
               for Object_Dir use "..";
               for Object_Dir use ".";

            when "B1" =>
               for Object_Dir use "..";
               for Object_Dir use "new_obj_dir";
         end case;

      when "1" =>

         case B is

            when "B2" =>
               for Object_Dir use "..";
               for Object_Dir use ".";

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

end Add_Attr5;

