mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-15 13:34:18 +01:00
107 lines
3.5 KiB
Plaintext
107 lines
3.5 KiB
Plaintext
name=zsh/main
|
|
link=static
|
|
load=yes
|
|
# load=static should replace use of alwayslink
|
|
functions='Functions/Exceptions/* Functions/Misc/* Functions/MIME/* Functions/Prompts/*'
|
|
|
|
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 \
|
|
mem.o module.o options.o params.o parse.o pattern.o prompt.o signals.o \
|
|
signames.o sort.o string.o subst.o text.o utils.o watch.o"
|
|
|
|
headers="../config.h system.h zsh.h sigcount.h signals.h \
|
|
prototypes.h hashtable.h ztype.h"
|
|
|
|
:<<\Make
|
|
@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
|
|
|
|
sigcount.h: signames.c
|
|
grep 'define.*SIGCOUNT' signames.c > $@
|
|
|
|
init.o: bltinmods.list zshpaths.h zshxmods.h
|
|
|
|
init.o params.o parse.o: version.h
|
|
|
|
version.h: $(sdir_top)/Config/version.mk
|
|
echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
|
|
|
|
zshpaths.h: Makemod $(CONFIG_INCS)
|
|
@echo '#define MODULE_DIR "'$(MODDIR)'"' > zshpaths.h.tmp
|
|
@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
|
|
@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; \
|
|
if test x$(FUNCTIONS_SUBDIRS) != x && \
|
|
test x$(FUNCTIONS_SUBDIRS) != xno; then \
|
|
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 \
|
|
echo $$f | sed -e 's%^Functions/%%' -e 's%/[^/]*$$%%' -e 's%/\*%%'; \
|
|
done | grep -v Scripts | sort | uniq`; \
|
|
fpath_tmp=`echo $$fpath_tmp | sed 's/ /\", \"/g'`; \
|
|
echo "#define FPATH_SUBDIRS { \"$$fpath_tmp\" }" \
|
|
>>zshpaths.h.tmp; \
|
|
fi; \
|
|
fi
|
|
@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
|
|
|
|
bltinmods.list: modules.stamp mkbltnmlst.sh $(dir_top)/config.modules
|
|
srcdir='$(sdir)' CFMOD='$(dir_top)/config.modules' \
|
|
$(SHELL) $(sdir)/mkbltnmlst.sh $@
|
|
|
|
zshxmods.h: $(dir_top)/config.modules
|
|
@echo "Creating \`$@'."
|
|
@( \
|
|
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; \
|
|
) > $@
|
|
|
|
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.
|
|
main.o: main.c zsh.mdh main.epro
|
|
$(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) -o $@ $(sdir)/main.c
|
|
|
|
main.syms: $(PROTODEPS)
|
|
proto.zsh: main.epro
|
|
Make
|