-.config: ./scripts/config/conf .config.in
- @[ -f .config ] || $(NO_TRACE_MAKE) menuconfig
- @$< -D .config Config.in &> /dev/null
+tmpinfo-clean: FORCE
+ -rm -rf tmp/.*info
+
+tmp/.config-%.in: tmp/.%info scripts/metadata.pl
+ ./scripts/metadata.pl $*_config < $< > $@ || rm -f $@
+
+.config: ./scripts/config/conf tmp/.config-target.in tmp/.config-package.in
+ if [ \! -f .config ]; then \
+ [ -e $(HOME)/.openwrt/defconfig ] && cp $(HOME)/.openwrt/defconfig .config; \
+ $(NO_TRACE_MAKE) menuconfig; \
+ fi
+ $< -D .config Config.in &> /dev/null