diff options
Diffstat (limited to 'kconfig')
-rw-r--r-- | kconfig/.gitignore | 5 | ||||
-rw-r--r-- | kconfig/Makefile.am | 49 | ||||
-rw-r--r-- | kconfig/Makefile.in | 120 | ||||
-rw-r--r-- | kconfig/kconfig.mk | 68 | ||||
-rw-r--r-- | kconfig/lxdialog/.gitignore | 2 |
5 files changed, 52 insertions, 192 deletions
diff --git a/kconfig/.gitignore b/kconfig/.gitignore index 49c0689..69967bc 100644 --- a/kconfig/.gitignore +++ b/kconfig/.gitignore @@ -1,8 +1,9 @@ conf ?conf *.o -*.dep +.deps +zconf.c zconf.lex.c -zconf.tab.c *.exe Makefile +.dirstamp diff --git a/kconfig/Makefile.am b/kconfig/Makefile.am new file mode 100644 index 0000000..a54c170 --- /dev/null +++ b/kconfig/Makefile.am @@ -0,0 +1,49 @@ +## vim: set noet : + +## TBD turn off program renaming for these? Or account for it in ct-ng script? +## TBD when kconfig is split into a subpackage, need to remove this option from sub-configure +transform = s,x,x, + +## TBD install into lib/crosstool-ng/kconfig? or move to libexec which seems more suitable +pkglibexec_PROGRAMS = conf nconf mconf + +EXTRA_DIST = zconf.y zconf.l \ + expr.h list.h lkc.h lkc_proto.h nconf.h lxdialog/dialog.h \ + confdata.c expr.c kconf_id.c menu.c symbol.c util.c + +CLEANFILES = zconf.lex.c zconf.c +BUILT_SOURCES = zconf.c zconf.lex.c + +AM_LFLAGS = -L -Pzconf +AM_YFLAGS = -l -b zconf -p zconf +AM_CPPFLAGS = -include config.h -DCONFIG_=\"CT_\" + +conf_SOURCES = conf.c zconf.c + +nconf_SOURCES = nconf.c nconf.gui.c zconf.c +nconf_CFLAGS = $(CURSES_CFLAGS) +nconf_LDADD = $(MENU_LIBS) $(PANEL_LIBS) $(CURSES_LIBS) + +mconf_SOURCES = mconf.c zconf.c lxdialog/checklist.c lxdialog/inputbox.c \ + lxdialog/menubox.c lxdialog/textbox.c lxdialog/util.c \ + lxdialog/yesno.c +mconf_LDADD = $(CURSES_LIBS) + +# automake's support for yacc/lex/gperf is too idiosyncratic. It doesn't +# support a common pattern of including lex-generated file into yacc, nor does +# it support using a different base name for the generated C files. +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; + +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; + +zconf.c: zconf.y + $(AM_V_YACC)$(YACCCOMPILE) -o$@ $< + +zconf.lex.c: zconf.l + $(AM_V_LEX)$(LEXCOMPILE) -o$@ $< diff --git a/kconfig/Makefile.in b/kconfig/Makefile.in deleted file mode 100644 index 7e18b6e..0000000 --- a/kconfig/Makefile.in +++ /dev/null @@ -1,120 +0,0 @@ -#----------------------------------------------------------- -# Hmmm! Cheesy build! -# Or: where I can unveil my make-fu... :-] - -__silent = $(if $(V),,@printf ' %-7s %s\n' '$1' '$(if $2,$2,$(strip $<))' && ) -__silent_rm = $(call __silent,RM,$1)rm -f $1 - -PROGS = conf mconf nconf - -all: $(PROGS) - @true # Just be silent, you fscking son of a fscking beach... - -# Build flags -CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\"" -LDFLAGS = $(INTL_LIBS) - -ifneq (@DPKG_BUILDFLAGS@,) -CFLAGS += $(shell @DPKG_BUILDFLAGS@ --get CPPFLAGS) \ - $(shell @DPKG_BUILDFLAGS@ --get CFLAGS) -LDFLAGS += $(shell @DPKG_BUILDFLAGS@ --get LDFLAGS) -endif - -# Compiler flags to use gettext -ifeq ($(gettext),) -INTL_CFLAGS = -Wno-format-security -DKBUILD_NO_NLS -endif - -# Compiler and linker flags to use ncurses -NCURSES_CFLAGS = -DCURSES_LOC="\"$(curses_hdr)\"" -NCURSES_LDFLAGS = $(LIBS) - -# Common source files -COMMON_SRC = zconf.tab.c -COMMON_OBJ = $(patsubst %.c,%.o,$(COMMON_SRC)) -COMMON_DEP = $(patsubst %.o,%.dep,$(COMMON_OBJ)) -$(COMMON_OBJ) $(COMMON_DEP): CFLAGS += $(INTL_CFLAGS) -I. - -# lxdialog source files -LX_SRC = $(sort $(wildcard lxdialog/*.c)) -LX_OBJ = $(patsubst %.c,%.o,$(LX_SRC)) -LX_DEP = $(patsubst %.o,%.dep,$(LX_OBJ)) -$(LX_OBJ) $(LX_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS) - -# What's needed to build 'conf' -conf_SRC = conf.c -conf_OBJ = $(patsubst %.c,%.o,$(conf_SRC)) -conf_DEP = $(patsubst %.o,%.dep,$(conf_OBJ)) -$(conf_OBJ) $(conf_DEP): CFLAGS += $(INTL_CFLAGS) - -# What's needed to build 'mconf' -mconf_SRC = mconf.c -mconf_OBJ = $(patsubst %.c,%.o,$(mconf_SRC)) -mconf_DEP = $(patsubst %.c,%.dep,$(mconf_SRC)) -$(mconf_OBJ) $(mconf_DEP): CFLAGS += $(NCURSES_CFLAGS) $(INTL_CFLAGS) -mconf: LDFLAGS += $(NCURSES_LDFLAGS) - -# What's needed to build 'nconf' -nconf_SRC = nconf.c nconf.gui.c -nconf_OBJ = $(patsubst %.c,%.o,$(nconf_SRC)) -nconf_DEP = $(patsubst %.c,%.dep,$(nconf_SRC)) -$(nconf_OBJ) $(nconf_DEP): CFLAGS += $(INTL_CFLAGS) -I/usr/include/ncurses -nconf: LDFLAGS += -lmenu -lpanel $(LIBS) - -# These are generated files: -ALL_OBJS = $(sort $(COMMON_OBJ) $(LX_OBJ) $(conf_OBJ) $(mconf_OBJ) $(nconf_OBJ)) -ALL_DEPS = $(sort $(COMMON_DEP) $(LX_DEP) $(conf_DEP) $(mconf_DEP) $(nconf_DEP)) - -# Cheesy auto-dependencies -DEPS = $(COMMON_DEP) -DEPS += $(conf_DEP) -DEPS += $(mconf_DEP) $(LX_DEP) -DEPS += $(nconf_DEP) --include $(DEPS) - -# Build the dependency for C files -%.dep: %.c - $(call __silent,DEP,$@)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -MM $< |$(sed) -r -e 's|([^:]+.o)( *:+)|$(<:.c=.o) $@\2|;' >$@ - -# Generate the grammar parser -zconf.tab.o: zconf.tab.c zconf.lex.c -zconf.tab.dep: zconf.tab.c zconf.lex.c - -.PRECIOUS: zconf.tab.c -zconf.tab.c: zconf.y - $(call __silent,BISON)bison -l -b zconf -p zconf $< - -zconf.lex.c: zconf.l - $(call __silent,LEX)flex -L -Pzconf -o$@ $< - -# Build C files -%.o: %.c - $(call __silent,CC)$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -o $@ -c $< - -# Actual link -mconf: $(COMMON_OBJ) $(LX_OBJ) $(mconf_OBJ) - $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) - -nconf: $(COMMON_OBJ) $(nconf_OBJ) - $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) - -conf: $(COMMON_OBJ) $(conf_OBJ) - $(call __silent,LD,$@)$(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) - -#----------------------------------------------------------- -# Installation -install: $(patsubst %,install-%,$(PROGS)) install-kconfig.mk - -$(patsubst %,install-%,$(PROGS)): install-%: % - $(call __silent,INSTALL,$<)install -m 0755 $< $(DESTDIR)/$< - -install-kconfig.mk: kconfig.mk - $(call __silent,INSTALL,$<)install -m 0644 $< $(DESTDIR)/$< - -#----------------------------------------------------------- -# Cleaning up the mess... - -clean: - $(call __silent,RM,objs)rm -f $(ALL_OBJS) $(ALL_DEPS) - $(call __silent_rm,$(PROGS)) - $(call __silent_rm,zconf.tab.c zconf.lex.c lex.backup) diff --git a/kconfig/kconfig.mk b/kconfig/kconfig.mk deleted file mode 100644 index c489c72..0000000 --- a/kconfig/kconfig.mk +++ /dev/null @@ -1,68 +0,0 @@ -# =========================================================================== -# crosstool-NG configuration targets -# These targets are used from top-level makefile - -#----------------------------------------------------------- -# The configurators rules - -# Top file of crosstool-NG configuration -export KCONFIG_TOP = $(CT_LIB_DIR)/config/config.in - -# We need CONF for savedefconfig in scripts/saveSample.sh -export CONF := $(CT_LIB_DIR)/kconfig/conf -MCONF := $(CT_LIB_DIR)/kconfig/mconf -NCONF := $(CT_LIB_DIR)/kconfig/nconf - -# Used by conf/mconf/nconf to find the .in files -export srctree=$(CT_LIB_DIR) - -.PHONY: menuconfig nconfig oldconfig savedefconfig defconfig - -menuconfig: - @$(CT_ECHO) " CONF $@" - $(SILENT)$(MCONF) $(KCONFIG_TOP) - -nconfig: - @$(CT_ECHO) " CONF $@" - $(SILENT)$(NCONF) $(KCONFIG_TOP) - -oldconfig: .config - @$(CT_ECHO) " CONF $@" - $(SILENT)$(sed) -i -r -f $(CT_LIB_DIR)/scripts/upgrade.sed $< - $(SILENT)$(CONF) --silent$@ $(KCONFIG_TOP) - -savedefconfig: .config - @$(CT_ECHO) ' GEN $@' - $(SILENT)$(CONF) --savedefconfig=$${DEFCONFIG-defconfig} $(KCONFIG_TOP) - -defconfig: - @$(CT_ECHO) ' CONF $@' - $(SILENT)$(CONF) --defconfig=$${DEFCONFIG-defconfig} $(KCONFIG_TOP) - -# Always be silent, the stdout an be >.config -extractconfig: - @$(awk) 'BEGIN { dump=0; } \ - dump==1 && $$0~/^\[.....\][[:space:]]+(# )?CT_/ { \ - $$1=""; \ - gsub("^[[:space:]]",""); \ - print; \ - } \ - $$0~/Dumping user-supplied crosstool-NG configuration: done in/ { \ - dump=0; \ - } \ - $$0~/Dumping user-supplied crosstool-NG configuration$$/ { \ - dump=1; \ - }' - -#----------------------------------------------------------- -# Help text used by make help - -help-config:: - @echo ' menuconfig - Update current config using a menu based program' - @echo ' nconfig - Update current config using a menu based program' - @echo ' oldconfig - Update current config using a provided .config as base' - @echo ' extractconfig - Extract to stdout the configuration items from a' - @echo ' build.log file piped to stdin' - @echo ' savedefconfig - Save current config as a mini-defconfig to $${DEFCONFIG}' - @echo ' defconfig - Update config from a mini-defconfig $${DEFCONFIG}' - @echo ' (default: $${DEFCONFIG}=./defconfig)' diff --git a/kconfig/lxdialog/.gitignore b/kconfig/lxdialog/.gitignore deleted file mode 100644 index f2e85c0..0000000 --- a/kconfig/lxdialog/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.o -*.dep |