Unix Programming - How to let gmake terminate by itself when it encounters error when processing subdir.

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > October 2005 > How to let gmake terminate by itself when it encounters error when processing subdir.





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to let gmake terminate by itself when it encounters error when processing subdir.
PengYu.UT@gmail.com

2005-10-24, 3:48 pm

Hi,

Suppose my source code structure is

parent/
+----subdir1/
+----subdir2/
+----subdir3/

In each subdir, there is a Makefile and the source code.

I put the following Make file in parent dir. When I run gmake in parent
dir, gmake won't stop even if there is any compile errors in the
subdirectories. Is there anyway to make gmake stop when it encounter
errors.

Best wishes,
Peng


SUBDIRS = $(filter-out Makefile% README batch central_depository
tags,$(wildcard *))
NOTES =
SHELL = /bin/bash

..PHONY: all run clean backup

all:
@for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir; \
done

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com