-.PHONY: all help parse_kconfig write_config build run test clean clean_db clean_database clean_measure clean_linux clean_buildroot mlinux mbuildroot deflinux distclean_linux distclean_buildroot distclean picosat init initialize initialize_database initdb
+.PHONY: all help parse_kconfig write_config build run test clean clean_db clean_database clean_measure clean_linux clean_buildroot mlinux mbuildroot deflinux distclean_linux distclean_buildroot distclean picosat init initialize initialize_database initdb psql
-include .conf.mk
@echo "clean_buildroot - Executes 'make clean' in buildroot folder."
@echo "distclean_buildroot - Executes 'make distclean' in buildroot folder."
+psql:
+ PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)"
+
mbuildroot: buildroot/.config buildroot/system/skeleton/usr/bin/linux-conf-perf
$(MAKE) -C buildroot menuconfig
mlinux:
- ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C linux menuconfig
+ ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) menuconfig
deflinux:
- ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C linux defconfig
+ ARCH=$(CONF_KERNEL_ARCH) $(MAKE) -C $(CONF_LINUX_SOURCES) defconfig
dot_config: allconfig
- cd linux && SRCARCH=$(CONF_KERNEL_ARCH) ARCH=$(CONF_KERNEL_ARCH) KERNELVERSION=$(CONF_KERNEL_ARCH) \
- ../scripts/allconfig/allconfig Kconfig .config ../$(CONF_DOT_CONFIG)
+ cd $(CONF_LINUX_SOURCES) && \
+ SRCARCH=$(CONF_KERNEL_ARCH) \
+ ARCH=$(CONF_KERNEL_ARCH) \
+ KERNELVERSION=$(CONF_KERNEL_ARCH) \
+ $(CONF_ABSROOT)/scripts/allconfig/allconfig \
+ Kconfig .config $(CONF_ABSROOT)/$(CONF_DOT_CONFIG)
init: initialize
initialize: all
initdb: initialize_database
initialize_database:
- echo "$(CONF_DB_HOST):$(CONF_DB_PORT):$(CONF_DB_DATABASE):$(CONF_DB_USER):$(CONF_DB_PASSWORD)" > .pgpass
- psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseinit.sql
- $(RM) .pgpass
+ PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseinit.sql
test: parse_kconfig
scripts/test.py
$(RM) .conf.mk
$(RM) -r jobfiles
-clean_measure: cleandb
+clean_measure:
$(RM) -r configurations
$(RM) -r output
$(RM) -r result
cleandb: clean_database
clean_database:
- echo "$(CONF_DB_HOST):$(CONF_DB_PORT):$(CONF_DB_DATABASE):$(CONF_DB_USER):$(CONF_DB_PASSWORD)" > .pgpass
- psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseclean.sql
- rm -f .pgpass
+ PGPASSWORD="$(CONF_DB_PASSWORD)" psql -d "$(CONF_DB_DATABASE)" -h "$(CONF_DB_HOST)" -p "$(CONF_DB_PORT)" -f scripts/databaseclean.sql
distclean: clean distclean_linux distclean_buildroot clean_measure
clean_linux:
- @$(MAKE) -C linux clean
+ @$(MAKE) -C $(CONF_LINUX_SOURCES) clean
distclean_linux:
- @$(MAKE) -C linux distclean
+ @$(MAKE) -C $(CONF_LINUX_SOURCES) distclean
clean_buildroot:
@$(MAKE) -C buildroot clean
#######################################
-.conf.mk: conf.py
+.conf.mk: conf.py .target
scripts/confmk.py
+.target:
+ $(error Please select target by writing it to .target file)
+
parse_kconfig:
- @if [[ `$(MAKE) -C scripts/parse_kconfig/ -q; echo $$?` != "0" ]]; then \
+ @if [ `$(MAKE) -C scripts/parse_kconfig/ -q; echo $$?` != "0" ]; then \
$(MAKE) -C scripts/parse_kconfig/; fi
write_config:
- @if [[ `$(MAKE) -C scripts/write_config/ -q; echo $$?` != "0" ]]; then \
+ @if [ `$(MAKE) -C scripts/write_config/ -q; echo $$?` != "0" ]; then \
$(MAKE) -C scripts/write_config/; fi
allconfig:
- @if [[ `$(MAKE) -C scripts/allconfig/ -q; echo $$?` != "0" ]]; then \
+ @if [ `$(MAKE) -C scripts/allconfig/ -q; echo $$?` != "0" ]; then \
$(MAKE) -C scripts/allconfig/; fi
picosat:
@if [ ! -e scripts/picosat-959/makefile ]; then \
cd scripts/picosat-959 && ./configure; fi
- @if [[ `$(MAKE) -C scripts/picosat-959 -q; echo $$?` != "0" ]]; then \
+ @if [ `$(MAKE) -C scripts/picosat-959 -q; echo $$?` != "0" ]; then \
$(MAKE) -C scripts/picosat-959; fi
-
-buildroot/.config:
- cp $(CONF_BUILDROOT_DEF_CONFIG) $@
-
-buildroot/system/skeleton/usr/bin/linux-conf-perf:
- cp $(CONF_BUILDROOT_INITSCRIPT) $@
- cat $(CONF_BUILDROOT_INITTAB_DIRECTIVE) >> buildroot/system/skeleton/etc/inittab