* Makefile.in (REQUIRED_SUBDIRS): New var.
authorDoug Evans <dje@google.com>
Wed, 6 Oct 2010 16:46:12 +0000 (16:46 +0000)
committerDoug Evans <dje@google.com>
Wed, 6 Oct 2010 16:46:12 +0000 (16:46 +0000)
(subdir_do): Verify required subdir Makefiles exist.

gdb/ChangeLog
gdb/Makefile.in

index e1d6cb07fa0b342358e78f9de8e777a5dca05fe2..d3800205764bb973bf07d7606b1545302d3aaf14 100644 (file)
@@ -4,6 +4,9 @@
 
 2010-10-06  Doug Evans  <dje@google.com>
 
+       * Makefile.in (REQUIRED_SUBDIRS): New var.
+       (subdir_do): Verify required subdir Makefiles exist.
+
        Create subdir data-directory.
        * Makefile.in (XML_SYSCALL_DIR, XML_SYSCALL_FILES): Moved to
        data-directory/Makefile.in.
index bfb4b59634b0305ee7d0a5c65638cd493b994de0..b856c3a34679255394a5c20377b094c57842ef8f 100644 (file)
@@ -875,6 +875,12 @@ TSOBS = inflow.o
 SUBDIRS = @subdirs@ data-directory
 CLEANDIRS = $(SUBDIRS) gnulib
 
+# List of subdirectories in the build tree that must exist.
+# This is used to force build failures in existing trees when
+# a new directory is added.
+# The format here is for the `case' shell command.
+REQUIRED_SUBDIRS = doc | testsuite | gnulib | data-directory
+
 # For now, shortcut the "configure GDB for fewer languages" stuff.
 YYFILES = c-exp.c \
        cp-name-parser.c \
@@ -1239,6 +1245,13 @@ diststuff: $(DISTSTUFF) $(PACKAGE).pot $(CATALOGS)
 
 subdir_do: force
        @for i in $(DODIRS); do \
+               case $$i in \
+               $(REQUIRED_SUBDIRS)) \
+                       if [ ! -f ./$$i/Makefile ] ; then \
+                               echo "Missing $$i/Makefile" >&2 ; \
+                               exit 1 ; \
+                       fi ;; \
+               esac ; \
                if [ -f ./$$i/Makefile ] ; then \
                        if (cd ./$$i; \
                                $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \