Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Module Information
Public.Protocols.TIMSieve
Viewing contents of Public_Protocols_TIMSieve-0.1/Makefile

# -*- Makefile -*-
#
# $Id: make_variables.in,v 1.24 2006/06/21 16:29:59 mast Exp $
#
# Note: This template is actually used only for make_variables in the
# subdirectories; the one created in the build base dir is just an
# unwanted by-product.

# There's magic to propagate variables to subdir configure scripts and
# to retain those variables when a subdir is reconfigured
# individually:
#
# Lines beginning with "#propagated_variables:" list such variables.
# They are available both as make variables and in the configure
# script environment. The PIKE_RETAIN_VARIABLES macro (called through
# AC_MODULE_INIT) reads them from the propagated_variables file if it
# exists, and assigns them in the environment only if they don't have
# any value already.
#
# Note: The easiest way to force full repropagation is to rerun the
# core configure script (e.g. through "make force_configure" in the
# top directory).
CC=/usr/local/pike/7.7.25/include/pike/smartlink gcc
CPP=gcc -E
LDSHARED=gcc -shared 
AR=
INSTALL=
BASE_CFLAGS=
BASE_CPPFLAGS=
CCSHARED=
BASE_LDFLAGS=
OPTIMIZE=
WARN=
PROFIL=
TMP_BUILDDIR=
TMP_BINDIR=
PIKE_SRC_DIR=/usr/local/pike/7.7.25/include/pike
BUILD_BASE=/usr/local/pike/7.7.25/include/pike
#propagated_variables: CC CPP LDSHARED AR INSTALL
#propagated_variables: BASE_CFLAGS BASE_CPPFLAGS CCSHARED BASE_LDFLAGS
#propagated_variables: OPTIMIZE WARN PROFIL
#propagated_variables: TMP_BUILDDIR TMP_BINDIR PIKE_SRC_DIR BUILD_BASE


prefix=/usr/local
exec_prefix=$(prefix)/bin
TMP_LIBDIR=$(TMP_BUILDDIR)/lib
SRCDIR=.

DEFAULT_RUNPIKE=$(TMP_BUILDDIR)/tpike -DNOT_INSTALLED -DPRECOMPILED_SEARCH_MORE -m$(TMP_BUILDDIR)/master.pike $(PIKEOPTS)
USE_PIKE=pike $(PIKEOPTS)
RUNPIKE=$(DEFAULT_RUNPIKE)

DEFINES= -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPOSIX_SOURCE=
OTHERFLAGS= $(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL)
NOOPTFLAGS= $(OSFLAGS) $(WARN) $(PROFIL)

PMOD_TARGETS=
make_variables_in=/usr/local/pike/7.7.25/include/pike/make_variables.in
MODULE_PMOD_IN=
MODULE_WRAPPER_PREFIX=

MODNAME=Public_Protocols_TIMSieve-0.1
MODPATH=
MODDIR=

# End of make_variables.in

OBJS=
AUTODOC_SRC_IN=
MODDIR=Public.pmod/Protocols.pmod/
MODNAME=TIMSieve
MODULE_PMOD_IN=TIMSieve.pmod.in
MODULE_LDFLAGS= 
CONFIG_HEADERS=
#
# $Id: dynamic_module_makefile.in,v 1.117 2006/06/18 14:52:32 mast Exp $
#

LIBGCC=/usr/lib/gcc/i486-linux-gnu/4.0.4/libgcc.a
LC_REQ=-lc

LINKAGE_CPPFLAGS=
DYNAMIC_LINKAGE_CFLAGS= -fPIC -DDYNAMIC_MODULE
STATIC_LINKAGE_CFLAGS=
LINKAGE_CFLAGS=$(DYNAMIC_LINKAGE_CFLAGS)

MODULE_PROGRAM=.$(MODULE_WRAPPER_PREFIX)$(MODNAME)
MODULE_TARGET=$(TMP_MODULE_BASE)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so

# The reason for this is that we can't use targets directly to specify
# the build type; many module makefiles depend on being able to
# override the default target.
all:
	@case "x$$MODULE_BUILD_TYPE" in \
	  xstatic) $(MAKE) $(MAKE_FLAGS) static;; \
	  xdynamic) $(MAKE) $(MAKE_FLAGS) dynamic;; \
	  x) $(MAKE) $(MAKE_FLAGS) static dynamic;; \
	  *) \
	    echo "Invalid MODULE_BUILD_TYPE: $$MODULE_BUILD_TYPE" >&2; \
	    exit 1;; \
	esac

