# Set up internal embedde dconfig
# Input: /local/rnd/mod/CONFFILE is the file name of the conf file (without path)
#        /local/rnd/mod/CONFVAR is the variable name to use in conf_internal.c

switch ?/local/rnd/mod/CONFFILE
case {...}

put /local/rnd/MCFG [@$(PLUGDIR)/@/local/rnd/mod@/@/local/rnd/mod/CONFFILE@@]
put /local/rnd/ICFG [@$(PLUGDIR)/@/local/rnd/mod@/conf_internal.c@]

append /local/rnd/DEPDEPS [@ @/local/rnd/ICFG@ @]
append /local/rnd/DISTCLEANFILES [@ @/local/rnd/ICFG@ @]
append /local/rnd/RULES [@
@/local/rnd/ICFG@: @/local/rnd/MCFG@ $(CQUOTE)
	$(CQUOTE) -n @/local/rnd/mod/CONFVAR@ < @/local/rnd/MCFG@ > @/local/rnd/ICFG@
@]


if ?/local/librnd/no_confdir
then
else
	switch /local/rnd/mod/enabled
		case {1}
			append /local/rnd/rules/install_ [@
		$(SCCBOX) $(HOW) "@/local/rnd/MCFG@" "$(CONFDIR)/@/local/rnd/mod/CONFFILE@"@]
		end
		default end;
	end
end
end
default
end
end

