2000-07-30 19:03:52 +02:00
|
|
|
name=zsh/main
|
|
|
|
|
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
|
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; \
|
|
|
|
if test x$(FUNCTIONS_SUBDIRS) != x -a \
|
|
|
|
x$(FUNCTIONS_SUBDIRS) != xno; then \
|
|
|
|
fpath_tmp="`for f in $$FUNCTIONS_INSTALL; do \
|
|
|
|
echo $$f | sed s%/.*%%; \
|
|
|
|
done | sort | uniq`"; \
|
|
|
|
fpath_tmp="`echo $$fpath_tmp | sed 's/ /\", \"/g'`"; \
|
|
|
|
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
|
|
|
|
|
|
|
|
bltinmods.list: modules.stamp modules-bltin xmods.conf mkbltnmlst.sh
|
|
|
|
srcdir='$(sdir)' MODBINS='modules-bltin' \
|
|
|
|
XMODCF='$(sdir)/xmods.conf' $(SHELL) $(sdir)/mkbltnmlst.sh $@
|
|
|
|
|
|
|
|
zshxmods.h: modules-bltin xmods.conf
|
|
|
|
@echo "Creating \`$@'."
|
|
|
|
@( \
|
|
|
|
binmods=`sed 's/^/ /;s/$$/ /' modules-bltin`; \
|
2000-07-30 19:03:52 +02:00
|
|
|
for mod in `sed 's/^.* //' $(sdir_src)/xmods.conf`; do \
|
|
|
|
q_mod=`echo $$mod | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`; \
|
1999-04-15 20:05:38 +02:00
|
|
|
case $$binmods in \
|
|
|
|
*" $$mod "*) \
|
2000-07-30 19:03:52 +02:00
|
|
|
echo "#define LINKED_XMOD_$$q_mod 1" ;; \
|
1999-04-15 20:05:38 +02:00
|
|
|
*) echo "#ifdef DYNAMIC"; \
|
2000-07-30 19:03:52 +02:00
|
|
|
echo "# define UNLINKED_XMOD_$$q_mod 1"; \
|
1999-04-15 20:05:38 +02:00
|
|
|
echo "#endif" ;; \
|
|
|
|
esac; \
|
2000-07-30 19:03:52 +02:00
|
|
|
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
|