shithub: libini

ref: 6c63e71880f8bcdf597548e8bbaba165c4fe7d38
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.ini:Q:
	cat <<EOF >$target
	nocat=novalue
	+nocatarr=valA
	+nocatarr=valB
	
	[Category A]
	keyA=valueA
	keyB=valueB
	
	; Comment
	
	[Category B]
	keyB=valueB
	
	[Category C]
	keyx=nope
	+keyF=abc
	+keyF=def
	EOF

test:QV: $O.out test.ini
	$O.out test.ini >/dev/null &
	p=$apid
	sleep 0.5 && leak -s $p | acid $p
	wait $p
	rm test.ini

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