fccd4c1998-03-28Henrik Grubbström (Grubba) #
2dd4b21999-08-24Fredrik Hübinette (Hubbe) # $Id: Makefile.in,v 1.149 1999/08/24 23:09:15 hubbe Exp $
fccd4c1998-03-28Henrik Grubbström (Grubba) #
933d361996-04-29Fredrik Hübinette (Hubbe) # 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.
f3bce61996-06-21Fredrik Hübinette (Hubbe) LIBS=@LIBS@ $(EXTRALIBS)
933d361996-04-29Fredrik Hübinette (Hubbe) 
c1e9b11997-04-06Fredrik Hübinette (Hubbe) # This is normall the install program in the source directory
933d361996-04-29Fredrik Hübinette (Hubbe) INSTALL=@INSTALL@ SRCDIR=@srcdir@ VPATH=@srcdir@ # These are used while compiling
1a8e141997-02-27Fredrik Hübinette (Hubbe) LIBDIR_SRC = @LIBDIR@
c6f3ee1998-09-29Henrik Grubbström (Grubba) MANDIR_SRC = $(SRCDIR)/../man
933d361996-04-29Fredrik Hübinette (Hubbe) TMP_BINDIR = @BINDIR@ TMP_BUILDDIR = @BUILDDIR@ TMP_DOCDIR = @DOCDIR@
1a8e141997-02-27Fredrik Hübinette (Hubbe) TMP_LIBDIR = $(TMP_BUILDDIR)/lib
933d361996-04-29Fredrik Hübinette (Hubbe)  prefix = @prefix@ exec_prefix = $(prefix)/bin
06983f1996-09-22Fredrik Hübinette (Hubbe) lib_prefix = $(prefix)/lib/pike
9defa21998-04-21Henrik Grubbström (Grubba) data_prefix = @datadir@ share_prefix = $(data_prefix)/pike
c6f3ee1998-09-29Henrik Grubbström (Grubba) man_prefix = $(prefix)/man
933d361996-04-29Fredrik Hübinette (Hubbe)  #
1a8e141997-02-27Fredrik Hübinette (Hubbe) # use bison please, yacc isn't good enough.
933d361996-04-29Fredrik Hübinette (Hubbe) # YACC=@YACC@ YFLAGS=-d -v # If you don't have 'strchr', then add next flag to CFLAGS. # -Dstrchr=index -Dstrrchr=rindex # PROFIL= #PROFIL=-pg
1a5be11997-11-03Henrik Grubbström (Grubba) # # OS dependant flags # OSFLAGS=
933d361996-04-29Fredrik Hübinette (Hubbe) # #Enable warnings from the compiler, if wanted. # WARN=@WARN@ #add extra defines here
51bd9e1996-10-09Fredrik Hübinette (Hubbe) # Be sure to use -g when looking for bugs
af56471996-12-03Fredrik Hübinette (Hubbe) DEFINES=@CPPFLAGS@
933d361996-04-29Fredrik Hübinette (Hubbe)  # -O should work with all compilers OPTIMIZE=@OPTIMIZE@
e09c9e1999-08-13Martin Stjernholm # Set to a flag for parallelizing make, e.g. -j2. It's given to make # at the level where it's most effective. MAKE_PARALLEL=
933d361996-04-29Fredrik Hübinette (Hubbe) # Preprocessor flags. PREFLAGS=-I. -I$(SRCDIR) $(DEFINES)
e4439c1998-09-01Fredrik Hübinette (Hubbe) OTHERFLAGS=@CFLAGS@ $(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL)
1909941997-11-04Henrik Grubbström (Grubba) NOOPTFLAGS=@CFLAGS@ @CPPFLAGS@ $(OSFLAGS) $(WARN) $(PROFIL)
933d361996-04-29Fredrik Hübinette (Hubbe) CFLAGS=$(PREFLAGS) $(OTHERFLAGS)
902adf1998-01-23Henrik Grubbström (Grubba) SMARTLINK=@SMARTLINK@ REALCC=@REALCC@
933d361996-04-29Fredrik Hübinette (Hubbe) CC=@CC@ CPP=@CPP@
1909941997-11-04Henrik Grubbström (Grubba) AR=@AR@
0809711998-02-27Marcus Comstedt LD=@LD@
6ca4de1998-07-09Henrik Grubbström (Grubba) LDFLAGS=@LDFLAGS@ @LINKFORSHARED@ $(EXTRALDFLAGS)
933d361996-04-29Fredrik Hübinette (Hubbe) 
09232f1998-05-27Fredrik Hübinette (Hubbe) RUNPIKE=$(TMP_BUILDDIR)/pike -DNOT_INSTALLED -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS)
933d361996-04-29Fredrik Hübinette (Hubbe) 
8164111999-03-11Fredrik Hübinette (Hubbe) 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)" "CC=$(CC)" "MAKE=$(MAKE)"
b4ddec1999-03-05Fredrik Hübinette (Hubbe) MAKE_FLAGS = $(MOST_MAKE_FLAGS) "OTHERFLAGS=$(OTHERFLAGS)"
933d361996-04-29Fredrik Hübinette (Hubbe)  # Add alloca.o if you don't have alloca() on your machine. #
f3bce61996-06-21Fredrik Hübinette (Hubbe) OBJ= \
90c62d1997-01-26Fredrik Hübinette (Hubbe)  language.o \
fadd1d1999-01-21Fredrik Hübinette (Hubbe)  security.o \
d4c0211998-05-05Henrik Grubbström (Grubba)  interpret.o \
06983f1996-09-22Fredrik Hübinette (Hubbe)  constants.o \
5740881998-01-01Fredrik Hübinette (Hubbe)  cpp.o \ fdlib.o \
fc33451997-10-02Fredrik Hübinette (Hubbe)  cyclic.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  array.o \ backend.o \
06983f1996-09-22Fredrik Hübinette (Hubbe)  builtin_functions.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  callback.o \
90c62d1997-01-26Fredrik Hübinette (Hubbe)  encode.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  docode.o \ dynamic_buffer.o \
ca74dd1996-10-08Fredrik Hübinette (Hubbe)  dynamic_load.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  error.o \ fd_control.o \ fsort.o \ gc.o \ hashtable.o \ las.o \ lex.o \
06983f1996-09-22Fredrik Hübinette (Hubbe)  multiset.o \ signal_handler.o \ pike_types.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  main.o \ mapping.o \
9aa6fa1997-05-19Fredrik Hübinette (Hubbe)  pike_memory.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  module.o \
dfa0b61997-01-21Fredrik Hübinette (Hubbe)  module_support.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  object.o \ opcodes.o \ operators.o \ peep.o \ port.o \ program.o \ rusage.o \ stralloc.o \ stuff.o \
07513e1996-10-04Fredrik Hübinette (Hubbe)  threads.o \
6265aa1997-01-18Fredrik Hübinette (Hubbe)  version.o \
991e5a1998-04-28Fredrik Hübinette (Hubbe)  queue.o \
f3248c1996-08-03Fredrik Hübinette (Hubbe)  svalue.o @EXTRA_OBJS@
933d361996-04-29Fredrik Hübinette (Hubbe) # # User callable targets #
740c7b1997-02-06Fredrik Hübinette (Hubbe) 
fccd4c1998-03-28Henrik Grubbström (Grubba) all: module_objects hilfe
e09c9e1999-08-13Martin Stjernholm  $(MAKE) $(MAKE_FLAGS) $(MAKE_PARALLEL) pike
3fb3a71999-03-12Henrik Grubbström (Grubba)  @rm -f dummy_engine >/dev/null 2>&1; echo "" >dummy_engine && \ if cmp $(SRCDIR)/peep_engine.c dummy_engine >/dev/null 2>&1; then \ echo "Warning: No peep_engine." >&2; \ else :; fi; \ rm -f dummy_engine >/dev/null 2>&1
933d361996-04-29Fredrik Hübinette (Hubbe) 
84999f1998-08-07Henrik Grubbström (Grubba) compiler-warnings : clean @echo Summarizing compiler warnings. @echo @if $(MAKE) $(MAKE_FLAGS) all 2>compiler-warnings ; then \ echo; \ echo 'Compilation warning summary:'; \
95d3131998-08-07Henrik Grubbström (Grubba)  echo '----------------------------'; \
84999f1998-08-07Henrik Grubbström (Grubba)  else \ echo; \ echo 'Compilation warning and error summary:'; \
95d3131998-08-07Henrik Grubbström (Grubba)  echo '--------------------------------------'; \
84999f1998-08-07Henrik Grubbström (Grubba)  fi
95d3131998-08-07Henrik Grubbström (Grubba)  @echo
84999f1998-08-07Henrik Grubbström (Grubba)  @cat compiler-warnings
95d3131998-08-07Henrik Grubbström (Grubba)  @echo @echo 'End of summary' @echo '--------------'
84999f1998-08-07Henrik Grubbström (Grubba) 
41345d1998-05-01Fredrik Hübinette (Hubbe) pike: $(OBJ) modules/linker_options
aacea31999-06-19Fredrik Hübinette (Hubbe)  -@if [ -f pike.old ] ; then rm -f pike.old || : ; else : ; fi -@if [ -f pike.old.exe ] ; then rm -f pike.old.exe || : ; else : ; fi
fbc67c1998-07-15Fredrik Hübinette (Hubbe)  -@if [ -f pike ] ; then mv pike pike.old || : ; else : ; fi
41345d1998-05-01Fredrik Hübinette (Hubbe)  $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # purify
41345d1998-05-01Fredrik Hübinette (Hubbe) pure: $(OBJ) module_objects
d0a5641997-10-15Henrik Grubbström (Grubba)  -@mv pike pike.old 2>/dev/null || true
4eee7e1998-08-01Henrik Grubbström (Grubba)  $(SMARTLINK) purify -max-threads=128 -thread_stack_change=8192 -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(REALCC) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # purecov
41345d1998-05-01Fredrik Hübinette (Hubbe) cover: $(OBJ) module_objects
d0a5641997-10-15Henrik Grubbström (Grubba)  -@mv pike pike.old 2>/dev/null || true
4eee7e1998-08-01Henrik Grubbström (Grubba)  $(SMARTLINK) purecov purify -max-threads=128 -thread_stack_change=8192 -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(REALCC) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # quantify
41345d1998-05-01Fredrik Hübinette (Hubbe) quant: $(OBJ) module_objects
d0a5641997-10-15Henrik Grubbström (Grubba)  -@mv pike pike.old 2>/dev/null || true
41345d1998-05-01Fredrik Hübinette (Hubbe)  $(SMARTLINK) quantify $(REALCC) $(LDFLAGS) $(OBJ) `cat modules/linker_options` $(LIBS) -o pike
1a5be11997-11-03Henrik Grubbström (Grubba) 
c6c7121998-04-08Fredrik Hübinette (Hubbe) atom: pike
2a34ce1998-08-02Henrik Grubbström (Grubba)  atom pike -tool atom -env threads -g -v `find lib/modules -type f -name '*.so' -print | sed -e 's/^/-incobj /g'`
c6c7121998-04-08Fredrik Hübinette (Hubbe)  mv pike pike.pre-atom mv pike.third.threads pike @echo Make sure you have '.' in your LD_LIBRARY_PATH.
fccd4c1998-03-28Henrik Grubbström (Grubba) 
5ff0ec1998-04-15Fredrik Hübinette (Hubbe) pixie: pike
4cb4be1998-04-23Fredrik Hübinette (Hubbe)  atom pike -tool pixie -env threads -g -v `find lib/modules -type f -name '*.so' -print | sed -e 's/^/-incobj /g'`
5ff0ec1998-04-15Fredrik Hübinette (Hubbe)  mv pike pike.pre-pixie mv pike.pixie.threads pixie @echo Make sure you have '.' in your LD_LIBRARY_PATH.
fccd4c1998-03-28Henrik Grubbström (Grubba) 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 \
f380441998-05-17Henrik Grubbström (Grubba)  $(INSTALL) $(TMP_BINDIR)/hilfe `pwd`/hilfe || exit 1; \
fccd4c1998-03-28Henrik Grubbström (Grubba)  fi @echo "Done."
1a5be11997-11-03Henrik Grubbström (Grubba) # Several optimizers have problems with interpret.c # First try compiling with optimization and if that doesn't work, without.
2a3c561998-05-05Fredrik Hübinette (Hubbe) interpret.o: $(SRCDIR)/interpret.c $(CC) $(CFLAGS) -c $(SRCDIR)/interpret.c -o interpret.o || NO_ULIMIT=yes $(CC) $(PREFLAGS) $(NOOPTFLAGS) -c $(SRCDIR)/interpret.c -o interpret.o
1a5be11997-11-03Henrik Grubbström (Grubba)  force :
933d361996-04-29Fredrik Hübinette (Hubbe) 
0cd76f1998-10-22Fredrik Hübinette (Hubbe) 
933d361996-04-29Fredrik Hübinette (Hubbe) # install
40bb511999-02-05Martin Stjernholm install: pike hilfe pike-module aclocal
c37c7e1999-03-26Fredrik Hübinette (Hubbe)  @$(RUNPIKE) $(TMP_BINDIR)/install.pike \ exec_prefix="$(exec_prefix)" lib_prefix="$(lib_prefix)" \
fadd1d1999-01-21Fredrik Hübinette (Hubbe)  TMP_LIBDIR="$(TMP_LIBDIR)" LIBDIR_SRC="$(LIBDIR_SRC)" \ SRCDIR="$(SRCDIR)" prefix="$(prefix)" MANDIR_SRC="$(MANDIR_SRC)" \
c37c7e1999-03-26Fredrik Hübinette (Hubbe)  man_prefix="$(man_prefix)" pike_name=$(pike_name)
fadd1d1999-01-21Fredrik Hübinette (Hubbe) 
40bb511999-02-05Martin Stjernholm old-install: pike hilfe pike-module aclocal
bc09891997-09-23Henrik Grubbström (Grubba)  @echo @echo Installing Pike... @echo
fd74241998-02-09Henrik Grubbström (Grubba)  @echo "Creating directories..."; \
9349d41998-09-29Henrik Grubbström (Grubba)  for d in "$(prefix)" "$(exec_prefix)" "$(prefix)/lib" \ "$(man_prefix)" "$(man_prefix)/man1" "$(man_prefix)/man3" \ "$(lib_prefix)" "$(data_prefix)" "$(share_prefix)" \ "$(prefix)/include" "$(prefix)/include/pike"; do \
fd74241998-02-09Henrik Grubbström (Grubba)  if [ -d "$$d/." ]; then : ; else \ echo "$$d"; \ mkdir "$$d" || exit 1; \ chmod a+rx "$$d"; \ chmod u+w "$$d"; \ fi; \ done
fadd1d1999-01-21Fredrik Hübinette (Hubbe)  @for d in `cd "$(TMP_LIBDIR)"; find . -type d -print` `cd "$(LIBDIR_SRC)"; find . ! -name CVS ! -name '.#*' ! -name '#*#' ! -name '*~' -type d -print`; do \
fd74241998-02-09Henrik Grubbström (Grubba)  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 @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"; \
fccd4c1998-03-28Henrik Grubbström (Grubba)  mv -f "$(exec_prefix)/pike" "$(exec_prefix)/pike.old" || exit 1; \
b02a7f1998-02-11Henrik Grubbström (Grubba)  else : ; fi ; \
fccd4c1998-03-28Henrik Grubbström (Grubba)  echo "$(exec_prefix)/pike"; \
d0bb8b1998-07-26Fredrik Hübinette (Hubbe)  $(INSTALL) ./pike "$(exec_prefix)" || exit 1; \ chmod a+rx "$(exec_prefix)/pike"; \ chmod u+w "$(exec_prefix)/pike"; \
fd74241998-02-09Henrik Grubbström (Grubba)  fi
fccd4c1998-03-28Henrik Grubbström (Grubba)  @if [ -f ./hilfe ]; then \ echo ; echo "Installing hilfe..."; \ if cmp "$(exec_prefix)/hilfe" $(TMP_BINDIR)/hilfe >/dev/null 2>&1 ; \
872adf1998-04-02Mirar (Pontus Hagland)  then \
fccd4c1998-03-28Henrik Grubbström (Grubba)  echo "$(exec_prefix)/hilfe already installed." ; \
872adf1998-04-02Mirar (Pontus Hagland)  else \
d0bb8b1998-07-26Fredrik Hübinette (Hubbe)  if [ -f "$(exec_prefix)/hilfe" ]; then \ mv "$(exec_prefix)/hilfe" "$(exec_prefix)/hilfe.old" || exit 1; \
fccd4c1998-03-28Henrik Grubbström (Grubba)  else : ; fi; \ echo "$(exec_prefix)/hilfe"; \
d0bb8b1998-07-26Fredrik Hübinette (Hubbe)  $(INSTALL) $(TMP_BINDIR)/hilfe "$(exec_prefix)" || exit 1; \ chmod a+rx "$(exec_prefix)/hilfe"; \ chmod u+w "$(exec_prefix)/hilfe"; \
fd74241998-02-09Henrik Grubbström (Grubba)  fi; \
366c661997-05-07Henrik Grubbström (Grubba)  else : ; fi
e269811998-09-20Fredrik Hübinette (Hubbe)  @if [ -f ./pike-module ]; then \ echo ; echo "Installing pike-module..."; \ if cmp "$(exec_prefix)/pike-module" ./pike-module >/dev/null 2>&1 ; \ then \ echo "$(exec_prefix)/pike-module already installed." ; \ else \ if [ -f "$(exec_prefix)/pike-module" ]; then \ mv "$(exec_prefix)/pike-module" "$(exec_prefix)/pike-module.old" || exit 1; \ else : ; fi; \ echo "$(exec_prefix)/pike-module"; \ $(INSTALL) ./pike-module "$(exec_prefix)" || exit 1; \ chmod a+rx "$(exec_prefix)/pike-module"; \ chmod u+w "$(exec_prefix)/pike-module"; \ fi; \ else : ; fi
fd74241998-02-09Henrik Grubbström (Grubba)  @echo ; echo "Installing header-files..."; \ for a in $(SRCDIR)/*.h *.h ; do \
d0bb8b1998-07-26Fredrik Hübinette (Hubbe)  $(INSTALL) $$a "$(prefix)/include/pike" || exit 1; \
068f2f1998-10-28Henrik Grubbström (Grubba)  : Should use the basename here. ; \ : chmod a+r "$(prefix)/include/pike" ; \ : chmod u+w "$(prefix)/include/pike" ; \
fd74241998-02-09Henrik Grubbström (Grubba)  done
e269811998-09-20Fredrik Hübinette (Hubbe)  @$(INSTALL) modules/dynamic_module_makefile $(prefix)/include/pike/dynamic_module_makefile @$(INSTALL) ./aclocal $(prefix)/include/pike/aclocal.m4
e33b091998-04-02Henrik Grubbström (Grubba)  @echo ; echo "Installing modules written in Pike..."; \
d4c16e1998-04-24Fredrik Hübinette (Hubbe)  for f in `cd "$(LIBDIR_SRC)"; find . -type f -print | grep -v '/CVS/'`; do \
fadd1d1999-01-21Fredrik Hübinette (Hubbe)  if cmp "$(lib_prefix)/$$f" "$(LIBDIR_SRC)/$$f" >/dev/null 2>&1 ; \
e33b091998-04-02Henrik Grubbström (Grubba)  then : ; else \
fadd1d1999-01-21Fredrik Hübinette (Hubbe)  echo "$(lib_prefix)/$$f"; \ if [ -f "$(lib_prefix)/$$f" ]; then \ mv -f "$(lib_prefix)/$$f" "$(lib_prefix)/$$f.old"; \
e33b091998-04-02Henrik Grubbström (Grubba)  else : ; fi; \
fadd1d1999-01-21Fredrik Hübinette (Hubbe)  rm -f "$(lib_prefix)/$$f.o" >/dev/null 2>/dev/null ; \ cp "$(LIBDIR_SRC)/$$f" "$(lib_prefix)/$$f" || exit 1; \ chmod a+r "$(lib_prefix)/$$f"; \ chmod u+w "$(lib_prefix)/$$f"; \
e33b091998-04-02Henrik Grubbström (Grubba)  fi ; \
068f2f1998-10-28Henrik Grubbström (Grubba)  if [ -f "$(lib_prefix)/$$f" ]; then \
fadd1d1999-01-21Fredrik Hübinette (Hubbe)  if test "x$(lib_prefix)" != "x$(lib_prefix)"; then \
068f2f1998-10-28Henrik Grubbström (Grubba)  mv -f "$(lib_prefix)/$$f" "$(lib_prefix)/$$f.now_in_share.old"; \ else : ; fi; \ else : ; fi; \
e33b091998-04-02Henrik Grubbström (Grubba)  done @echo ; echo "Installing modules written in C..."; \
fd74241998-02-09Henrik Grubbström (Grubba)  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; \
0cd76f1998-10-22Fredrik Hübinette (Hubbe)  rm -f "$(lib_prefix)/$$f.o" >/dev/null 2>/dev/null ; \
fd74241998-02-09Henrik Grubbström (Grubba)  cp "$(TMP_LIBDIR)/$$f" "$(lib_prefix)/$$f" || exit 1; \ chmod a+r "$(lib_prefix)/$$f"; \ chmod u+w "$(lib_prefix)/$$f"; \ fi ; \ done
c6f3ee1998-09-29Henrik Grubbström (Grubba)  @if [ -d "$(MANDIR_SRC)/." ]; then \ echo ; echo "Installing manual pages..."; \
9349d41998-09-29Henrik Grubbström (Grubba)  for f in `cd "$(MANDIR_SRC)/"; echo *.1`; do \
7c13e51998-09-29Henrik Grubbström (Grubba)  dest="$(man_prefix)/man1/$$f"; \
c6f3ee1998-09-29Henrik Grubbström (Grubba)  if cmp "$$dest" "$(MANDIR_SRC)/$$f" >/dev/null 2>&1 ; \ then : ; else \ echo "$$dest"; \ if [ -f "$$dest" ]; then \ mv -f "$$dest" "$$dest.old"; \ else : ; fi; \ cp "$(MANDIR_SRC)/$$f" "$$dest" || exit 1; \ chmod a+r "$$dest"; \ chmod u+w "$$dest"; \ fi ; \ done ; \ else : ; fi
3a9cf01998-10-22Henrik Grubbström (Grubba)  $(exec_prefix)/pike -m $(SRCDIR)/dumpmaster.pike $(lib_prefix)/master.pike
0cd76f1998-10-22Fredrik Hübinette (Hubbe)  ( \ find $(lib_prefix)/modules -type f \( -name '*.pmod' -o -name '*.pike' \) -print ; \ ) | \
3a9cf01998-10-22Henrik Grubbström (Grubba)  while read file ; do $(exec_prefix)/pike $(SRCDIR)/dumpmodule.pike $$file ; done
0cd76f1998-10-22Fredrik Hübinette (Hubbe) 
933d361996-04-29Fredrik Hübinette (Hubbe) # tidy up a bit tidy:
b04d5f1996-07-08Fredrik Hübinette (Hubbe)  -rm -f *.o core y.output y.tab.c y.tab.h
06983f1996-09-22Fredrik Hübinette (Hubbe)  -rm -f $(TMP_BINDIR)/core *.o *.i *.i~ testsuite
933d361996-04-29Fredrik Hübinette (Hubbe)  # make clean clean: tidy
2a34ce1998-08-02Henrik Grubbström (Grubba)  -( cd modules; $(MAKE) $(MAKE_FLAGS) clean )
394d7d1999-04-08Fredrik Hübinette (Hubbe)  -rm -rf test-install test-pike -rm -f TAGS tags yacc.acts yacc.debug yacc.tmp *.debug.log a.out -rm -f hilfe master.pike compiler-warnings
efb4d61999-05-14Henrik Grubbström (Grubba)  -find lib/modules/ -type f -name '*.so_pure*' -exec rm -f \{\} \;
2a34ce1998-08-02Henrik Grubbström (Grubba) # -rm -f lib/master.pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # make _really_ clean spotless: clean
3b285d1998-08-02Henrik Grubbström (Grubba)  -(cd $(SRCDIR); find . -type f -name '*.h.in' -print) | \ sed -e 's/\.in$$//' | xargs rm -f find . -type f '(' -name 'Makefile' -o -name '*~' -o -name '.*~' -o \ -name core -o -name '.nfs*' -name '#*#' -o -name '.pure' -o \
2a34ce1998-08-02Henrik Grubbström (Grubba)  -name 'conftest.*' -o -name 'stamp-h' ')' -exec rm -f \{\} \;
933d361996-04-29Fredrik Hübinette (Hubbe)  -rm -f lexical.c mon.out *.ln config.status
623c2a1998-08-02Henrik Grubbström (Grubba)  -rm -f $(TMP_BINDIR)/*~ $(TMP_BINDIR)/\#*\#
334e3d1997-04-16Fredrik Hübinette (Hubbe)  -rm -f pike pike.old l.outa*
e5bb7d1996-09-23Fredrik Hübinette (Hubbe)  -rm -f modules/*/testsuite
2a34ce1998-08-02Henrik Grubbström (Grubba)  -rm -f modules/static_module_makefile modules/dynamic_module_makefile
334e3d1997-04-16Fredrik Hübinette (Hubbe)  -rm -rf lib
933d361996-04-29Fredrik Hübinette (Hubbe) 
3b285d1998-08-02Henrik Grubbström (Grubba) distclean: spotless find . -type f '(' -name 'config.log' -o -name 'config.status' -o \
2a34ce1998-08-02Henrik Grubbström (Grubba)  -name 'config.cache' ')' -exec rm -f \{\} \; cvsclean: distclean
2a49501998-08-02Henrik Grubbström (Grubba)  ( for d in `cd $(SRCDIR); find . -type d -print`; do \ if test -f "$(SRCDIR)/$$d/.cvsignore" ; then \ (cd "$$d" && rm -f `cat "$(SRCDIR)/$$d/.cvsignore"`); \ (cd "$(SRCDIR)/$$d" && rm -f `cat "$(SRCDIR)/$$d/.cvsignore"`); \
83a7a21998-08-02Henrik Grubbström (Grubba)  else :; fi; \ done)
3b285d1998-08-02Henrik Grubbström (Grubba) 
933d361996-04-29Fredrik Hübinette (Hubbe) # create tags tags: ctags *.c TAGS: etags -t *.h *.c # verify / debug
8d3e031998-02-27Fredrik Hübinette (Hubbe) module_testsuites: ( cd modules ; $(MAKE) $(MAKE_FLAGS) testsuites )
394d7d1999-04-08Fredrik Hübinette (Hubbe) just_verify: module_testsuites testsuite master.pike
aacea31999-06-19Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/test_pike.pike -a
394d7d1999-04-08Fredrik Hübinette (Hubbe) 
752e101999-04-30Fredrik Hübinette (Hubbe) tinstall: aclocal
aacea31999-06-19Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/install.pike pike_name="test-pike" lib_prefix="$(lib_prefix)" TMP_LIBDIR="$(TMP_LIBDIR)" LIBDIR_SRC="$(LIBDIR_SRC)" SRCDIR="$(SRCDIR)" prefix="./test-install" MANDIR_SRC="$(MANDIR_SRC)" man_prefix="$(man_prefix)"
394d7d1999-04-08Fredrik Hübinette (Hubbe) 
752e101999-04-30Fredrik Hübinette (Hubbe)  verify: module_testsuites testsuite tinstall
1a783f1999-08-11Martin Stjernholm  if test "$(TESTARGS)" = "" ; then args="-a" ; else args="$(TESTARGS)" ; fi; \ if test -f ./test-pike ; then ./test-pike -DNOT_INSTALLED $(TMP_BINDIR)/test_pike.pike $$args ; else sprsh `pwd`/test-install/pike/*/bin/pike.exe -DNOT_INSTALLED $(TMP_BINDIR)/test_pike.pike $$args ; fi
115ae01996-09-25Fredrik Hübinette (Hubbe) 
90e9781999-01-31Fredrik Hübinette (Hubbe) verify_installed: module_testsuites testsuite master.pike
1a783f1999-08-11Martin Stjernholm  if test "$(TESTARGS)" = "" ; then args="-a" ; else args="$(TESTARGS)" ; fi; \ $(exec_prefix)/pike $(TMP_BINDIR)/test_pike.pike $$args
90e9781999-01-31Fredrik Hübinette (Hubbe) 
af56471996-12-03Fredrik Hübinette (Hubbe) check: verify
b298e01997-04-16Fredrik Hübinette (Hubbe) sure: verify
933d361996-04-29Fredrik Hübinette (Hubbe) # verify / debug verbose
76b1071998-04-17Fredrik Hübinette (Hubbe) verbose_verify: module_testsuites testsuite master.pike
1a783f1999-08-11Martin Stjernholm  if test "$(TESTARGS)" = "" ; then args="-a" ; else args="$(TESTARGS)" ; fi; \ $(RUNPIKE) $(TMP_BINDIR)/test_pike.pike --verbose $$args
933d361996-04-29Fredrik Hübinette (Hubbe)  # verify & debug VERBOSE
76b1071998-04-17Fredrik Hübinette (Hubbe) gdb_verify: module_testsuites testsuite master.pike
80ef121997-03-17Fredrik Hübinette (Hubbe)  @echo >.gdbinit handle SIGFPE nostop noprint pass @echo >>.gdbinit handle SIGUSR1 nostop noprint pass
4a85681998-08-02Henrik Grubbström (Grubba)  @echo >>.gdbinit handle SIGUSR2 nostop noprint pass
8aae6d1999-08-19Fredrik Hübinette (Hubbe)  @echo >>.gdbinit break debug_fatal
aacea31999-06-19Fredrik Hübinette (Hubbe)  @echo >>.gdbinit run -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS) $(TMP_BINDIR)/test_pike.pike -v -v -f -a
06983f1996-09-22Fredrik Hübinette (Hubbe)  gdb ./pike
41a0f41996-06-09Fredrik Hübinette (Hubbe)  @rm .gdbinit
933d361996-04-29Fredrik Hübinette (Hubbe)  # run hilfe, for interactive testing run_hilfe:
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/hilfe
933d361996-04-29Fredrik Hübinette (Hubbe) 
b298e01997-04-16Fredrik Hübinette (Hubbe) feature_list: $(RUNPIKE) $(TMP_BINDIR)/feature_list
fccd4c1998-03-28Henrik Grubbström (Grubba) 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"; \
9d9ec41998-05-27Fredrik Hübinette (Hubbe)  if [ "x`ls share 2>&1 || :`" = "x" ]; then \
fccd4c1998-03-28Henrik Grubbström (Grubba)  echo "Renaming share to share.old"; \ mv share share.old || exit 1; \ else : ; fi; \ ln -s "$(LIBDIR_SRC)" ./share || exit 1; \ fi @echo "Done." -@touch ./lib 2>/dev/null || (touch lib/.broken_gnu_touch && rm lib/.broken_gnu_touch)
1a8e141997-02-27Fredrik Hübinette (Hubbe) 
76b1071998-04-17Fredrik Hübinette (Hubbe) 
6ca4de1998-07-09Henrik Grubbström (Grubba) master.pike: $(LIBDIR_SRC)/master.pike.in Makefile
76b1071998-04-17Fredrik Hübinette (Hubbe)  sed -e 's!¤lib_prefix¤!$(TMP_LIBDIR)!' <$(LIBDIR_SRC)/master.pike.in \ | sed -e 's!¤share_prefix¤!$(LIBDIR_SRC)!' >master.pike
e269811998-09-20Fredrik Hübinette (Hubbe) pike-module: $(SRCDIR)/pike-module.in Makefile ./pike $(RUNPIKE) $(SRCDIR)/pike-module.in --fixate=$(SRCDIR)/pike-module.in \ --set='make=$(MAKE)' --set='make_flags=$(MAKE_FLAGS)' \ --set='prefix=$(prefix)' --set='pike=$(exec_prefix)/pike' \ --set='include_path=$(prefix)/include/pike' \ --set='lib_prefix=$(TMP_LIBDIR)' --set='share_prefix=$(LIBDIR_SRC)' \ --output=pike-module -@chmod +x pike-module aclocal: $(SRCDIR)/aclocal.m4 echo >aclocal "define(PIKE_INCLUDE_PATH,$(prefix)/include/pike)" cat >>aclocal $(SRCDIR)/aclocal.m4
06983f1996-09-22Fredrik Hübinette (Hubbe) # make export archive (requires compiled Pike)
933d361996-04-29Fredrik Hübinette (Hubbe) # 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.
06983f1996-09-22Fredrik Hübinette (Hubbe) export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend
f838321996-10-09Fredrik Hübinette (Hubbe)  chmod +x $(SRCDIR)/install-sh
1b8f5e1999-05-31Henrik Grubbström (Grubba)  $(RUNPIKE) $(TMP_BINDIR)/export.pike Oracle rsql.pike rsqld.pike _Crypto
f838321996-10-09Fredrik Hübinette (Hubbe)  full_export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend
933d361996-04-29Fredrik Hübinette (Hubbe)  chmod +x $(SRCDIR)/install-sh
b42d191997-10-13Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/export.pike
933d361996-04-29Fredrik Hübinette (Hubbe) 
76b1071998-04-17Fredrik Hübinette (Hubbe) all_exports: full_export ( cd .. ; $(TMP_BINDIR)/makedists )
2dd4b21999-08-24Fredrik Hübinette (Hubbe) bin_export: aclocal
99bb2c1999-06-09Fredrik Hübinette (Hubbe)  @$(RUNPIKE) $(TMP_BINDIR)/install.pike --export \ exec_prefix="$(exec_prefix)" lib_prefix="$(lib_prefix)" \ TMP_LIBDIR="$(TMP_LIBDIR)" LIBDIR_SRC="$(LIBDIR_SRC)" \ SRCDIR="$(SRCDIR)" prefix="$(prefix)" MANDIR_SRC="$(MANDIR_SRC)" \ man_prefix="$(man_prefix)" pike_name=$(pike_name)
163a741997-12-04Fredrik Hübinette (Hubbe) 
933d361996-04-29Fredrik Hübinette (Hubbe) new_peep_engine:
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c
c37c7e1999-03-26Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/make_ci.pike <$(SRCDIR)/UnicodeData.txt >$(SRCDIR)/case_info.h
933d361996-04-29Fredrik Hübinette (Hubbe) 
e53ee61998-04-27Henrik Grubbström (Grubba) $(SRCDIR)/peep_engine.c: $(SRCDIR)/peep.in $(TMP_BINDIR)/mkpeep.pike
933d361996-04-29Fredrik Hübinette (Hubbe)  echo "" >$(SRCDIR)/peep_engine.c
06983f1996-09-22Fredrik Hübinette (Hubbe)  -$(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c
933d361996-04-29Fredrik Hübinette (Hubbe) 
115ae01996-09-25Fredrik Hübinette (Hubbe) peep.o: $(SRCDIR)/peep_engine.c
d8632c1996-05-04Fredrik Hübinette (Hubbe) 
94d9921999-03-20Henrik Grubbström (Grubba) $(SRCDIR)/case_info.h: $(SRCDIR)/UnicodeData.txt $(TMP_BINDIR)/make_ci.pike
5ddf951999-03-23Fredrik Hübinette (Hubbe)  if $(RUNPIKE) $(TMP_BINDIR)/make_ci.pike <$(SRCDIR)/UnicodeData.txt; \
94d9921999-03-20Henrik Grubbström (Grubba)  then :; else echo '#include "dummy_ci.h"'; fi >$(SRCDIR)/case_info.h
5b8ea71999-03-20Henrik Grubbström (Grubba) builtin_functions.o: $(SRCDIR)/case_info.h
5625661997-04-15Fredrik Hübinette (Hubbe) # make dependencies
1dcea91997-04-22Fredrik Hübinette (Hubbe) depend: $(SRCDIR)/language.c
e5bb7d1996-09-23Fredrik Hübinette (Hubbe)  gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(TMP_BINDIR)/fixdepends.sh $(SRCDIR)
f3bce61996-06-21Fredrik Hübinette (Hubbe)  ( cd modules ; $(MAKE) $(MAKE_FLAGS) depend )
a4f7de1998-01-13Fredrik Hübinette (Hubbe)  $(SRCDIR)/configure @ac_configure_args@
933d361996-04-29Fredrik Hübinette (Hubbe) 
adbb821998-05-22Henrik Grubbström (Grubba) # Documentation...
933d361996-04-29Fredrik Hübinette (Hubbe) docs: mkdir docs
adbb821998-05-22Henrik Grubbström (Grubba) wmml: force @test -d wmml/. || mkdir wmml @modules="`cd $(SRCDIR)/modules; ls -d */. | sed -e '/^_.*/d' -e 's/\/\.$$//'`"; \ echo The following modules are interresting:; \ echo "$$modules"; \ for d in $$modules; do \ echo Testing $$d...; \ if test -f "$(SRCDIR)/modules/$$d/wmml-header"; then \ echo Module $$d seems to contain WMML docs.; \ $(RUNPIKE) $(TMP_BINDIR)/mkwmml.pike \ "$(SRCDIR)/modules/$$d/wmml-header" \ `find $(SRCDIR)/modules/$$d/. $(SRCDIR)/modules/_$$d*/. -name '*.[ch]' -print 2>/dev/null` \ "$(SRCDIR)/modules/$$d/wmml-footer" >wmml/$$d.wmml; \ else :; fi; \ done manpages: wmml @(if test -f "$(SRCDIR)/../tutorial/tutorial.wmml"; then \ cat "$(SRCDIR)/../tutorial/tutorial.wmml"; \ else \ cat wmml/*.wmml; \ fi) | (cd wmml; $(RUNPIKE) $(TMP_BINDIR)/wmmltohtml2 \ $(TMP_BINDIR)/manpages man/man) # Lobotomization...
61f4a11997-11-19Fredrik Hübinette (Hubbe) lobotomize_crypto: ( cd $(SRCDIR)/modules/_Crypto ; ./.build_lobotomized_crypto ) ( cd $(SRCDIR)/modules/_Lobotomized_Crypto ; autoconf )
2a34ce1998-08-02Henrik Grubbström (Grubba) 
933d361996-04-29Fredrik Hübinette (Hubbe) #
06983f1996-09-22Fredrik Hübinette (Hubbe) # Pike internal targets
933d361996-04-29Fredrik Hübinette (Hubbe) #
76b1071998-04-17Fredrik Hübinette (Hubbe) module_objects: machine.h global.h modules/static_module_makefile modules/dynamic_module_makefile $(SRCDIR)/language.h lib master.pike
b66f021998-04-13Henrik Grubbström (Grubba)  @( cd modules ; rm remake >/dev/null 2>&1 || : ; \
e09c9e1999-08-13Martin Stjernholm  $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) || \ ( test -f remake && $(MAKE) $(MAKE_PARALLEL) $(MAKE_FLAGS) ) ) || exit $$?
933d361996-04-29Fredrik Hübinette (Hubbe) 
97c0321997-01-28Fredrik Hübinette (Hubbe) language.o: $(SRCDIR)/language.c $(SRCDIR)/object.h $(SRCDIR)/interpret.h $(SRCDIR)/program.h
933d361996-04-29Fredrik Hübinette (Hubbe) 
97c0321997-01-28Fredrik Hübinette (Hubbe) $(SRCDIR)/language.h: $(SRCDIR)/language.yacc
933d361996-04-29Fredrik Hübinette (Hubbe)  @echo "Expect 1 shift/reduce conflict."
121e621998-07-21Fredrik Hübinette (Hubbe)  ( cd $(SRCDIR) ;\ $(YACC) $(YFLAGS) language.yacc ;\ mv y.tab.c language.c ;\ mv y.tab.h language.h )
933d361996-04-29Fredrik Hübinette (Hubbe) 
97c0321997-01-28Fredrik Hübinette (Hubbe) $(SRCDIR)/language.c: $(SRCDIR)/language.h
933d361996-04-29Fredrik Hübinette (Hubbe)  touch $(SRCDIR)/language.c
1dcea91997-04-22Fredrik Hübinette (Hubbe) # Internal testing target run_yacc: $(SRCDIR)/language.c
740c7b1997-02-06Fredrik Hübinette (Hubbe) modules/modlist.h:
2a34ce1998-08-02Henrik Grubbström (Grubba)  ( cd modules ; $(MAKE) $(MAKE_FLAGS) )
740c7b1997-02-06Fredrik Hübinette (Hubbe)  modules/modlist_headers.h: modules/modlist.h touch modules/modlist_headers.h
a9d05c1997-04-10Fredrik Hübinette (Hubbe) module.o: modules/modlist_headers.h modules/modlist.h
933d361996-04-29Fredrik Hübinette (Hubbe) 
97c0321997-01-28Fredrik Hübinette (Hubbe) $(SRCDIR)/configure: $(SRCDIR)/configure.in
933d361996-04-29Fredrik Hübinette (Hubbe)  cd $(SRCDIR) && autoconf
549f8b1996-05-02Fredrik Hübinette (Hubbe) config.status: $(SRCDIR)/configure
933d361996-04-29Fredrik Hübinette (Hubbe)  ./config.status --recheck
1909941997-11-04Henrik Grubbström (Grubba) 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
6265aa1997-01-18Fredrik Hübinette (Hubbe) Makefile: $(SRCDIR)/Makefile.in $(SRCDIR)/dependencies config.status
5aea901997-10-13Henrik Grubbström (Grubba)  CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status
40bb511999-02-05Martin Stjernholm  touch remake
549f8b1996-05-02Fredrik Hübinette (Hubbe)  @echo "Run make again" @exit 1
933d361996-04-29Fredrik Hübinette (Hubbe) 
97c0321997-01-28Fredrik Hübinette (Hubbe) $(SRCDIR)/machine.h.in: $(SRCDIR)/stamp-h.in
fc085b1998-05-29Henrik Grubbström (Grubba)  @if test -f $(SRCDIR)/machine.h.in; then :; else \
85222d1998-05-29Henrik Grubbström (Grubba)  rm $(SRCDIR)/stamp-h.in; $(MAKE) $(SRCDIR)/stamp-h.in; \
fc085b1998-05-29Henrik Grubbström (Grubba)  fi
97c0321997-01-28Fredrik Hübinette (Hubbe) $(SRCDIR)/stamp-h.in: $(SRCDIR)/configure.in $(SRCDIR)/acconfig.h
0d36f01997-01-28Fredrik Hübinette (Hubbe)  cd $(SRCDIR) && autoheader echo foo > $(SRCDIR)/stamp-h.in
933d361996-04-29Fredrik Hübinette (Hubbe) machine.h: stamp-h
aa411b1998-05-22Henrik Grubbström (Grubba)  @if test -f machine.h; then :; else \
adbb821998-05-22Henrik Grubbström (Grubba)  rm stamp-h; $(MAKE) stamp-h; \
aa411b1998-05-22Henrik Grubbström (Grubba)  fi
fc085b1998-05-29Henrik Grubbström (Grubba) stamp-h: $(SRCDIR)/stamp-h.in $(SRCDIR)/machine.h.in config.status
5aea901997-10-13Henrik Grubbström (Grubba)  CONFIG_FILES="" CONFIG_HEADERS=machine.h ./config.status
933d361996-04-29Fredrik Hübinette (Hubbe) 
e5bb7d1996-09-23Fredrik Hübinette (Hubbe) testsuite: $(SRCDIR)/testsuite.in
086bfa1998-04-09Fredrik Hübinette (Hubbe)  $(TMP_BINDIR)/mktestsuite $(SRCDIR)/testsuite.in >testsuite -DSRCDIR="$(SRCDIR)"
933d361996-04-29Fredrik Hübinette (Hubbe) 
6265aa1997-01-18Fredrik Hübinette (Hubbe) @dependencies@