# |
# $Id: Makefile.in,v 1.81 1998/04/21 11:38:51 grubba Exp $ |
# |
|
# This line is needed on some machines. |
@SET_MAKE@ |
|
# Don't change this line. Define EXTRALIBS before this line if you |
# wish to add any libraries. |
LIBS=@LIBS@ $(EXTRALIBS) |
|
# This is normall the install program in the source directory |
INSTALL=@INSTALL@ |
|
SRCDIR=@srcdir@ |
VPATH=@srcdir@ |
|
# These are used while compiling |
LIBDIR_SRC = @LIBDIR@ |
TMP_BINDIR = @BINDIR@ |
TMP_BUILDDIR = @BUILDDIR@ |
TMP_DOCDIR = @DOCDIR@ |
TMP_LIBDIR = $(TMP_BUILDDIR)/lib |
|
prefix = @prefix@ |
exec_prefix = $(prefix)/bin |
lib_prefix = $(prefix)/lib/pike |
data_prefix = @datadir@ |
share_prefix = $(data_prefix)/pike |
|
# |
# use bison please, yacc isn't good enough. |
# |
YACC=@YACC@ |
YFLAGS=-d -v |
|
# If you don't have 'strchr', then add next flag to CFLAGS. |
# -Dstrchr=index -Dstrrchr=rindex |
# |
PROFIL= |
#PROFIL=-pg |
|
# |
# OS dependant flags |
# |
OSFLAGS= |
|
# |
#Enable warnings from the compiler, if wanted. |
# |
WARN=@WARN@ |
|
#add extra defines here |
# Be sure to use -g when looking for bugs |
DEFINES=@CPPFLAGS@ |
|
# -O should work with all compilers |
OPTIMIZE=@OPTIMIZE@ |
|
# Preprocessor flags. |
PREFLAGS=-I. -I$(SRCDIR) $(DEFINES) |
OTHERFLAGS=@CFLAGS@ @CPPFLAGS@ $(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL) |
NOOPTFLAGS=@CFLAGS@ @CPPFLAGS@ $(OSFLAGS) $(WARN) $(PROFIL) |
CFLAGS=$(PREFLAGS) $(OTHERFLAGS) |
|
SMARTLINK=@SMARTLINK@ |
REALCC=@REALCC@ |
CC=@CC@ |
CPP=@CPP@ |
|
AR=@AR@ |
|
LD=@LD@ |
LDFLAGS=$(CFLAGS) @LDFLAGS@ @LINKFORSHARED@ |
|
RUNPIKE=$(TMP_BUILDDIR)/pike -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS) |
|
MOST_MAKE_FLAGS = "prefix=$(prefix)" "exec_prefix=$(exec_prefix)" "CC=$(CC)" "TMP_BINDIR=$(TMP_BINDIR)" "DEFINES=$(DEFINES)" "TMP_LIBDIR=$(TMP_LIBDIR)" "RUNPIKE=$(RUNPIKE)" "INSTALL=$(INSTALL)" "NOOPTFLAGS=$(NOOPTFLAGS)" "AR=$(AR)" |
MAKE_FLAGS = $(MOST_MAKE_FLAGS) "OTHERFLAGS=$(OTHERFLAGS)" |
|
# Add alloca.o if you don't have alloca() on your machine. |
# Add ualarm.o if you don't have ualarm() on your machine. |
# |
OBJ= \ |
language.o \ |
constants.o \ |
cpp.o \ |
fdlib.o \ |
cyclic.o \ |
array.o \ |
backend.o \ |
builtin_functions.o \ |
callback.o \ |
encode.o \ |
docode.o \ |
dynamic_buffer.o \ |
dynamic_load.o \ |
error.o \ |
fd_control.o \ |
fsort.o \ |
gc.o \ |
hashtable.o \ |
las.o \ |
lex.o \ |
multiset.o \ |
signal_handler.o \ |
pike_types.o \ |
main.o \ |
mapping.o \ |
pike_memory.o \ |
module.o \ |
module_support.o \ |
object.o \ |
opcodes.o \ |
operators.o \ |
peep.o \ |
port.o \ |
program.o \ |
rusage.o \ |
stralloc.o \ |
stuff.o \ |
threads.o \ |
version.o \ |
svalue.o @EXTRA_OBJS@ |
|
# |
# User callable targets |
# |
|
|
all: module_objects hilfe |
$(MAKE) $(MAKE_FLAGS) pike |
|
pike: $(OBJ) compile_interpret modules/linker_options |
-@mv pike pike.old 2>/dev/null || true |
$(LD) $(LDFLAGS) $(OBJ) interpret.o `cat modules/linker_options` $(LIBS) -o pike |
|
# purify |
pure: $(OBJ) compile_interpret module_objects |
-@mv pike pike.old 2>/dev/null || true |
$(SMARTLINK) purify -thread_stack_change=8192 -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(REALCC) $(LDFLAGS) $(OBJ) interpret.o `cat modules/linker_options` $(LIBS) -o pike |
|
# purecov |
cover: $(OBJ) compile_interpret module_objects |
-@mv pike pike.old 2>/dev/null || true |
$(SMARTLINK) purecov purify -thread_stack_change=8192 -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(REALCC) $(LDFLAGS) $(OBJ) interpret.o `cat modules/linker_options` $(LIBS) -o pike |
|
# quantify |
quant: $(OBJ) compile_interpret module_objects |
-@mv pike pike.old 2>/dev/null || true |
$(SMARTLINK) quantify $(REALCC) $(LDFLAGS) $(OBJ) interpret.o `cat modules/linker_options` $(LIBS) -o pike |
|
atom: pike |
atom pike -tool atom -env threads -g -v `find lib/modues -type f -name '*.so' -print | sed -e 's/^/-incobj /g'` |
mv pike pike.pre-atom |
mv pike.third.threads pike |
@echo Make sure you have '.' in your LD_LIBRARY_PATH. |
|
pixie: pike |
atom pike -tool pixie -env threads -g -v `find lib/modues -type f -name '*.so' -print | sed -e 's/^/-incobj /g'` |
mv pike pike.pre-pixie |
mv pike.pixie.threads pixie |
@echo Make sure you have '.' in your LD_LIBRARY_PATH. |
|
hilfe: $(TMP_BINDIR)/hilfe Makefile |
@echo "Creating ./hilfe..."; \ |
if [ "$(exec_prefix)" != "/usr/local/bin" -a \ |
"$(exec_prefix)" != "/usr/local/bin/" ]; then \ |
( sed -e 's!/usr/local/bin!$(exec_prefix)!' <$(TMP_BINDIR)/hilfe \ |
>./hilfe && chmod 755 ./hilfe) || exit 1 ; \ |
else \ |
$(INSTALL) $(TMP_BINDIR)/hilfe `pwd` || exit 1; \ |
fi |
@echo "Done." |
|
|
# Several optimizers have problems with interpret.c |
# First try compiling with optimization and if that doesn't work, without. |
compile_interpret : force |
$(MAKE) $(MAKE_FLAGS) interpret.o || NO_ULIMIT=yes $(MAKE) $(MOST_MAKE_FLAGS) "OTHERFLAGS=$(NOOPTFLAGS)" interpret.o |
|
force : |
|
# install |
install: pike hilfe |
@echo |
@echo Installing Pike... |
@echo |
@echo "Creating directories..."; \ |
for d in "$(prefix)" "$(exec_prefix)" "$(prefix)/lib" \ |
"$(lib_prefix)" "$(data_prefix)" "$(share_prefix)" \ |
"$(prefix)/include" "$(prefix)/include/pike"; do \ |
if [ -d "$$d/." ]; then : ; else \ |
echo "$$d"; \ |
mkdir "$$d" || exit 1; \ |
chmod a+rx "$$d"; \ |
chmod u+w "$$d"; \ |
fi; \ |
done |
@for d in `cd "$(TMP_LIBDIR)"; find . -type d -print`; do \ |
if [ -d "$(lib_prefix)/$$d/." ]; then : ; else \ |
echo "$(lib_prefix)/$$d"; \ |
mkdir "$(lib_prefix)/$$d" || exit 1; \ |
chmod a+rx "$(lib_prefix)/$$d/."; \ |
chmod u+w "$(lib_prefix)/$$d/."; \ |
fi; \ |
done |
@for d in `cd "$(LIBDIR_SRC)"; find . -type d -print`; do \ |
if [ -d "$(share_prefix)/$$d/." ]; then : ; else \ |
echo "$(share_prefix)/$$d"; \ |
mkdir "$(share_prefix)/$$d" || exit 1; \ |
chmod a+rx "$(share_prefix)/$$d/."; \ |
chmod u+w "$(share_prefix)/$$d/."; \ |
fi; \ |
done |
@echo ; echo "Installing pike..."; \ |
if cmp "$(exec_prefix)/pike" ./pike >/dev/null 2>&1 ; then \ |
echo "This pike-binary is already installed." ; \ |
else \ |
if [ -f "$(exec_prefix)/pike" ]; then \ |
echo Renaming old "$(exec_prefix)/pike" to "$(exec_prefix)/pike.old"; \ |
mv -f "$(exec_prefix)/pike" "$(exec_prefix)/pike.old" || exit 1; \ |
else : ; fi ; \ |
echo "$(exec_prefix)/pike"; \ |
$(INSTALL) ./pike $(exec_prefix) || exit 1; \ |
chmod a+rx $(exec_prefix)/pike; \ |
chmod u+w $(exec_prefix)/pike; \ |
fi |
@if [ -f ./hilfe ]; then \ |
echo ; echo "Installing hilfe..."; \ |
if cmp "$(exec_prefix)/hilfe" $(TMP_BINDIR)/hilfe >/dev/null 2>&1 ; \ |
then \ |
echo "$(exec_prefix)/hilfe already installed." ; \ |
else \ |
if [ -f $(exec_prefix)/hilfe ]; then \ |
mv $(exec_prefix)/hilfe $(exec_prefix)/hilfe.old || exit 1; \ |
else : ; fi; \ |
echo "$(exec_prefix)/hilfe"; \ |
$(INSTALL) $(TMP_BINDIR)/hilfe $(exec_prefix) || exit 1; \ |
chmod a+rx $(exec_prefix)/hilfe; \ |
chmod u+w $(exec_prefix)/hilfe; \ |
fi; \ |
else : ; fi |
@echo ; echo "Installing header-files..."; \ |
for a in $(SRCDIR)/*.h *.h ; do \ |
$(INSTALL) $$a $(prefix)/include/pike || exit 1; \ |
chmod a+r $(prefix)/include/pike ; \ |
chmod u+w $(prefix)/include/pike ; \ |
done |
@echo ; echo "Installing modules written in Pike..."; \ |
for f in `cd "$(LIBDIR_SRC)"; find . -type f -print`; do \ |
if cmp "$(share_prefix)/$$f" "$(LIBDIR_SRC)/$$f" >/dev/null 2>&1 ; \ |
then : ; else \ |
echo "$(share_prefix)/$$f"; \ |
if [ -f "$(share_prefix)/$$f" ]; then \ |
mv -f "$(share_prefix)/$$f" "$(share_prefix)/$$f.old"; \ |
else : ; fi; \ |
if [ -f "$(lib_prefix)/$$f" ]; then \ |
if test "x$(lib_prefix)" != "x$(share_prefix)"; then \ |
mv -f "$(lib_prefix)/$$f" "$(lib_prefix)/$$f.now_in_share.old"; \ |
else : ; fi; \ |
else : ; fi; \ |
cp "$(LIBDIR_SRC)/$$f" "$(share_prefix)/$$f" || exit 1; \ |
chmod a+r "$(share_prefix)/$$f"; \ |
chmod u+w "$(share_prefix)/$$f"; \ |
fi ; \ |
done |
@echo ; echo "Installing modules written in C..."; \ |
for f in `cd "$(TMP_LIBDIR)"; find . -type f -print`; do \ |
if cmp "$(lib_prefix)/$$f" "$(TMP_LIBDIR)/$$f" >/dev/null 2>&1 ; \ |
then : ; else \ |
echo "$(lib_prefix)/$$f"; \ |
if [ -f "$(lib_prefix)/$$f" ]; then \ |
mv -f "$(lib_prefix)/$$f" "$(lib_prefix)/$$f.old"; \ |
else : ; fi; \ |
cp "$(TMP_LIBDIR)/$$f" "$(lib_prefix)/$$f" || exit 1; \ |
chmod a+r "$(lib_prefix)/$$f"; \ |
chmod u+w "$(lib_prefix)/$$f"; \ |
fi ; \ |
done |
|
# tidy up a bit |
tidy: |
-rm -f *.o core y.output y.tab.c y.tab.h |
-rm -f $(TMP_BINDIR)/core *.o *.i *.i~ testsuite |
|
# make clean |
clean: tidy |
-( cd modules; ${MAKE} $(MAKE_FLAGS) clean ) |
-rm -f TAGS tags |
-rm -f yacc.acts yacc.debug yacc.tmp *.debug.log a.out |
|
# make _really_ clean |
spotless: clean |
rm -f Makefile machine.h |
find . -type f '(' -name '*~' -o -name '.*~' -o -name core -o -name '.nfs*' -name '#*#' ')' -print | xargs rm -f |
-rm -f lexical.c mon.out *.ln config.status |
-rm -f $(TMP_BINDIR)/*~ $(TMP_BINDIR)/#*# |
-rm -f pike pike.old l.outa* |
-rm -f modules/*/testsuite |
-rm -rf lib |
|
# create tags |
tags: |
ctags *.c |
|
TAGS: |
etags -t *.h *.c |
|
# verify / debug |
verify_modules: |
( cd modules ; $(MAKE) $(MAKE_FLAGS) verify ) |
|
module_testsuites: |
( cd modules ; $(MAKE) $(MAKE_FLAGS) testsuites ) |
|
verify: module_testsuites testsuite master.pike |
$(RUNPIKE) $(TMP_BINDIR)/test_pike.pike modules/*/module_testsuite testsuite |
|
check: verify |
|
sure: verify |
|
# verify / debug verbose |
verbose_verify: module_testsuites testsuite master.pike |
$(RUNPIKE) $(TMP_BINDIR)/test_pike.pike --verbose modules/*/module_testsuite testsuite |
|
# verify & debug VERBOSE |
gdb_verify: module_testsuites testsuite master.pike |
@echo >.gdbinit handle SIGFPE nostop noprint pass |
@echo >>.gdbinit handle SIGUSR1 nostop noprint pass |
@echo >>.gdbinit run -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS) $(TMP_BINDIR)/test_pike.pike testsuite -v -v -f modules/*/module_testsuite |
gdb ./pike |
@rm .gdbinit |
|
# run hilfe, for interactive testing |
run_hilfe: |
$(RUNPIKE) $(TMP_BINDIR)/hilfe |
|
feature_list: |
$(RUNPIKE) $(TMP_BINDIR)/feature_list |
|
lib: $(LIBDIR_SRC)/master.pike.in Makefile |
@for d in lib lib/modules lib/include; do \ |
if [ -d $$d/. ]; then : ; else \ |
echo "Creating $$d/."; \ |
(mkdir $$d && chmod u+rwx $$d) || exit 1; \ |
fi ; \ |
done |
@if [ -d share/. ]; then : ; else \ |
echo "Creating symlink ./share"; \ |
if ls share >/dev/null 2>&1; then \ |
echo "Renaming share to share.old"; \ |
mv share share.old || exit 1; \ |
else : ; fi; \ |
ln -s "$(LIBDIR_SRC)" ./share || exit 1; \ |
fi |
@echo "Creating lib/master.pike"; \ |
( sed -e 's!¤lib_prefix¤!$(lib_prefix)!' \ |
-e 's!¤share_prefix¤!$(share_prefix)!' \ |
<$(LIBDIR_SRC)/master.pike.in \ |
>./lib/master.pike && chmod 644 ./lib/master.pike) || exit 1 |
@echo "Done." |
-@touch ./lib 2>/dev/null || (touch lib/.broken_gnu_touch && rm lib/.broken_gnu_touch) |
|
|
master.pike: $(LIBDIR_SRC)/master.pike.in |
sed -e 's!¤lib_prefix¤!$(TMP_LIBDIR)!' <$(LIBDIR_SRC)/master.pike.in \ |
| sed -e 's!¤share_prefix¤!$(LIBDIR_SRC)!' >master.pike |
|
# make export archive (requires compiled Pike) |
# Do not compile in source tree if you want to use this! |
# Beware that export archive this includes bison/yacc/byacc source |
# and thus has to follow the rules stated in that code. |
export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend |
chmod +x $(SRCDIR)/install-sh |
$(RUNPIKE) $(TMP_BINDIR)/export.pike Odbc Oracle _Crypto Postgres |
|
full_export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend |
chmod +x $(SRCDIR)/install-sh |
$(RUNPIKE) $(TMP_BINDIR)/export.pike |
|
all_exports: full_export |
( cd .. ; $(TMP_BINDIR)/makedists ) |
|
bin_export: |
PATH=$(TMP_BINDIR)/fakes:$$PATH INSTALL_LOG=`pwd`/log make install INSTALL=install |
$(RUNPIKE) $(TMP_BINDIR)/parse_install_log <log $(SRCDIR) $(prefix) |
|
new_peep_engine: |
$(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c |
|
$(SRCDIR)/peep_engine.c: $(SRCDIR)/peep.in |
echo "" >$(SRCDIR)/peep_engine.c |
-$(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c |
|
peep.o: $(SRCDIR)/peep_engine.c |
|
# make dependencies |
depend: $(SRCDIR)/language.c |
gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(TMP_BINDIR)/fixdepends.sh $(SRCDIR) |
( cd modules ; $(MAKE) $(MAKE_FLAGS) depend ) |
$(SRCDIR)/configure @ac_configure_args@ |
|
docs: |
mkdir docs |
|
html_docs: docs |
$(RUNPIKE) $(TMP_BINDIR)/htmlify_docs docs $(TMP_DOCDIR) `echo $(SRCDIR)/modules/*/doc` |
|
lobotomize_crypto: |
( cd $(SRCDIR)/modules/_Crypto ; ./.build_lobotomized_crypto ) |
( cd $(SRCDIR)/modules/_Lobotomized_Crypto ; autoconf ) |
# |
# Pike internal targets |
# |
module_objects: machine.h global.h modules/static_module_makefile modules/dynamic_module_makefile $(SRCDIR)/language.h lib master.pike |
@( cd modules ; rm remake >/dev/null 2>&1 || : ; \ |
${MAKE} $(MAKE_FLAGS) || \ |
( test -f remake && ${MAKE} $(MAKE_FLAGS) ) ) || exit $$? |
|
language.o: $(SRCDIR)/language.c $(SRCDIR)/object.h $(SRCDIR)/interpret.h $(SRCDIR)/program.h |
|
$(SRCDIR)/language.h: $(SRCDIR)/language.yacc |
@echo "Expect 1 shift/reduce conflict." |
$(YACC) $(YFLAGS) $(SRCDIR)/language.yacc |
mv y.tab.c $(SRCDIR)/language.c |
mv y.tab.h $(SRCDIR)/language.h |
|
$(SRCDIR)/language.c: $(SRCDIR)/language.h |
touch $(SRCDIR)/language.c |
|
# Internal testing target |
run_yacc: $(SRCDIR)/language.c |
|
modules/modlist.h: |
( cd modules ; ${MAKE} $(MAKE_FLAGS) ) |
|
modules/modlist_headers.h: modules/modlist.h |
touch modules/modlist_headers.h |
|
module.o: modules/modlist_headers.h modules/modlist.h |
|
$(SRCDIR)/configure: $(SRCDIR)/configure.in |
cd $(SRCDIR) && autoconf |
|
config.status: $(SRCDIR)/configure |
./config.status --recheck |
|
modules/static_module_makefile: $(SRCDIR)/modules/static_module_makefile.in config.status |
CONFIG_FILES=modules/static_module_makefile CONFIG_HEADERS="" ./config.status |
|
modules/dynamic_module_makefile: $(SRCDIR)/@dmmsrc@ config.status |
CONFIG_FILES=modules/dynamic_module_makefile:@dmmsrc@ CONFIG_HEADERS="" ./config.status |
|
Makefile: $(SRCDIR)/Makefile.in $(SRCDIR)/dependencies config.status |
CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status |
@echo "Run make again" |
@exit 1 |
|
$(SRCDIR)/machine.h.in: $(SRCDIR)/stamp-h.in |
$(SRCDIR)/stamp-h.in: $(SRCDIR)/configure.in $(SRCDIR)/acconfig.h |
cd $(SRCDIR) && autoheader |
echo foo > $(SRCDIR)/stamp-h.in |
|
machine.h: stamp-h |
stamp-h: $(SRCDIR)/machine.h.in config.status |
CONFIG_FILES="" CONFIG_HEADERS=machine.h ./config.status |
|
testsuite: $(SRCDIR)/testsuite.in |
$(TMP_BINDIR)/mktestsuite $(SRCDIR)/testsuite.in >testsuite -DSRCDIR="$(SRCDIR)" |
|
@dependencies@ |
|