On Wed, May 5, 2010 at 2:47 AM, nature <[email protected]> wrote: > I am trying to generate dependency files. > > here is a part of my makefile > > ###################Dependency file generation############################## > #$(call make-depend,source-file,object-file,depend-file) > define make-depend ... > $(OBJ1):%.o:%.c > �...@echo "Compling $<" > $(call make-depend,$<,$@,$(subst .o,.d,$@)) > $(CC) -c $< -o $@ > > Somehow it is unable to generate .d files. When i execute the make file, it > throws the following error > : No such file or directoryh: line 1: aes.d.tmp > c:\WINNT\gmake.exe: *** [aes.o] Error 1 > > I am unable to figure out what is causing this error.. > > Can anyone help me identify the problem?
Looks to me like the main problem is complexity. To quote Brian Kernighan of K&R fame: "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Step 1) figure out what commands you can *manually* invoke at the shell to get the desired behavior. Step 2) make those commands work for a single file with just an explicit rule and no $(call)ing of macros. Step 3) make that work with a pattern rule. Step 4) decide whether there's some problem with the Makefile that requires additional changes. Philip Guenther _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
