MAKING A MECHITZAH ON SHABBOS THAT PERMITS [Shabbos: Ohel Arai]
Gemara
44a: R. Meir holds that there is no reason to forbid making a wall on Shabbos that is Pasul for the Sukah.
Question: R. Meir is unlike R. Eliezer, who forbids even adding [to an Ohel];
He is unlike Chachamim. They permit adding to an Ohel, but not making a new Ohel!
Answer: He holds like Chachamim. They forbid making the third wall of a Sukah, but permit making the fourth.
86b (Rav Dimi): Once, they forgot to bring a Sefer Torah to the Beis ha'Keneses from before Shabbos. On Shabbos, they spread curtains on pillars and brought a Sefer Torah.
Objection: All forbid making a new Ohel Arai on Shabbos!
Answer: Rather, they found curtains spread on pillars, and relied on them to bring a Sefer Torah.
94a (Rav): If the wall between two Chatzeros fell, one may not carry [in either Chatzer] more than four Amos;
(Shmuel): One may carry up to where the wall was.
Rav's opinion was inferred from an episode. Rav and Shmuel were in a Chatzer. The wall between it and the adjoining Chatzer fell.
Shmuel: Spread a garment where the wall used to be.
Rav turned his face away.
Question: Why did Shmuel need to spread a garment? He permits carrying up to where the wall was!
Answer: He spread it merely for privacy.
Rav turned away, lest people think that he agrees with Shmuel.
102a: Rav Huna had rams that needed shade during the day and air at night.
Rav: Just before Shabbos, roll up the mat [spread over them during the day], and leave a Tefach spread, so on Shabbos day you may unroll it.
Shabbos 43b (Rav Huna): We may make a wall for the sake of a Mes only if it is [also] for the sake of a Chai (living person).
Shmuel bar Yehudah taught that if a Mes is in the sun, two people come and sit on opposite sides of it. When the heat bothers them, they bring beds to sit on and spread a mat over themselves. Later, they erect their beds [to hold up the mat] and leave, leaving a wall [over the Mes].
137a (Mishnah - R. Eliezer): One may hang a Meshameres (a cloth through which wine is strained) on Yom Tov;
Chachamim forbid.
Question: R. Eliezer forbids adding onto a temporary Ohel!
(Mishnah - R. Eliezer): If a window stopper is tied and hangs [above the ground], one may use it to close a window. If not, one may not;
Chachamim permit in either case.
(Rabah bar bar Chanah): All forbid making a new Ohel Arai even on Yom Tov [and surely on Shabbos].
R. Eliezer forbids adding even on Yom Tov;
Chachamim permit adding even on Shabbos.
Answer: R. Eliezer permits Machshirei Ochel Nefesh.
Rishonim
Rosh (Shabbos 17:8): Rashi learns from 94a that one may make an Ohel of Mechitzos. Rav did not object to the Mechitzah, rather, to carrying the garment four Amos in the Chatzer. In 86b, Rashi deleted from the text 'all forbid making a new Ohel Arai on Shabbos'! Rather, the Gemara asked 'it this permitted?!', i.e. how could they bring curtains in a Chatzer without Mechitzos? R. Tam rejected this. This is not difficult, for people could bring them through wearing them! Also, 44a proves that the Isur of [making an] Ohel applies to Mechitzos. It forbids making a third wall of a Sukah due to Ohel Arai, and permits the fourth wall. Rather, R. Tam forbids a Mechitzah that permits Tiltul or is Machshir a Sukah. A mere addition is permitted. This is why we forbid only the third wall. On 86b, the Mechitzah was to permit carrying. On 94a, Rav objected, for he held that the garment was primarily to permit carrying. Chachamim and R. Eliezer argue about a window stopper, for it says "Chalon". If it plugged a hole in the roof, it would say "Arubah". However, they argue also about an Ohel on the roof (137b), for the Gemara connects this to the law of a Meshameres, which is like a roof.
Mordechai (Shabbos 311): Maharam made a Mechitzah 10 Tefachim tall in front of the Seforim every night, for sometimes he needed to urinate at night. Before Shabbos, he would roll it up, and leave a Tefach spread, for on Shabbos one may make a Mechitzah only for mere Tzeni'us. We learn from Eruvin 102a. Rav permitted extending a Mechitzah to shade rams only if it was already open a Tefach. One may make a Mechitzah for mere Tzeni'us, e.g. to separate between men and women when a Rav expounds. Also Shmuel made a Mechitzah for Tzeni'us. One may make a Mechitzah to protect from the sun or cold falling on people or food. One may not make such a Mechitzah for a Mes, but it is permitted for a Chai (43a).
Note: Presumably, we forbid a new Mechitzah to shade rams (102a) because they are Muktzeh.
Rashba (3:300, brought in Beis Yosef YD 341 DH Kasav ha'Rashba): If one has no other house to eat in, other than where the Mes is, he makes a Mechitzah between himself and the Mes and eats. Even a sheet suffices. It is as if he is in a different house, as long as he fixes the bottom in the ground, or some other way in which it will not blow in the wind. The Mechitzah need not be of rocks or even wood or reeds. A curtain suffices for all such matters. A Siman for this is "v'Hivdilah ha'Paroches Lachem."
Poskim
Shulchan Aruch (OC 315:1): On Shabbos or Yom Tov one may not make a roof, but he may make Mechitzos. A Mechitzah is forbidden only if it is in order to permit a Sukah or carrying.
Beis Yosef (DH Asur): A Mechitzah is not an Ohel. One may spread it for privacy, like Shmuel (94a). The Ran (49a DH v'Chasav) explains that Rashi holds that on Shabbos one may make even a Mechitzah that permits. Tosfos (125b DH ha'Kol), the Rosh, Ran (40a DH u'Lefichach) and the Mordechai (462, beginning of Perek Kol ha'Kelim) bring from R. Tam that Ohel applies to Mechitzos that permit.
Mishnah Berurah (4): The same applies when the Mechitzah permits carrying. Since it is a Mechitzah for Tiltul, it is considered Binyan.
Rema: A Mechitzah made for mere privacy is permitted.
Rema (ibid.): One may not make a Mechitzah in front of the Neros to permit relations, and not in front of Seforim to permit relations or eliminating, unless it was spread a Tefach before Shabbos. Then, one may increase it on Shabbos.
Magen Avraham (3): The Mordechai says that Maharam used to make a Mechitzah 10 Tefachim tall in front of the Seforim. This implies that even though they were exposed above the Mechitzah, one may urinate on the other side, for it is as if he is in another Reshus, like it says [about Keri'as Shema] in 79:2. Therefore, one may not make such a Mechitzah on Shabbos, for he makes it a separate Reshus. Also, he must tie it so the wind will not move it, like it says [regarding Sukah] in 630:10 and so [the Beis Yosef] wrote in YD 341 in the name of the Rashba.
Bi'ur Halachah (DH v'Ein): In Beitzah 32b, we permit positioning privy rocks. We conclude there that even though a Mechitzah without a roof is Binyan Arai, and normally it is forbidden, here Chachamim did not decree, due to Kevod ha'Briyos (Rif Beitzah 18a, 312:10). Even though it is not Ohel Arai, it is forbidden due to Binyan Arai. Perhaps a wall of rocks is different, for it is Derech Binyan Keva. When one arranges them on the ground for Binyan Keva, he is liable for Boneh (Shabbos 102b), therefore it is more stringent. If so, perhaps the Heter of Binyan Arai for Tzeni'us is only what is not normally done Keva, e.g. a curtain or mat, but not a Mechitzas Arai of rocks or bricks. I prefer to say that for a Mechitzah that normally separates between domains, if it does not permit and it is Arai, it is not important [and permitted]. If one arranges rocks to sit on them, this is more important. It is not due to Mechitzah, rather, due to a decree lest one make a toilet seat.
Kaf ha'Chayim (19): One may put a big chest the size of 40 Sa'im in front of Seforim, for it does not matter where the Kli is. (This does not make it a Mechitzah - PF.) All the more so one may put the Seforim in it.