#
# $Id: common_module_makefile.in,v 1.41 2006/06/21 17:20:59 mast Exp $
#
# Contains stuff common to both dynamic_module_makefile and
# static_module_makefile.
#
# Modules should NOT use this file directly, but instead use either
# dynamic_module_makefile or static_module_makefile as appropriate.
#

PREFLAGS=-I. -I$(SRCDIR) -I$(BUILD_BASE) -I$(PIKE_SRC_DIR) $(LINKAGE_CPPFLAGS) $(MODULE_CPPFLAGS) $(DEFINES)
CFLAGS=$(MODULE_CFLAGS) $(OTHERFLAGS) $(LINKAGE_CFLAGS)
NOOPT_CFLAGS=$(MODULE_CFLAGS) $(NOOPTFLAGS) $(LINKAGE_CFLAGS)

# MAKE_FLAGS_BASE must not contain LINKAGE_*.
MAKE_FLAGS_BASE = "prefix=$(prefix)" "exec_prefix=$(exec_prefix)" "CC=$(CC)" "OTHERFLAGS=$(OTHERFLAGS)" "TMP_BINDIR=$(TMP_BINDIR)" "DEFINES=$(DEFINES)" "TMP_LIBDIR=$(TMP_LIBDIR)" "RUNPIKE=$(RUNPIKE)" "INSTALL=$(INSTALL)" "AR=$(AR)" "NOOPTFLAGS=$(NOOPTFLAGS)" $(MODULE_MAKE_FLAGS)
MAKE_FLAGS = $(MAKE_FLAGS_BASE) "LINKAGE_CFLAGS=$(LINKAGE_CFLAGS)"

MODULE_BASE=$(BUILD_BASE)/modules
TMP_MODULE_BASE=$(TMP_LIBDIR)/modules

force:
	@:

module-preamble: Makefile $(DUMMY) linker_options modlist_segment

module-main: Makefile $(MODULE_TARGET) module.pmod
	@if [ x"$(PIKE_EXTERNAL_MODULE)" = x -a x"$(MODULE_PMOD_IN)" != x ]; then \
	  $(TMP_BINDIR)/install_module module.pmod $(TMP_MODULE_BASE)/$(MODDIR)$(MODNAME).pmod ; \
	fi

$(MODULE_ARCHIVES) ThisIsAPhonyTargetBlaBlaBla: force
	@a=`echo $@ | sed -e 's@/[^/]*$$@@'` ; \
	 m=`echo $@ | sed -e 's@.*/@@g'`; \
	echo Making $(MODNAME)/$$a/$$m ; \
	( rm $$a/remake >/dev/null 2>&1 ||: ; \
	  cd $$a && ( $(MAKE) $(MAKE_FLAGS) $$m || \
	              ( test -f remake ; $(MAKE) $(MAKE_FLAGS) $$m ) ) \
	) || exit $$?

.SUFFIXES:
.SUFFIXES: .c .o .cmod .protos

.cmod.c: $(BUILD_BASE)/precompile.sh-stamp $(TMP_BINDIR)/precompile.pike
	$(BUILD_BASE)/precompile.sh --cache precompile.pike >"$@" "$<" || { rm "$@"; exit 1; }


# GCC dumps core on some files @ OSF1
# This kluge should work around that...
.c.o:
	@echo "Compiling `echo '$<' | sed -e 's|^$(PIKE_SRC_DIR)/||'`" ; \
	rm -f $@.fail >/dev/null 2>&1; \
	if $(CC) $(PREFLAGS) $(CFLAGS) -c $< -o $@ ; then : ; else \
	  status=$$?; \
	  if test x"yes" = xyes ; then \
	    echo "WARNING: Compiler failure! Trying without optimization!" >&2;\
	    echo "$(CC) $(PREFLAGS) $(CFLAGS) -c $< -o $@" >$@.fail ;\
	    if NO_ULIMIT=yes $(CC) $(PREFLAGS) $(NOOPTFLAGS) -c $< -o $@ ; then : ; else \
	      status=$$?; \
	      echo "Compilation command was:" >&2;\
	      echo "$(CC) $(PREFLAGS) $(NOOPTFLAGS) -c $< -o $@" >&2 ;\
	      exit $$status; \
	    fi; \
	  else \
	    echo "Compilation command was:" >&2;\
	    echo "$(CC) $(PREFLAGS) $(CFLAGS) -c $< -o $@" >&2 ;\
	    exit $$status; \
	  fi; \
	fi

