
585 P.2d 1265 (1978)
JACK ENDO ELECTRIC, INC., a Hawaii Corporation, Plaintiff-Appellant,
v.
LEAR SIEGLER, INC., a Delaware Corporation, Defendant, and J.A. Thompson & Son, Inc., a California Corporation, Defendant-Appellee.
No. 6100.
Supreme Court of Hawaii.
October 31, 1978.
*1267 Rodney Kim, Honolulu (Kim & Kim, Honolulu, of counsel), for plaintiff-appellant.
Herbert T. Ikazaki, Honolulu (Jeffrey M. Taylor, Honolulu, with him, on the brief, Ikazaki, Devens, Lo, Youth & Nakano, Honolulu, of counsel), for defendant-appellee.
Before RICHARDSON, C.J., and KOBAYASHI, OGATA, MENOR and KIDWELL, JJ.
RICHARDSON, Chief Justice.
Jack Endo Electric, Inc. appeals from the granting of a motion for summary judgment by the circuit court of the first circuit in favor of appellee, J.A. Thompson and Son, Inc.
We reverse.
At various times between February 26, 1973 and October 18, 1975, appellant provided certain building materials to appellee. The materials were used in the construction of improvements on property designated as the Waiau Garden Kai Phases I and II development. Appellee was the general contractor of the development, Lear Siegler, Inc. was the lessee and developer of the property and the Bishop Estate was the lessor, owner in fee.
The materials furnished by appellant were allegedly valued at $95,824.10 of which $22,076.66 was never paid. On March 21, 1974, appellant filed in the circuit court of the first circuit a notice of mechanic's and materialman's lien and demand for payment of the amount due and owing. Appellee and Lear Siegler, Inc. were named as defendants in the notice. However, the owner in fee, the Bishop Estate, was neither named nor served.
On May 2, 1974, appellant brought suit against appellee and Lear Siegler, Inc. to recover the $22,076.66 allegedly due and to foreclose the previously filed mechanic's and materialman's lien. Both appellee and Lear Siegler, Inc. filed answers to appellant's complaint. Appellee subsequently moved for summary judgment since appellant's notice of mechanic's and materialman's lien failed to name and was not served upon the fee owner of the property as allegedly required by HRS § 507-43 (Supp. 1973).
On October 17, 1975, the circuit court filed an order granting appellee's motion for summary judgment. Consequently, appellant's complaint was dismissed and his notice of mechanic's and materialman's lien was declared invalid.
The sole issue presented by this appeal is whether a notice of mechanic's and materialman's lien that named and was served upon the lessee developer of real property, and the general contractor of the improvements *1268 is effective with respect to the interests of the lessee and general contractor in the improvements and the real property upon which the improvements were situated even if the lessor, owner in fee, was neither named nor served with the notice of lien as allegedly required by HRS § 507-43 (Supp. 1973).
Appellant argues that although HRS § 507-43 (Supp. 1973) requires the naming and service of notice upon the owner of fee title and the party who contracted for the improvements, if not the fee owner, appellant substantially complied with the statute by only naming appellee and Lear Siegler, Inc. Appellant only intended to affect appellee's and Lear Siegler, Inc.'s interests in the improvements and the real property. Appellant was not concerned with affecting the lessor's interest in either the improvements or the fee.
Appellee, on the other hand, contends that the notice provisions of HRS § 507-43 (Supp. 1973) are mandatory and require strict compliance. Thus, since the statute requires the fee owner to be notified and since the fee owner, in the instant case, was not notified, the lien is invalid.[1]
We find in favor of appellant and hold that the lower court erred in granting appellee's motion for summary judgment. The instant notice of lien was sufficient to impose a lien on appellee and Lear Siegler, Inc.'s interest in the improvements and the real property upon which the improvements were situated.
HRS § 507-42 (1968) concerns, inter alia, the issues of when a mechanic's and materialman's lien will be allowed, who can obtain the lien and the interests that are subject to the lien. HRS § 507-42 (1968) provides that
[a]ny person or association of persons furnishing labor or material in the improvement of real property shall have a lien upon the improvement as well as upon the interest of the owner of the improvement in the real property upon which the same is situated, or for the benefit of which the same was constructed[.]
Where the terms of a lease, contract of sale, or instrument creating a life tenancy require the improvement of the real property, the interest of the lessor, vendor, or remainderman in the improvement and the land upon which the same is situated shall likewise be subject to the lien, and any provision for forfeiture or other penalty against the lessee, vendee, or life tenant in case of the filing of a mechanic's or materialman's lien or actions to enforce the same, shall not affect the rights of lienors.
Since appellant furnished material to be used in the improvements for the Waiau Garden Kai Phases I and II development, appellant is a proper party to be seeking to impose a lien. Pursuant to the statute, appellant could obtain a lien on the improvement itself, the interest in the real property of the owner or beneficiary of the improvements and, depending on the terms of the lease, possibly the interest of the lessor in the improvements and the real property. Consequently, since Lear Siegler, Inc. was the developer and owner of the improvements and since appellee was the general contractor of the improvements, both appellee and Lear Siegler, Inc. were proper parties against whom a lien could be imposed.[2]
The mechanic's and materialman's lien law is purely statutory and a lien will *1269 not attach automatically. HRS § 507-43 (Supp. 1973) enumerates the notice procedure allegedly necessary to impose a valid lien. The pertinent part of HRS § 507-43 (Supp. 1973) provides that
[t]he lien shall not attach unless a notice thereof is filed in writing in the office of the clerk of the circuit court where the property is situated and a copy of the notice served in the manner prescribed by law for service of summons upon the owner of fee title to the property and upon the party or parties who contracted for the improvements if other than the owner of fee title of the property... The notice shall specify the names of the parties who contracted for the improvement, the name of the general contractor and the names of the owner of fee title to the property.[3]
HRS § 507-43 (Supp. 1973) is written in seemingly mandatory language. It is framed in the negative and uses the word "shall." Consequently, if the provision is mandatory, the failure to follow it will render the proceeding to which it relates illegal and void. If the provision is directory, however, the observance of the provision will not be necessary to the validity of the proceeding. In re Nomination Papers, Etc., 352 Pa. 576, 44 A.2d 48 (1945).
The use of the word "shall" in the statute is not dispositive of the issue of whether the statute is mandatory rather than directory. While the word "shall" is generally regarded as mandatory, in certain situations it may properly be given a directory meaning. Nat. Transit Co. v. Boardman, 328 Pa. 450, 197 A. 239 (1938). In determining whether a statute is mandatory or directory the intention of the legislature must be ascertained. The legislative intent may be determined from "... a consideration of the entire act, its nature, its object, and the consequences that would result from construing it one way or the other." Appeal of Baldwin, 153 Pa.Super. 358, 33 A.2d 773, 775 (1943). See also, Sjostrom v. Bishop, 15 Utah 2d 373, 393 P.2d 472 (1964). In general, a statute is directory rather than mandatory if the provisions of the statute do not relate to the essence of the thing to be done or where no substantial rights depend on compliance with the particular provisions and no injury can result from ignoring them. See generally, Barton v. Atkinson, 228 Ga. 733, 187 S.E.2d 835 (1972); State v. Vigil, 74 N.M. 766, 398 P.2d 987 (1965); Dunker v. Brown County Brd. of Ed., 80 S.D. 193, 121 N.W.2d 10 (1963); State v. Frisby, 260 Minn. 70, 108 N.W.2d 769 (1961); Miller v. State, 94 Okl.Cr. 198, 232 P.2d 651 (1951); State v. Dist. Ct., 122 Mont. 1, 196 P.2d 452 (1948); Alabama Pine Co. v. Merchants, 215 Ala. 66, 109 So. 358 (1926); Crane v. Board of Sup'rs of Los Angeles County, 17 Cal. App.2d 360, 62 P.2d 189 (2d Dist. 1926).
The legislative history of HRS § 507-43 (Supp. 1973) fails to enunciate or clarify the purpose or objective of the statute. But the pertinent part of the statute is a simple notice provision and its apparent objective is to give notice to all persons who might be affected by the proposed mechanic's and materialman's lien so that they may take steps to protect their interests. It is to be used as a shield to protect the interests of the fee owner and other parties who may be affected by the lien rather than as a sword available to anyone to attack the validity of the lien.
*1270 In the instant case, since the notice of lien failed to name and was not served upon the fee owner of the property, the lien will not attach to any interest of the fee owner in either the improvements or the real property upon which the improvements were situated. Consequently, the party who did not receive notice, the fee owner, was not substantially prejudiced by the lack of notice.
In Turner v. Enstrom, 5 Alaska 118 (1914) the court held that a notice of lien was valid with respect to the owners named in the notice of lien and invalid as to the owner not named even though the lien statute seemingly required the naming and service of notice on all owners or reputed owners. In Turner, plaintiff sought to impose a lien on the interests of the lessees and the fee owners of certain real property for labor performed on the property. Plaintiff named all of the lessees and fee owners of the property with the exception of one fee owner. The named fee owners sought to have the lien declared ineffective as to their interests. They argued that the omitted fee owner was a necessary party without whom the lien could not be effective. The court held, inter alia, that the failure to include the names of all the fee owners would not render the lien invalid. Rather, the lien would be effective as to the interests of the parties actually named and served. The effect of omitting one of the fee owners merely operated to exempt that owner from the lien.
Similarly, in Provost v. Shirk, 223 Ill. 468, 79 N.E. 178 (1906), plaintiff sought to impose a mechanic's lien upon the interest of the lessee and fee owner of certain real property. However, in drafting his notice of lien, plaintiff failed to indicate that the interest of the lessor, fee owner, was subject to the lien. Instead, the notice only referred to the interest of the lessee. The court held that while the lessor's interest could possibly have been subject to attachment, plaintiff's failure to properly notify him exempted his interest from the lien. Further, the lien was valid and enforceable as to the interest of the lessee even though the fee owner was exempt. Accord, Globe Electric v. Union Leasehold Co., 166 Wash. 45, 6 P.2d 394 (1931); Re North Babylon Estates, Inc., 30 F.2d 372 (2d Cir.1928). See also, Tropic Builders v. U.S., 52 Haw. 298, 475 P.2d 362 (1970). (A lien on the lessee's interest was effective even though the lien was invalid as to the lessor, United States, by reason of governmental immunity.)
In the instant case, appellant's failure to name and serve notice of the lien on the fee owner of the subject property resulted in exempting the interest of the fee owner from the lien. Consequently, the fee owner was not substantially prejudiced by not receiving notice of the lien. Thus, the notice provision of HRS § 507-43 (Supp. 1973) calling for the naming and service of notice upon "the owner of fee title to the property and upon the party or parties who contracted for the improvements if other than the fee owner" is directory rather than mandatory. Further the failure to strictly comply with the directory provisions of the statute will not invalidate the lien as to appellee and Lear Siegler, Inc. Appellee and Lear Siegler, Inc. were properly named and served with notice of the lien. The lien is only effective as to their respective interests in the subject property.
Reversed.
NOTES
[1]  Appellee, in oral argument before this court, also suggested that to uphold the validity of the notice of lien would result in an unconstitutional denial of due process and deprivation of property for the lessor, fee owner, of the subject property. Appellee argued that to allow the lien on appellee's and Lear Siegler, Inc.'s interests in the property would also affect the fee owner's interest in the real property. It would affect his right to borrow against his property and his "right to deal with the lease." Thus, to allow such an adverse effect on the fee owner's interest without proper notice would be unconstitutional. We find no merit in this portion of appellee's argument.
[2]  The lease between the fee owner, Bishop Estate, and the lessee, Lear Siegler, Inc., was not included in the record on appeal. Consequently, it cannot be determined whether any interest of the lessor could have been affected by the lien if the lesser was, in fact, named and served with the notice of lien.
[3]  The mechanic's and materialman's lien law was amended in 1974 and again in 1975. However, both amendments became effective after the notice of lien was filed in the instant case. The 1974 amendment became effective on May 31, 1974. The notice of lien was filed on March 21, 1974, well before the effective date of the amendment.

The 1974 amendment altered the mechanic's and materialman's lien law by no longer requiring notice to be served upon the owner of fee title of the property. Rather, notice need only be served "upon the owner of the property and any person with an interest therein and upon the party or parties who contracted for the improvements... ." [Emphasis added]. HRS § 507-43 (Supp. 1974). Pursuant to HRS § 507-41 an "owner of real property" may be a lessee. Thus, it arguably appears that the present statutory scheme no longer requires the owner of fee title to be named and served when there is another "owner" as defined by HRS § 507-41.
