shithub: libini

ref: 61a400cc2f9b50b4a39537eb9d0981df77347929
dir: /mkfile/

View raw version
</$objtype/mkfile

LIB=/$objtype/lib/libini.a
OFILES=ini.$O
HFILES=/sys/include/ini.h

</sys/src/cmd/mksyslib

$O.out:	test.$O ini.$O
	$LD -o $target $prereq

test.$O: test.c ini.h
	$CC $CFLAGS test.c

test:QV: $O.out
	cat <<EOF >test.ini
	nocat=novalue
	+nocatarr=valA
	+nocatarr=valB
	
	[Category A]
	keyA=valueA
	keyB=valueB
	
	; Comment
	
	[Category B]
	keyC=valueC
	keyD=valueD
	
	[Category C]
	keyx=nope
	+keyF=abc
	+keyF=def
	EOF
	$O.out test.ini
	rm test.ini

README: ini.man
	nroff -rL1000i -man $prereq | sed '
	${
	/^$/p
	}
	//N
	/^\n$/D' > $target