Commit 5a6f8d2b authored by Arnaud Lacombe's avatar Arnaud Lacombe

kconfig: nuke LKC_DIRECT_LINK cruft

This interface is not (and has never been ?) used by any frontend, just get rid
of it.
Signed-off-by: default avatarArnaud Lacombe <lacombar@gmail.com>
parent 84250386
...@@ -170,8 +170,8 @@ mconf-objs := mconf.o zconf.tab.o $(lxdialog) ...@@ -170,8 +170,8 @@ mconf-objs := mconf.o zconf.tab.o $(lxdialog)
nconf-objs := nconf.o zconf.tab.o nconf.gui.o nconf-objs := nconf.o zconf.tab.o nconf.gui.o
kxgettext-objs := kxgettext.o zconf.tab.o kxgettext-objs := kxgettext.o zconf.tab.o
qconf-cxxobjs := qconf.o qconf-cxxobjs := qconf.o
qconf-objs := kconfig_load.o zconf.tab.o qconf-objs := zconf.tab.o
gconf-objs := gconf.o kconfig_load.o zconf.tab.o gconf-objs := gconf.o zconf.tab.o
hostprogs-y := conf hostprogs-y := conf
...@@ -203,7 +203,7 @@ ifeq ($(gconf-target),1) ...@@ -203,7 +203,7 @@ ifeq ($(gconf-target),1)
hostprogs-y += gconf hostprogs-y += gconf
endif endif
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck
clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
clean-files += mconf qconf gconf nconf clean-files += mconf qconf gconf nconf
clean-files += config.pot linux.pot clean-files += config.pot linux.pot
...@@ -223,12 +223,11 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) ...@@ -223,12 +223,11 @@ HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC)
HOSTCFLAGS_lex.zconf.o := -I$(src) HOSTCFLAGS_lex.zconf.o := -I$(src)
HOSTCFLAGS_zconf.tab.o := -I$(src) HOSTCFLAGS_zconf.tab.o := -I$(src)
HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl HOSTLOADLIBES_qconf = $(KC_QT_LIBS)
HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS)
HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0`
HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0`
-D LKC_DIRECT_LINK
HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
...@@ -318,18 +317,11 @@ endif ...@@ -318,18 +317,11 @@ endif
$(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c $(obj)/zconf.tab.o: $(obj)/lex.zconf.c $(obj)/zconf.hash.c
$(obj)/kconfig_load.o: $(obj)/lkc_defs.h $(obj)/qconf.o: $(obj)/qconf.moc
$(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h
$(obj)/gconf.o: $(obj)/lkc_defs.h
$(obj)/%.moc: $(src)/%.h $(obj)/%.moc: $(src)/%.h
$(KC_QT_MOC) -i $< -o $@ $(KC_QT_MOC) -i $< -o $@
$(obj)/lkc_defs.h: $(src)/lkc_proto.h
$(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
# Extract gconf menu items for I18N support # Extract gconf menu items for I18N support
$(obj)/gconf.glade.h: $(obj)/gconf.glade $(obj)/gconf.glade.h: $(obj)/gconf.glade
$(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static void conf(struct menu *menu); static void conf(struct menu *menu);
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static void conf_warning(const char *fmt, ...) static void conf_warning(const char *fmt, ...)
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define DEBUG_EXPR 0 #define DEBUG_EXPR 0
......
...@@ -1507,10 +1507,6 @@ int main(int ac, char *av[]) ...@@ -1507,10 +1507,6 @@ int main(int ac, char *av[])
char *env; char *env;
gchar *glade_file; gchar *glade_file;
#ifndef LKC_DIRECT_LINK
kconfig_load();
#endif
bindtextdomain(PACKAGE, LOCALEDIR); bindtextdomain(PACKAGE, LOCALEDIR);
bind_textdomain_codeset(PACKAGE, "UTF-8"); bind_textdomain_codeset(PACKAGE, "UTF-8");
textdomain(PACKAGE); textdomain(PACKAGE);
......
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
#include "lkc.h"
#define P(name,type,arg) type (*name ## _p) arg
#include "lkc_proto.h"
#undef P
void kconfig_load(void)
{
void *handle;
char *error;
handle = dlopen("./libkconfig.so", RTLD_LAZY);
if (!handle) {
handle = dlopen("./scripts/kconfig/libkconfig.so", RTLD_LAZY);
if (!handle) {
fprintf(stderr, "%s\n", dlerror());
exit(1);
}
}
#define P(name,type,arg) \
{ \
name ## _p = dlsym(handle, #name); \
if ((error = dlerror())) { \
fprintf(stderr, "%s\n", error); \
exit(1); \
} \
}
#include "lkc_proto.h"
#undef P
}
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static char *escape(const char* text, char *bf, int len) static char *escape(const char* text, char *bf, int len)
......
...@@ -785,7 +785,6 @@ char *zconftext; ...@@ -785,7 +785,6 @@ char *zconftext;
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define START_STRSIZE 16 #define START_STRSIZE 16
......
...@@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; ...@@ -21,12 +21,7 @@ static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c;
extern "C" { extern "C" {
#endif #endif
#ifdef LKC_DIRECT_LINK
#define P(name,type,arg) extern type name arg #define P(name,type,arg) extern type name arg
#else
#include "lkc_defs.h"
#define P(name,type,arg) extern type (*name ## _p) arg
#endif
#include "lkc_proto.h" #include "lkc_proto.h"
#undef P #undef P
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <unistd.h> #include <unistd.h>
#include <locale.h> #include <locale.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#include "lxdialog/dialog.h" #include "lxdialog/dialog.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
static const char nohelp_text[] = N_( static const char nohelp_text[] = N_(
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
#include <string.h> #include <string.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#include "nconf.h" #include "nconf.h"
#include <ctype.h> #include <ctype.h>
......
...@@ -1745,10 +1745,6 @@ int main(int ac, char** av) ...@@ -1745,10 +1745,6 @@ int main(int ac, char** av)
bindtextdomain(PACKAGE, LOCALEDIR); bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE); textdomain(PACKAGE);
#ifndef LKC_DIRECT_LINK
kconfig_load();
#endif
progname = av[0]; progname = av[0];
configApp = new QApplication(ac, av); configApp = new QApplication(ac, av);
if (ac > 1 && av[1][0] == '-') { if (ac > 1 && av[1][0] == '-') {
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <regex.h> #include <regex.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
struct symbol symbol_yes = { struct symbol symbol_yes = {
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define START_STRSIZE 16 #define START_STRSIZE 16
......
...@@ -88,7 +88,6 @@ ...@@ -88,7 +88,6 @@
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>
#define LKC_DIRECT_LINK
#include "lkc.h" #include "lkc.h"
#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) #define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment