2000-07-30 19:03:52 +02:00
|
|
|
name=zsh/main
|
2000-11-26 21:01:01 +01:00
|
|
|
link=static
|
|
|
|
load=yes
|
|
|
|
# load=static should replace use of alwayslink
|
2005-02-15 19:31:41 +01:00
|
|
|
functions='Functions/Exceptions/* Functions/Misc/* Functions/MIME/* Functions/Prompts/*'
|
2000-07-30 19:03:52 +02:00
|
|
|
|
1999-04-15 20:05:38 +02:00
|
|
|
nozshdep=1
|
|
|
|
alwayslink=1
|
|
|
|
|
|
|
|
# autobins not specified because of alwayslink
|
|
|
|
|
|
|
|
objects="builtin.o compat.o cond.o exec.o glob.o hashtable.o \
|
|
|
|
hist.o init.o input.o jobs.o lex.o linklist.o loop.o math.o \
|
2000-07-30 19:03:52 +02:00
|
|
|
mem.o module.o options.o params.o parse.o pattern.o prompt.o signals.o \
|
2000-09-19 17:54:30 +02:00
|
|
|
signames.o string.o subst.o text.o utils.o watch.o"
|
1999-04-15 20:05:38 +02:00
|
|
|
|
|
|
|
headers="../config.h system.h zsh.h sigcount.h signals.h \
|
|
|
|
prototypes.h hashtable.h ztype.h"
|
|
|
|
|
|
|
|
:<<\Make
|
2000-07-30 19:03:52 +02:00
|
|
|
@CONFIG_MK@
|
|
|
|
|
|
|
|
signames.c: signames1.awk signames2.awk ../config.h @SIGNAL_H@
|
|
|
|
$(AWK) -f $(sdir)/signames1.awk @SIGNAL_H@ >sigtmp.c
|
|
|
|
$(CPP) sigtmp.c >sigtmp.out
|
|
|
|
$(AWK) -f $(sdir)/signames2.awk sigtmp.out > $@
|
|
|
|
rm -f sigtmp.c sigtmp.out
|
1999-04-15 20:05:38 +02:00
|
|
|
|
|
|
|
sigcount.h: signames.c
|
|
|
|
grep 'define.*SIGCOUNT' signames.c > $@
|
|
|
|
|
|
|
|
init.o: bltinmods.list zshpaths.h zshxmods.h
|
|
|
|
|
2000-07-30 19:03:52 +02:00
|
|
|
init.o params.o: version.h
|
1999-04-15 20:05:38 +02:00
|
|
|
|
|
|
|
version.h: $(sdir_top)/Config/version.mk
|
|
|
|
echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
|
|
|
|
|
2000-07-30 19:03:52 +02:00
|
|
|
zshpaths.h: Makemod $(CONFIG_INCS)
|
1999-04-15 20:05:38 +02:00
|
|
|
@echo '#define MODULE_DIR "'$(MODDIR)'"' > zshpaths.h.tmp
|
2005-07-20 18:08:12 +02:00
|
|
|
@if test x$(sitescriptdir) != xno; then \
|
|
|
|
echo '#define SITESCRIPT_DIR "'$(sitescriptdir)'"' >> zshpaths.h.tmp; \
|
|
|
|
fi
|
|
|
|
@if test x$(scriptdir) != xno; then \
|
|
|
|
echo '#define SCRIPT_DIR "'$(scriptdir)'"' >> zshpaths.h.tmp; \
|
|
|
|
fi
|
2000-07-30 19:03:52 +02:00
|
|
|
@if test x$(sitefndir) != xno; then \
|
|
|
|
echo '#define SITEFPATH_DIR "'$(sitefndir)'"' >> zshpaths.h.tmp; \
|
|
|
|
fi
|
|
|
|
@if test x$(fndir) != xno; then \
|
|
|
|
echo '#define FPATH_DIR "'$(fndir)'"' >> zshpaths.h.tmp; \
|
2005-07-26 17:01:40 +02:00
|
|
|
if test x$(FUNCTIONS_SUBDIRS) != x && \
|
|
|
|
test x$(FUNCTIONS_SUBDIRS) != xno; then \
|
2000-12-04 20:21:05 +01:00
|
|
|
fpath_tmp="`grep ' functions=.' \
|
|
|
|
$(dir_top)/config.modules | sed -e '/^#/d' -e '/ link=no/d' \
|
|
|
|
-e 's/^.* functions=//'`"; \
|
|
|
|
fpath_tmp=`for f in $$fpath_tmp; do \
|
2001-04-02 16:36:36 +02:00
|
|
|
echo $$f | sed -e 's%^Functions/%%' -e 's%/[^/]*$$%%' -e 's%/\*%%'; \
|
2005-07-26 17:01:40 +02:00
|
|
|
done | grep -v Scripts | sort | uniq`; \
|
2000-12-04 20:21:05 +01:00
|
|
|
fpath_tmp=`echo $$fpath_tmp | sed 's/ /\", \"/g'`; \
|
2000-07-30 19:03:52 +02:00
|
|
|
echo "#define FPATH_SUBDIRS { \"$$fpath_tmp\" }" \
|
|
|
|
>>zshpaths.h.tmp; \
|
|
|
|
fi; \
|
|
|
|
fi
|
1999-04-15 20:05:38 +02:00
|
|
|
@if cmp -s zshpaths.h zshpaths.h.tmp; then \
|
|
|
|
rm -f zshpaths.h.tmp; \
|
|
|
|
echo "\`zshpaths.h' is up to date." ; \
|
|
|
|
else \
|
|
|
|
mv -f zshpaths.h.tmp zshpaths.h; \
|
|
|
|
echo "Updated \`zshpaths.h'." ; \
|
|
|
|
fi
|
|
|
|
|
2000-11-26 21:01:01 +01:00
|
|
|
bltinmods.list: modules.stamp mkbltnmlst.sh $(dir_top)/config.modules
|
|
|
|
srcdir='$(sdir)' CFMOD='$(dir_top)/config.modules' \
|
|
|
|
$(SHELL) $(sdir)/mkbltnmlst.sh $@
|
1999-04-15 20:05:38 +02:00
|
|
|
|
2000-11-26 21:01:01 +01:00
|
|
|
zshxmods.h: $(dir_top)/config.modules
|
1999-04-15 20:05:38 +02:00
|
|
|
@echo "Creating \`$@'."
|
|
|
|
@( \
|
2000-11-26 21:01:01 +01:00
|
|
|
for q_mod in `grep ' load=yes' $(dir_top)/config.modules | \
|
|
|
|
grep ' link=static' | sed -e '/^#/d' -e 's/ .*//' \
|
|
|
|
-e 's/^name=//' -e 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`; do \
|
|
|
|
test x$q_mod = xzshQsmain && continue; \
|
|
|
|
echo "#define LINKED_XMOD_$$q_mod 1"; \
|
|
|
|
done; \
|
|
|
|
for q_mod in `grep ' load=yes' $(dir_top)/config.modules | \
|
|
|
|
grep ' link=dynamic' | sed -e '/^#/d' -e 's/ .*//' \
|
|
|
|
-e 's/^name=//' -e 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`; do \
|
|
|
|
test x$q_mod = x && continue; \
|
|
|
|
echo "#ifdef DYNAMIC"; \
|
|
|
|
echo "# define UNLINKED_XMOD_$$q_mod 1"; \
|
|
|
|
echo "#endif"; \
|
|
|
|
done; \
|
1999-04-15 20:05:38 +02:00
|
|
|
) > $@
|
|
|
|
|
|
|
|
clean-here: clean.zsh
|
|
|
|
clean.zsh:
|
|
|
|
rm -f sigcount.h signames.c bltinmods.list version.h zshpaths.h zshxmods.h
|
|
|
|
|
|
|
|
# This is not properly part of this module, but it is built as if it were.
|
2000-07-30 19:03:52 +02:00
|
|
|
main.o: main.c zsh.mdh main.epro
|
1999-04-15 20:05:38 +02:00
|
|
|
$(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) -o $@ $(sdir)/main.c
|
|
|
|
|
2000-07-30 19:03:52 +02:00
|
|
|
main.syms: $(PROTODEPS)
|
|
|
|
proto.zsh: main.epro
|
1999-04-15 20:05:38 +02:00
|
|
|
Make
|