Making an ohel is a tolada of Boneh. In contrast to the melakha of Boneh, which involves attaching different components, such as stone, wood, cement, and metal, to construct a house or implement, making an ohel does not involve the attachment of various components but the erection of something that separates between different areas. The roof of a tent serves as a barrier between the sky and those who are inside the tent, protecting them from the elements. Therefore, pitching a tent on Shabbat using sheets or other things that are not considered construction materials is prohibited by Torah law if the tent is stable and will last for a long time (at least eight days). This is the case even if one tied no knots and used no screws or nails, but only loops and pegs. Even if he only made a roof or a wall, or even simply added a tefaĥ to an existing roof or wall, he has transgressed a Torah prohibition (Pri Megadim, Mishbetzot Zahav 315:8; MB ad loc. 1; SHT ad loc. 6).
The Torah prohibition is limited to a permanent, durable ohel. The Sages further forbid making a temporary ohel. Therefore, one may not spread a curtain or netting over a bed, whether for privacy or for protection against insects.
Since the critical part of an ohel is the roof, one may not make any sort of temporary roof to protect a person beneath it, even if it is only a tefaĥ wide. But one may put up a temporary meĥitza. For example, one may erect a meĥitza between men and women attending a Torah lecture. However, one may not erect a meĥitza that serves to render something halakhically permitted (meĥitza ha-materet) even on a temporary basis. For example, if a sukka has only two walls, a third wall may not be erected, even if it is temporary, since erecting this meĥitza renders the sukka kosher. Similarly, one may not erect a temporary meĥitza in order to close a gap in an eruv, because this renders the eruv kosher (SA 315:1; below 29:8).
The rabbinic prohibition of making a temporary ohel is limited to the case of a new ohel, but one may make a temporary addition to a pre-existing ohel. Therefore, one who wishes to spread an awning in his garden on Shabbat to protect himself from the sun should make sure to spread it at least a tefaĥ before Shabbat. He may then extend it fully on Shabbat. Similarly, if the beginning of a permanent roof is already in place, one may put up an awning to serve as a temporary continuation of the roof. One may also take down whatever was temporarily added on Shabbat (SA 315:2; MB ad loc. 38).
Even if no one had actually begun to spread out the awning before Shabbat, but it contains a pull-string that is designed for extending it, this string is considered the beginning of the extension, and thus one may complete the extension of the awning on Shabbat (MB 315:37).
A porch’s sliding roof that is attached with hinges or that slides on a track may be opened and closed on Shabbat. This is because it is not considered an ohel, but rather is comparable to opening and closing a door (Rema 626:3). Similarly, one may open a patio umbrella that is permanently affixed in the yard.
The hinged hood or canopy of a baby carriage or stroller may be opened and closed on Shabbat. Furthermore, since it may be opened, it is considered the beginning of an ohel, and one may add to it as well. Thus, if one wishes to protect more of the carriage by extending the hood using a cloth diaper or a plastic sheet, he may do so (SSK 24:13).