[klibc] kbuild: add Kbuild for utils and ash

Sam Ravnborg sam at ravnborg.org
Mon Aug 1 14:43:48 PDT 2005

By the way.
Notice that I used CONFIG_ namespace for this.

> +    sh-$(CONFIG_KLIBC_SH_HISTORY) += histedit.o
> +
Since I beleive this will end up in a Kconfig file pretty soon.
But I only did that change in the Kbuild file - so the source continue
to use "KLIBC_SH_XXXXX". Which is fine for now.

But we should consider if we want a config.h or similar.
In kernel context we ave it for free, but in klibc it requires some
foodwork before we have it.

If ash is the only suspect (+ ZIP_SUPPORT in gzip) it's maybe not worth
But it also depends on the amount of different binaries we foresee to be
part of klibc. The bigger number the automated the system has to be.

> +# Generate parser
> +
> +$(obj)/arith.c: $(src)/arith.y
> +	$(YACC) $< -o $@
> +
> +$(obj)/arith_lex.o:   $(obj)/arith_lex.c   $(obj)/arith.h
> +$(obj)/arith_yylex.o: $(obj)/arith_yylex.c $(obj)/arith.h
> +
> +$(obj)/arith_lex.c: $(src)/arith_lex.l
> +	$(LEX) -o$@ $<
> +
> +$(obj)/arith.h: $(src)/arith.c
> +	$(PERL) -ne 'print if ( /^\#\s*define\s+ARITH/ );' < $< > $@

In this part of the patch I got bored - so no fancy printouts. Anyone?


More information about the klibc mailing list