Makefile portability and usability

28 views
Skip to first unread message

Aleksej Saushev

unread,
Aug 27, 2010, 1:19:32 PM8/27/10
to pfor...@googlegroups.com
Hello!

Currently build/unix/Makefile is non-standard, it relies on extensions
present only in GNU Make. In addition, one can't easily override compiler,
compiler flags, linker flags, and so on becase Makefile uses non-conventional
names for those. The attached patch changes build process so that
everything is built in current directory (where make tool is invoked),
it relies only on one feature not guaranteed by POSIX/SUS, VPATH
(present in BSD and GNU Make), and it provides conventional variables to
provide compiler (CC), compiler flags (CFLAGS), preprocessor flags (CPPFLAGS),
linker flags (LDFLAGS), and additional libraries and objects to link to (LDADD).

posix-make.diff

Phil Burk

unread,
Aug 27, 2010, 1:54:05 PM8/27/10
to pfor...@googlegroups.com
Great patch Aleksej. Checked in as R45.

My knowledge of Makefile was limited. So I appreciate your making this
standard.

I guess the Makefile "wildcard" was not standard. Bummer because it is a
pain to list all the headers.

Phil

Aleksej Saushev

unread,
Aug 27, 2010, 3:32:27 PM8/27/10
to pfor...@googlegroups.com
Phil Burk <ph...@softsynth.com> writes:

> Great patch Aleksej. Checked in as R45.

Thank you.

> My knowledge of Makefile was limited. So I appreciate your
> making this standard.
>
> I guess the Makefile "wildcard" was not standard. Bummer because
> it is a pain to list all the headers.

Yes, unfortunatly standard Make language lacks many features,
On the other hand listing full dependencies prevents misterious errors,
when you get unpredictable results after you've got some backup header
or source file in source tree.


--
HE CE3OH...

Reply all
Reply to author
Forward
0 new messages