[PATCH app-xdm 2/5] config: move chooser into its own directory

Alan Coopersmith alan.coopersmith at oracle.com
Mon Nov 22 10:44:36 PST 2010


Gaetan Nadon wrote:
> Prevents the use of per target flags.
> Clearly shows which libraries and compiler options apply.
> 
> Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
> ---
>  .gitignore                     |    1 -
>  Makefile.am                    |   23 +++++------------------
>  chooser/.gitignore             |    1 +
>  chooser/Makefile.am            |   16 ++++++++++++++++
>  chooser.c => chooser/chooser.c |    0
>  configure.ac                   |    1 +
>  6 files changed, 23 insertions(+), 19 deletions(-)
>  create mode 100644 chooser/.gitignore
>  create mode 100644 chooser/Makefile.am
>  rename chooser.c => chooser/chooser.c (100%)
> 
> diff --git a/.gitignore b/.gitignore
> index 380859f..dfb5a53 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -76,6 +76,5 @@ core
>  #		Edit the following section as needed
>  # For example, !report.pc overrides *.pc. See 'man gitignore'
>  # 
> -chooser
>  xdm
>  xdmshell
> diff --git a/Makefile.am b/Makefile.am
> index de77c8b..7b0796d 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,6 +1,6 @@
> -# 
> +#
>  #  Copyright 2005  Red Hat, Inc.
> -# 
> +#
>  #  Permission to use, copy, modify, distribute, and sell this software and its
>  #  documentation for any purpose is hereby granted without fee, provided that
>  #  the above copyright notice appear in all copies and that both that
> @@ -10,7 +10,7 @@
>  #  specific, written prior permission.  Red Hat makes no
>  #  representations about the suitability of this software for any purpose.  It
>  #  is provided "as is" without express or implied warranty.
> -# 
> +#
>  #  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
>  #  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
>  #  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
> @@ -19,7 +19,7 @@
>  #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
>  #  PERFORMANCE OF THIS SOFTWARE.
>  
> -SUBDIRS = config greeter man
> +SUBDIRS = chooser config greeter man
>  
>  bin_PROGRAMS = xdm
>  noinst_PROGRAMS =
> @@ -30,9 +30,6 @@ else
>  noinst_PROGRAMS += xdmshell
>  endif
>  
> -xdmlibdir = $(XDMLIBDIR)
> -xdmlib_PROGRAMS = chooser
> -
>  AM_CFLAGS = $(CWARNFLAGS)
>  
>  #
> @@ -100,16 +97,6 @@ xdmshell_CFLAGS = $(XDMSHELL_CFLAGS) -DBINDIR="\"$(bindir)\""
>  xdmshell_SOURCES =	\
>          xdmshell.c
>  
> -#
> -#  chooser
> -#
> -
> -chooser_CFLAGS = $(CHOOSER_CFLAGS)
> -chooser_LDADD = $(CHOOSER_LIBS)
> -
> -chooser_SOURCES =	\
> -	chooser.c
> -
>  # App default files
>  
>  # This ensures distcheck is performed in a location where user has write access
> @@ -124,8 +111,8 @@ ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
>  lint:
>  	$(LINT) $(ALL_LINT_FLAGS) $(xdm_CFLAGS) $(xdm_SOURCES) $(xdm_LIBS)
>  	$(LINT) $(ALL_LINT_FLAGS) $(xdmshell_CFLAGS) $(xdmshell_SOURCES)
> -	$(LINT) $(ALL_LINT_FLAGS) $(chooser_CFLAGS) $(chooser_SOURCES) $(chooser_LDADD)
>  	(cd greeter && $(MAKE) $(AM_MAKEFLAGS) lint)
> +	(cd chooser && $(MAKE) $(AM_MAKEFLAGS) lint)
>  endif LINT
>  
>  MAINTAINERCLEANFILES = ChangeLog INSTALL
> diff --git a/chooser/.gitignore b/chooser/.gitignore
> new file mode 100644
> index 0000000..8abd804
> --- /dev/null
> +++ b/chooser/.gitignore
> @@ -0,0 +1 @@
> +chooser
> diff --git a/chooser/Makefile.am b/chooser/Makefile.am
> new file mode 100644
> index 0000000..8374bbe
> --- /dev/null
> +++ b/chooser/Makefile.am
> @@ -0,0 +1,16 @@
> +xdmlibdir = $(XDMLIBDIR)
> +xdmlib_PROGRAMS = chooser
> +
> +AM_CPPFLAGS = -I$(top_srcdir)
> +AM_CFLAGS = $(CWARNFLAGS) $(CHOOSER_CFLAGS)
> +AM_LDFLAGS = $(CHOOSER_LIBS)
> +
> +chooser_SOURCES = chooser.c
> +
> +if LINT
> +ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) \
> +		$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
> +
> +lint:
> +	$(LINT) $(ALL_LINT_FLAGS) $(chooser_SOURCES) $(AM_LDFLAGS)
> +endif LINT
> diff --git a/chooser.c b/chooser/chooser.c
> similarity index 100%
> rename from chooser.c
> rename to chooser/chooser.c
> diff --git a/configure.ac b/configure.ac
> index e94ee98..c185d3a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -537,6 +537,7 @@ AC_SUBST(appdefaultdir)
>  AC_SUBST(MKTEMP_COMMAND)
>  
>  AC_CONFIG_FILES([Makefile
> +		chooser/Makefile
>  		config/Makefile
>  		greeter/Makefile
>  		man/Makefile])

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list