2014-12-19 16:59 GMT+01:00 stephen Turner <[email protected]>:
> <[email protected]> wrote:
>>
>> sory for ugly Makefile.. m4 ported from OpenBSD (tested with gcc,
>> binutils etc.).
>
>
> so there is no ./configure, and any tweaks or options we want need to be
> done in the make file manually....
>
> whats the plans on making this an official linux package with a ./configure
> as i haven't seen any alternative m4 packages available this could be a very
> in demand item, especially for the musl community.

Hi,
it's prepared for the musl. This version is based on the build logs
and original Makefile looked like this:

PROG=   m4
CFLAGS+=-DEXTENDED -I.

SRCS=   eval.c expr.c look.c main.c misc.c gnum4.c trace.c ohash.c \
    tokenizer.l parser.y
MAN=    m4.1

all: ${PROG}

parser.c parser.h: parser.y
    ${YACC} -d $< && mv y.tab.c parser.c && mv y.tab.h parser.h

tokenizer.o: parser.h

CLEANFILES+=parser.c parser.h tokenizer.o

include prog.mk

"include prog.mk" forces more mk deps etc. and it makes no sense for
only a few C files. Therefore the version which was sent is _ugly_,
but it _works_.

To add m4 to the toybox, you must remove the configure file, so don't
understand why you want to lose time...

btw: https://ohse.de/uwe/articles/aal.html

If you're not convinced, check how (hand-written) configure and
Makefile works in musl.

Daniel
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to