Thread View: gnu.utils.bug
2 messages
2 total messages
Started by Andy Smoak
Thu, 29 Oct 1992 19:45
Question about GNU make
Author: Andy Smoak
Date: Thu, 29 Oct 1992 19:45
Date: Thu, 29 Oct 1992 19:45
33 lines
1711 bytes
1711 bytes
This is not really a bug report, more a cry for help. I'm trying to create a gnu makefile that has several recursive targets. The classic example would be a clean-all, which should clean the current directory and any subdirectories. My target in my makefile looks like this: clean-all depend-all lint-all: $(patsubst %-all,%, $@) ifneq "$(SUBDIRS)" "" -(for i in $(SUBDIRS) ; do\ $(MAKE) -C $$i $@; done) endif where SUBDIRS is a list of directories. What I am trying to get here is that if I do a make clean-all, the clean-all target depends upon a target clean, then it does a clean-all in every subdirectory. What I get is a dependency that is basically NULL. It never executes the clean (or depend or lint), but does execute the rest of the rule. Any ideas about how to get this to work? BTW, I realize that I could just create separate targets for each of these, repeating the code under each target. For now, I guess that is what I will do. Andy Smoak -- F. Andrew Smoak PHONE: (703) 342-6700, (800) 423-1183 FiberCom, Inc. FAX: (703) 342-5961 P.O. Box 11966 INTERNET: fas@fibercom.com Roanoke, VA 24022-1966 UUCP: ...!uunet!fibercom!fas
Re: Question about GNU make
Author: Andy Smoak
Date: Fri, 30 Oct 1992 18:01
Date: Fri, 30 Oct 1992 18:01
24 lines
1223 bytes
1223 bytes
In article <40942@fibercom.COM> fas@mudlick.UUCP (I) writes: >This is not really a bug report, more a cry for help. > >clean-all depend-all lint-all: $(patsubst %-all,%, $@) > ifneq "$(SUBDIRS)" "" > -(for i in $(SUBDIRS) ; do\ > $(MAKE) -C $$i $@; done) > endif > I have the answer (thanks Roland), the target line should be: clean-all depend-all lint-all: %-all: % and, this is in the manual, I just missed it. Thanks, Andy Smoak -- F. Andrew Smoak PHONE: (703) 342-6700, (800) 423-1183 FiberCom, Inc. FAX: (703) 342-5961 P.O. Box 11966 INTERNET: fas@fibercom.com Roanoke, VA 24022-1966 UUCP: ...!uunet!fibercom!fas
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads