Re: [PATCH 23/23] Code refactoring: replaced macro 'XDND' by 'USE_DOCK_XDND' for consistency

Rodolfo García Peñas <[email protected]>
Newsgroups gmane.compw.window-managers.windowmaker.devel
Message-ID <[email protected]>
On Mon, 06 Apr 2015, Christophe CURIS escribió:

> diff --git a/configure.ac b/configure.ac
> index 4e55a94..6a02376 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -502,15 +502,16 @@ AS_IF([test "x$enable_modelock" = "xyes"],
>  dnl XDND Drag-nd-Drop support
>  dnl =========================
>  AC_ARG_ENABLE([xdnd],
> -    [AS_HELP_STRING([--disable-xdnd], [disable Drag-nd-Drop support])],
> +    [AS_HELP_STRING([--disable-xdnd], [disable support for Drag-and-Drop on the dock @<:@default=enabled@:>@])],
>      [AS_CASE(["$enableval"],
>          [yes|no], [],
>          [AC_MSG_ERROR([bad value $enableval for --disable-xdnd]) ]) ],
>      [enable_xdnd=yes])
>  AS_IF([test "x$enable_xdnd" = "xyes"],
> -    [supported_xext="$supported_xext XDnD"
> -     AC_DEFINE([XDND], [1], [whether Drag-nd-Drop support should be enabled])],
> +    [supported_core="$supported_core XDnD"
> +     AC_DEFINE([USE_DOCK_XDND], [1], [whether Drag-and-Drop on the dock should be enabled])],
>      [unsupported="$unsupported XDnd"])
> +AM_CONDITIONAL([USE_DOCK_XDND], [test "x$enable_dock_xdnd" != "xno"])
>  
>  
>  dnl XShape support
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 56ebe08..7fe9db7 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -84,7 +84,6 @@ wmaker_SOURCES = 	\
>  	usermenu.c \
>  	usermenu.h \
>  	xdnd.h \
> -	xdnd.c \
>  	xinerama.h \
>  	xinerama.c \
>  	xmodifier.h \
> @@ -108,6 +107,9 @@ wmaker_SOURCES = 	\
>  	wsmap.c \
>  	wsmap.h
>  
> +if USE_DOCK_XDND
> +wmaker_SOURCES += xdnd.c
> +endif
>  if USE_MWM_HINTS
>  wmaker_SOURCES += motif.h motif.c
>  endif

Hi,

I am not sure if this patch is correct, because the xdnd.c file is included always in the Makefile file, so the compiler try to use it. I am not sure if I am missing something:

kix@debian:~/src/wmaker/wmaker-crm$ ./configure --disable-xdnd >/dev/null 2>&1
kix@debian:~/src/wmaker/wmaker-crm$ grep xdnd.c src/*
src/Makefile:am__append_1 = xdnd.c
src/Makefile:   wmspec.c workspace.c workspace.h wsmap.c wsmap.h xdnd.c \
src/Makefile.am:wmaker_SOURCES += xdnd.c
src/Makefile.in:@USE_DOCK_XDND_TRUE@am__append_1 = xdnd.c
src/Makefile.in:        wmspec.c workspace.c workspace.h wsmap.c wsmap.h xdnd.c \
kix@debian:~/src/wmaker/wmaker-crm$ make distclean >/dev/null 2>&1
kix@debian:~/src/wmaker/wmaker-crm$ ./configure >/dev/null 2>&1
kix@debian:~/src/wmaker/wmaker-crm$ grep xdnd.c src/*
src/Makefile:am__append_1 = xdnd.c
src/Makefile:   wmspec.c workspace.c workspace.h wsmap.c wsmap.h xdnd.c \
src/Makefile.am:wmaker_SOURCES += xdnd.c
src/Makefile.in:@USE_DOCK_XDND_TRUE@am__append_1 = xdnd.c
src/Makefile.in:        wmspec.c workspace.c workspace.h wsmap.c wsmap.h xdnd.c \
kix@debian:~/src/wmaker/wmaker-crm$ date
dom jun  7 19:24:25 CEST 2015
kix@debian:~/src/wmaker/wmaker-crm$ ls -l src/Makefile
-rw-r--r-- 1 kix kix 28709 jun  7 19:24 src/Makefile
kix@debian:~/src/wmaker/wmaker-crm$

Thanks for your reply,
Cheers,
kix.


-- 
To unsubscribe, send mail to [email protected].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.