.c.protos: $(BUILD_BASE)/precompile.sh-stamp
	./precompile.sh --cache fake_dynamic_load.pike >"$@" --cpp --protos \
	  $(CPP) $(PREFLAGS) -DPMOD_EXPORT=PMOD_EXPORT \
	    -DPMOD_PROTO=PMOD_PROTO -DPIKE_PRECOMPILER=1 "$<" || \
	  { rm "$@"; exit 1; }

propagated_variables:

make_variables: $(make_variables_in) config.status propagated_variables
	CONFIG_FILES="make_variables:$(make_variables_in)" CONFIG_HEADERS="" ./config.status

# $(CONFIG_HEADERS) should exist but they need not be more fresh than
# config.status since it only rewrites them if they actually change.
$(CONFIG_HEADERS) dummy_config_header: config.status
	@if [ x"$(CONFIG_HEADERS)" != x ]; then \
	  for hdr in $(CONFIG_HEADERS); do \
	    if [ -f "$$hdr" ]; then :; else \
	      echo CONFIG_HEADERS="$(CONFIG_HEADERS)" ./config.status; \
	      CONFIG_HEADERS="$(CONFIG_HEADERS)" ./config.status; \
	    fi; \
	  done; \
	fi

$(SRCDIR)/configure: $(SRCDIR)/configure.in $(PIKE_SRC_DIR)/aclocal.m4
	cd $(SRCDIR) && $(PIKE_SRC_DIR)/run_autoconfig .

config.status: $(SRCDIR)/configure propagated_variables
	./config.status --recheck

module.pmod: Makefile $(MODULE_PMOD_IN)
	@if [ "x$(MODULE_PMOD_IN)" != "x" ]; then \
	  echo "Making module.pmod" ; \
	  if [ -f "$(MODULE_PMOD_IN)" ]; then \
	    sed -e "s#@module@#$(MODULE_PROGRAM)#" \
	      <"$(MODULE_PMOD_IN)" >module.pmod; \
	  else \
	   if [ -d "$(MODULE_PMOD_IN)" ]; then \
	     find "$(MODULE_PMOD_IN)" -type d -print | sed -e "s#$(MODULE_PMOD_IN)#module.pmod#" | xargs -n 1 mkdir -p ;\
	     for mi in `find "$(MODULE_PMOD_IN)" -type f -print | sed -e "s#$(MODULE_PMOD_IN)##"` ;\
	     do \
	       sed -e "s#@module@#$(MODULE_PROGRAM)#" \
	         <"$(MODULE_PMOD_IN)/$$mi" > "module.pmod/$$mi" ; \
	     done; \
	  else \
	    echo 'Missing source for module.pmod "$(MODULE_PMOD_IN)".' >&2; \
	    exit 1; \
	  fi ;\
	fi; \
	fi


clean_here:
	-rm -f *.o *.fail *.obj *.a *.so stamp-h linker_options modlist_segment testsuite $(MODULE_CLEAN_EXTRA) doc build_type
	-rm -rf plib refdoc module.pmod doc

clean: clean_here
	@for a in '' $(MODULE_SUBDIRS) ; do \
	  if test "x$$a" = "x"; then :; \
	  else ( cd $$a ; $(MAKE) $(MAKE_FLAGS) clean ) ; fi ; \
	done

spotless: clean_here
	-rm -f config.cache config.log config.status Makefile propagated_variables make_variables dependencies pike_*.feature
	-rm -f core core.* .pure conftest.* $(MODULE_SPOTLESS_EXTRA)
	@for a in '' $(MODULE_SUBDIRS) ; do \
	  if test "x$$a" = "x"; then :; \
	  else ( cd $$a ; $(MAKE) $(MAKE_FLAGS) spotless ) ; fi ; \
	done


