From: Duncan C. <dun...@us...> - 2005-01-08 17:38:12
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31754/mk Modified Files: common.mk Log Message: bludgeon automake into submission. Stop it from falsely detecting clashes between source modules producing the same object file. Also --include the module header for .hsc files. Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- common.mk 20 Dec 2004 03:30:59 -0000 1.47 +++ common.mk 8 Jan 2005 17:38:03 -0000 1.48 @@ -12,7 +12,11 @@ $(addprefix -package ,$($(NAME)_PACKAGEDEPS)) \ $(AM_LDFLAGS) $($(NAME)_LDFLAGS)) -.hs.o: $(CONFIG_H) +#Using pattern rule here to prevent automake from understanding the rule +#and falsely concluding that two source files will produce the same object +#file even though the object files will be in different directories. +#Obviously the 'subdir-objects' option only works for C/C++ files. +%.o : %.hs $(CONFIG_H) @echo Building for $(NAME) $(strip $(HC) -c $< -o $@ $(HCFLAGS) $($(NAME)_HCFLAGS) \ $(call getVar,$<,HCFLAGS) -i$(call pkgVPATH,$(NAME)) \ @@ -85,7 +89,7 @@ $($(NAME)_CFLAGS))\ $(filter -I%,$(AM_CPPFLAGS)) \ $($(NAME)_CPPFLAGS)\ - --include $(CONFIG_H) \ + --include $(CONFIG_H) --include $($(NAME)_HEADER) \ --cc=$(HC) --lflag=-no-hs-main $<) .chs.hs: |