[PATCH app-xdm 3/5] config: move xdmshell into its own directory

Gaetan Nadon memsize at videotron.ca
Mon Nov 22 07:32:47 PST 2010


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                       |   21 ++-------------------
 configure.ac                      |    3 ++-
 xdmshell/.gitignore               |    1 +
 xdmshell/Makefile.am              |   23 +++++++++++++++++++++++
 xdmshell.c => xdmshell/xdmshell.c |    0
 6 files changed, 28 insertions(+), 21 deletions(-)
 create mode 100644 xdmshell/.gitignore
 create mode 100644 xdmshell/Makefile.am
 rename xdmshell.c => xdmshell/xdmshell.c (100%)

diff --git a/.gitignore b/.gitignore
index dfb5a53..38a8090 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,4 +77,3 @@ core
 # For example, !report.pc overrides *.pc. See 'man gitignore'
 # 
 xdm
-xdmshell
diff --git a/Makefile.am b/Makefile.am
index 7b0796d..42c58d1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,17 +19,9 @@
 #  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 #  PERFORMANCE OF THIS SOFTWARE.
 
-SUBDIRS = chooser config greeter man
+SUBDIRS = chooser config greeter man xdmshell
 
 bin_PROGRAMS = xdm
-noinst_PROGRAMS =
-
-if INSTALL_XDMSHELL
-bin_PROGRAMS += xdmshell
-else
-noinst_PROGRAMS += xdmshell
-endif
-
 AM_CFLAGS = $(CWARNFLAGS)
 
 #
@@ -88,15 +80,6 @@ if HAS_KERBEROS_FIVE
 xdm_SOURCES += krb5auth.c
 endif
 
-#
-#  xdmshell
-#
-xdmshell_CFLAGS = $(XDMSHELL_CFLAGS) -DBINDIR="\"$(bindir)\""
-
-
-xdmshell_SOURCES =	\
-        xdmshell.c
-
 # App default files
 
 # This ensures distcheck is performed in a location where user has write access
@@ -110,7 +93,7 @@ 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)
+	(cd xdmshell && $(MAKE) $(AM_MAKEFLAGS) lint)
 	(cd greeter && $(MAKE) $(AM_MAKEFLAGS) lint)
 	(cd chooser && $(MAKE) $(AM_MAKEFLAGS) lint)
 endif LINT
diff --git a/configure.ac b/configure.ac
index c185d3a..e3ac7a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -540,5 +540,6 @@ AC_CONFIG_FILES([Makefile
 		chooser/Makefile
 		config/Makefile
 		greeter/Makefile
-		man/Makefile])
+		man/Makefile
+		xdmshell/Makefile])
 AC_OUTPUT
diff --git a/xdmshell/.gitignore b/xdmshell/.gitignore
new file mode 100644
index 0000000..9a70585
--- /dev/null
+++ b/xdmshell/.gitignore
@@ -0,0 +1 @@
+xdmshell
diff --git a/xdmshell/Makefile.am b/xdmshell/Makefile.am
new file mode 100644
index 0000000..137d74a
--- /dev/null
+++ b/xdmshell/Makefile.am
@@ -0,0 +1,23 @@
+
+if INSTALL_XDMSHELL
+bin_PROGRAMS = xdmshell
+else
+noinst_PROGRAMS = xdmshell
+endif
+
+AM_CPPFLAGS = -I$(top_srcdir)
+AM_CFLAGS = 			\
+	$(CWARNFLAGS)		\
+	$(XDMSHELL_CFLAGS)	\
+	-DBINDIR="\"$(bindir)\""
+
+xdmshell_SOURCES = xdmshell.c
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) \
+		$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
+
+lint:
+	$(LINT) $(ALL_LINT_FLAGS) $(xdmshell_SOURCES)
+endif LINT
+
diff --git a/xdmshell.c b/xdmshell/xdmshell.c
similarity index 100%
rename from xdmshell.c
rename to xdmshell/xdmshell.c
-- 
1.6.0.4



More information about the xorg-devel mailing list