0

I would like to implement a minimal POSIX-conformant make utility.

However, the specification mentions that the implementation shall be affected by the following environment variables: LANG, LC_ALL, LC_TYPES, LC_CTYPE and LC_MESSAGES.

But the page describing environment variables says:

If the locale value is not recognized by the implementation, the behavior is unspecified.

Can a POSIX-conformant make utility only accept Makefiles consisting of characters specified in portable character set encoded in ASCII?

1 Answer 1

-1

AFAIK, the only POSIX certified make program that actively manages multi byte characters while reading Makefiles is SunPro Make, see http://schilytools.sourceforge.net/sunpromake.html

GNU make only manages locales for messages and is not POSIX compliant (it misshandles spaces and backslash escapes).

smake only manages locales for messages, but it otherwise very close to POSIX.

Fortunately the relevant character classification for Makefiles only depends in 7-bit ASCII, so there is no need to do more.

I am however not sure wheter you are aware of the needed effort to implement a POSIX compliant make program. smake is 10000 lines of code (this is the minimum such a program could take), SunPro Make (the opensource part) 33000 lines of code, but there is parallel execution and part of the distributed make code that is unused in the OSS version.

BTW: smake started in 1980, SunPro Make started in 1986 and GNU make started in 1988. So these programs had plenty of time to develop to the current state. Be prepared that a first working minimal program needs at least 2-3 months of full time work.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.