Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: #include problem for generated files included in system.h



On Wed, 11 May 2011 01:04:37 +0400
"Alexey I. Froloff" <raorn@xxxxxxxxxxxx> wrote:
> make[2]: Entering directory `/usr/src/RPM/BUILD/zsh-4.3.11/Src'
> i586-alt-linux-gcc -c -I. -I../Src -I../Src -I../Src/Zle -I.
> -I/usr/include/pcre -DHAVE_CONFIG_H -pipe -Wall -g -O2 -march=i586
> -mtune=i686  -o builtin.o builtin.c In file included from
> zsh.mdh:17:0, from builtin.c:33: zsh_system.h:868:26: fatal error:
> zshcurses.h: No such file or directory compilation terminated.
> make[2]: *** [builtin.o] Error 1
> 
> Attached patch fixes this.

That's because the main shell now depends on zshcurses.h and zshterm.h
which it didn't used to; however, they still shouldn't be included
unconditionally, so aren't in the headers list.

There's actually a special may of indicating extra header dependencies
in the .mdd file...

Index: Src/zsh.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.mdd,v
retrieving revision 1.26
diff -p -u -r1.26 zsh.mdd
--- Src/zsh.mdd	10 May 2011 16:44:39 -0000	1.26
+++ Src/zsh.mdd	11 May 2011 08:51:11 -0000
@@ -16,6 +16,7 @@ signames.o sort.o string.o subst.o text.
 
 headers="../config.h zsh_system.h zsh.h sigcount.h signals.h \
 prototypes.h hashtable.h ztype.h"
+hdrdeps="zshcurses.h zshterm.h"
 
 :<<\Make
 @CONFIG_MK@
@@ -35,9 +36,6 @@ init.o params.o parse.o: version.h
 
 params.o: patchlevel.h
 
-# The main shell doesn't currently need zshcurses.h and zshterm.h,
-# but make sure these are built with the headers.
-# If it did need need them they would be in headers at the top instead.
 version.h: $(sdir_top)/Config/version.mk zshcurses.h zshterm.h
 	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
 


-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



Messages sorted by: Reverse Date, Date, Thread, Author