depend: $(SRC_TARGETS) $(PMOD_TARGETS) Makefile
	@gcc -MM -MG $(PREFLAGS) $(SRCDIR)/*.c | $(TMP_BINDIR)/fixdepends.sh "$(SRCDIR)" "$(PIKE_SRC_DIR)" "$(BUILD_BASE)"
	@CONFIG_FILES=Makefile CONFIG_HEADERS="" ./config.status
	@for a in '' $(MODULE_SUBDIRS) ; do \
	  if test "x$$a" = "x"; then :; else \
	    echo Making depend in $$a; \
	    ( cd $$a && { \
	      rm -f remake; \
	      $(MAKE) $(MAKE_FLAGS) depend || \
		if test -f remake; then $(MAKE) $(MAKE_FLAGS) depend; \
		else exit $$?; fi; \
	    }); \
	  fi; \
	done

pike_external_module: plib/modules
	@$(MAKE) $(MAKE_FLAGS) LOCAL_MODULE_PATH="./plib/modules" local_install

refdoc:
	@test -d refdoc || mkdir refdoc

refdoc/modref: refdoc
	@test -d refdoc/modref || mkdir refdoc/modref

plib/doc_build/images: plib/doc_build
	@test -d plib/doc_build/images || mkdir plib/doc_build/images

plib/doc_build: plib
	@test -d plib/doc_build || mkdir plib/doc_build

plib/modules: plib
	@test -d plib/modules || mkdir plib/modules

plib/refdoc: plib
	@test -d plib/refdoc || mkdir plib/refdoc

plib:
	@test -d plib || mkdir plib

#verify / debug
testsuite: $(SRCDIR)/testsuite.in $(REAL_TESTSUITE) $(TMP_BINDIR)/mktestsuite
	@if test "x$(REAL_TESTSUITE)" != x ; then \
	  cp $(SRCDIR)/$(REAL_TESTSUITE) testsuite; \
	else \
	  if test "$$PIKE_PATH_TRANSLATE" = ""; then \
	    $(TMP_BINDIR)/mktestsuite $(SRCDIR)/testsuite.in >testsuite \
	      -DSRCDIR="`echo $(SRCDIR)|$(BUILD_BASE)/posix_to_native.sh`"; \
	  else \
	    $(TMP_BINDIR)/mktestsuite $(SRCDIR)/testsuite.in >testsuite \
	      -DSRCDIR="`echo $(SRCDIR)|sed -e $$PIKE_PATH_TRANSLATE|$(BUILD_BASE)/posix_to_native.sh`"; \
	  fi; \
	fi

extra_tests: $(MODULE_TESTS)

verify: testsuite $(MODULE_TESTS) $(PIKE_EXTERNAL_MODULE)
	$(RUNPIKE) -Mplib/modules $(TMP_BINDIR)/test_pike.pike testsuite

verbose_verify: testsuite $(MODULE_TESTS) $(PIKE_EXTERNAL_MODULE)
	@$(RUNPIKE) -Mplib/modules $(TMP_BINDIR)/test_pike.pike testsuite --verbose

gdb_verify: testsuite $(PIKE_EXTERNAL_MODULE)
	@echo >.gdbinit handle SIGUSR1 nostop noprint pass
	@echo >>.gdbinit run -DNOT_INSTALLED -m $(TMP_BUILDDIR)/master.pike $(PIKEOPTS) -Mplib/modules $(TMP_BINDIR)/test_pike.pike testsuite -v -v -f
	gdb $(TMP_BUILDDIR)/pike
	@rm .gdbinit

extract_autodoc: $(PIKE_EXTERNAL_MODULE) plib/refdoc plib/doc_build/images
	$(RUNPIKE) -x extract_autodoc --builddir=plib/refdoc --srcdir=plib/modules
	if test "X$(AUTODOC_SRC_IN)" != "X"; then \
	$(RUNPIKE) -x extract_autodoc --builddir=plib/refdoc $(AUTODOC_SRC_IN); \
	fi

join_autodoc: extract_autodoc
	$(RUNPIKE) -x join_autodoc --quiet --post-process  "plib/autodoc.xml" "$(CORE_AUTODOC_PATH)" "plib/refdoc"

modref:	join_autodoc modref.xml
	cd $(SYSTEM_DOC_PATH)/src && $(MAKE) $(MAKE_FLAGS) BUILDDIR="$(FULL_SRCDIR)/plib" DESTDIR="$(SYSTEM_DOC_PATH)" modref

module_join_autodoc: extract_autodoc refdoc/modref
	$(RUNPIKE) -x join_autodoc --quiet --post-process  "plib/autodoc.xml" "plib/refdoc"

module_modref: module_join_autodoc module_modref.xml
	cd $(SYSTEM_DOC_PATH)/src && $(MAKE) $(MAKE_FLAGS) BUILDDIR="$(FULL_SRCDIR)/plib" DESTDIR="$(FULL_SRCDIR)/refdoc/" module_modref

modref.xml: plib/autodoc.xml $(SYSTEM_DOC_PATH)/src/structure/modref.xml
	  $(RUNPIKE) -x assemble_autodoc $(SYSTEM_DOC_PATH)/src/structure/modref.xml \
	  plib/autodoc.xml >plib/modref.xml

module_modref.xml: plib/autodoc.xml $(SYSTEM_DOC_PATH)/src/structure/module_modref.xml
	  $(RUNPIKE) -x assemble_autodoc $(SYSTEM_DOC_PATH)/src/structure/module_modref.xml \
	  plib/autodoc.xml >plib/module_modref.xml

examine_module: $(MODULE_TARGET)
	-nm $(MODULE_TARGET)

build_type:
	@echo dynamic > build_type

static: module-preamble
	@:

dynamic: module-main
	@:

linker_options: Makefile
	@if test "x$(LINKER_OPTIONS)" != x ; then \
	  echo "echo $(LINKER_OPTIONS) > linker_options" ; \
	else : ; fi ; \
	echo "$(LINKER_OPTIONS)" >linker_options

modlist_segment: Makefile
	@echo "" >modlist_segment

# Can't depend on $(SRCDIR)/$(CONFIG_HEADERS).in since
# $(CONFIG_HEADERS) isn't always used.
Makefile: $(MODULE_BASE)/dynamic_module_makefile $(SRCDIR)/Makefile.in $(SRCDIR)/dependencies make_variables config.status
	CONFIG_FILES=Makefile CONFIG_HEADERS="$(CONFIG_HEADERS)" ./config.status
	touch remake
	@echo "Run make again" >&2
	@exit 1

$(MODULE_TARGET): module.so
	@if test "x$(OBJS)" = "x" ; then \
	  exit 0; \
	fi; \
	if test "x$(PIKE_EXTERNAL_MODULE)" = "x" ; then \
	  $(TMP_BINDIR)/install_module module.so $(MODULE_TARGET) ; \
	fi

module.so: $(MODULE_ARCHIVES) $(OBJS)
	@if test "x$(OBJS)" = "x" ; then \
	  exit 0; \
	fi; \
	echo "Linking $(MODNAME)" ;\
	if $(TMP_BINDIR)/smartlink "$(LDSHARED)" $(LDFLAGS) -o module.so \
	  $(OBJS) $(MODULE_ARCHIVES) $(MODULE_LDFLAGS) \
	  $(LIBGCC) $(LC_REQ) $(LIBGCC) ; then \
	  if test so != so ; then mv module.so module.so ; else :; fi ;\
	else \
	  echo "Linking failed:" >&2; \
	  echo $(TMP_BINDIR)/smartlink "$(LDSHARED)" $(LDFLAGS) -o module.so $(OBJS) $(MODULE_ARCHIVES) $(MODULE_LDFLAGS) $(LIBGCC) $(LC_REQ) $(LIBGCC) >&2 ;\
	  exit 1; \
	fi

$(OBJS) : $(MODULE_BASE)/dynamic_module_makefile

#
# install a standard module with optional c component in the system module path
#
install: $(MODULE_INSTALL)
	@if test "x$(OBJS)" != "x" ; then \
	  $(TMP_BINDIR)/install_module module.so $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so ;\
	fi; \
	if test "x$(MODULE_PMOD_IN)" != "x"; then \
	  $(TMP_BINDIR)/install_module module.pmod $(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\
	fi;

#
# install the module in LOCAL_MODULE_PATH, creating it if it doesn't already exist.
#
local_install: $(MODULE_INSTALL)
	if test ! -d "$(LOCAL_MODULE_PATH)" ; then \
	  mkdir -p $(LOCAL_MODULE_PATH) ; \
	fi; if test "x$(OBJS)" != "x" ; then \
	  $(TMP_BINDIR)/install_module module.so $(LOCAL_MODULE_PATH)/$(MODDIR)$(MODULE_WRAPPER_PREFIX)$(MODNAME).so ;\
	fi; \
	if test "x$(MODULE_PMOD_IN)" != "x"; then \
	  $(TMP_BINDIR)/install_module module.pmod $(LOCAL_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod ;\
	fi

dump_module: install
	-rm -f dumpmodule.log
	args=$${args:-"--log-file --update-only=dumpversion --report-failed"}; \
	$(RUNPIKE) -x dump $$args \
	--recursive "$(SYSTEM_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod"

dump_local_module: install
	-rm -f dumpmodule.log
	args=$${args:-"--log-file --update-only=dumpversion --report-failed"}; \
	$(RUNPIKE) -x dump $$args \
	--recursive "$(LOCAL_MODULE_PATH)/$(MODDIR)$(MODNAME).pmod"


gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University