Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed makefile so it doesn't die when some debug directories are miss…

…ing.
  • Loading branch information...
commit 78931ca573297b36d549157475a6768be29a0850 1 parent 6a6bd85
edrosten authored

Showing 1 changed file with 12 additions and 3 deletions. Show diff stats Hide diff stats

  1. +12 3 Makefile.in
15 Makefile.in
@@ -19,6 +19,7 @@ mandir = @mandir@
19 19 includedir = @includedir@
20 20 oldincludedir = /usr/include
21 21 arch= @build_cpu@
  22 +datarootdir=@datadir@
22 23
23 24
24 25 CC = @CC@
@@ -168,9 +169,17 @@ libcvd_debug.a: $(DEBUG_OBJS)
168 169 $(AR) crvs libcvd_debug.a $(DEBUG_OBJS)
169 170 $(RANLIB) libcvd_debug.a
170 171
171   -debug:
172   - mkdir -p debug/cvd_src debug/cvd_src/IRIX debug/cvd_src/Linux debug/cvd_src/OSX debug/cvd_src/fast debug/cvd_src/i686 debug/cvd_src/noarch debug/pnm_src debug/cvd_src/thread debug/cvd_src/nothread
  172 +#Automatically deduce the debug directories
  173 +DEBUG_DIRS=$(shell find ???_src -type d -not -name 'CVS' -printf 'debug/%p\n')
173 174
  175 +#This the debug subdir all debug directories, so specifying a dependency on this
  176 +#will ensure that all subdirs get created
  177 +debug:$(DEBUG_DIRS)
  178 +
  179 +#Multiple targets are allowed on the left, so all directories can be created in batch
  180 +#with a single rule
  181 +$(DEBUG_DIRS):
  182 + mkdir -p $(DEBUG_DIRS)
174 183
175 184 # Before we compile the test programs we need to augment the
176 185 # search paths with the path to libcvd, and also add libcvd to the
@@ -295,7 +304,7 @@ debug/%.o: %.cxx debug
295 304 debug/%.o: %.C debug
296 305 $(CXX) -I. $(CPPFLAGS) $(CXXFLAGS) $(DEBUGEXTRA) -c $< -o $@
297 306
298   -debug/%.o: %.s
  307 +debug/%.o: %.s debug
299 308 as -g -o $@ $<
300 309
301 310 %: %.o

0 comments on commit 78931ca

Please sign in to comment.
Something went wrong with that request. Please try again.