Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Monday, December 16, 2019

File: [Platon] / libplaton / Makefile.in (download)

Revision 1.9, Tue Oct 1 18:32:14 2002 UTC (17 years, 2 months ago) by rajo

Changes since 1.8: +519 -208 lines

New building stuff. Many new features, many new bugs. ;)

# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# Main Makefile for libcfg+ library.
# $Id: Makefile.in,v 1.9 2002/10/01 18:32:14 rajo Exp $ 

PACKAGE = @PACKAGE@
VERSION = @VERSION@

CVSTAG = $(PACKAGE)-$(subst .,_,$(VERSION))

SHELL = @SHELL@

# Directories {{{
top_builddir      = .
srcdir            = @srcdir@
top_srcdir        = @top_srcdir@
VPATH             = @srcdir@
prefix            = @prefix@
exec_prefix       = @exec_prefix@
                  
bindir            = @bindir@
sbindir           = @sbindir@
libexecdir        = @libexecdir@
datadir           = @datadir@
sysconfdir        = @sysconfdir@
sharedstatedir    = @sharedstatedir@
localstatedir     = @localstatedir@
libdir            = @libdir@
infodir           = @infodir@
mandir            = @mandir@
man3dir           = $(mandir)/man3
includedir        = @includedir@
includedir_platon = $(includedir)/platon
oldincludedir     = /usr/include
                 
DESTDIR           =
                 
pkgdatadir        = $(datadir)/@PACKAGE@
pkglibdir         = $(libdir)/@PACKAGE@
pkgincludedir     = $(includedir)/@PACKAGE@

distdir           = $(PACKAGE)-$(VERSION)
top_distdir       = $(distdir)

# }}} Directories

# Programs {{{
#ACLOCAL    = @ACLOCAL@
#AUTOCONF   = @AUTOCONF@
#AUTOMAKE   = @AUTOMAKE@
#AUTOHEADER = @AUTOHEADER@
ACLOCAL    = aclocal
AUTOCONF   = autoconf
AUTOMAKE   = automake
AUTOHEADER = autoheader


INSTALL         = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA    = @INSTALL_DATA@
INSTALL_SCRIPT  = @INSTALL_SCRIPT@
transform       = @program_transform_name@
mkinstalldirs   = $(SHELL) $(top_srcdir)/mkinstalldirs
LN_S            = @LN_S@
MAKEINFO        = @MAKEINFO@
RANLIB          = @RANLIB@
STRIP           = @STRIP@
AWK             = @AWK@
JADEWRAP        = @JADEWRAP@
DOXYGEN         = @DOXYGEN@
TAR             = tar
GZIP_ENV        = --best
NROFF           = nroff
DEPEND          = makedepend 

NORMAL_INSTALL   = :
PRE_INSTALL      = :
POST_INSTALL     = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL    = :
POST_UNINSTALL   = :

CC       = @CC@
CPP      = @CPP@
CXX      = @CXX@
CFLAGS   = -O2 -Wall -pedantic
CPPFLAGS = @CPPFLAGS@
LDFLAGS  = @LDFLAGS@
DEFS     = @DEFS@
INCLUDES = -I$(srcdir) -I$(top_builddir)

COMPILE  = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
CCLD     = $(CC)
LINK     = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@

# }}} Programs

# Targets {{{

CONFIG_HEADER   = $(top_builddir)/config.h
include_HEADERS = 
noinst_HEADERS  = platon/cfgfile.h \
                  platon/cmdline.h \
                  platon/shared.h \
                  platon/str/dynfgets.h \
                  platon/str/strctype.h \
                  platon/str/strdyn.h \
                  platon/str/strplus.h

noinst_SCRIPTS =

man_MANS  =
man3_MANS =
MANS      = $(man_MANS) $(man3_MANS)

CONFIG_CLEAN_FILES = $(top_builddir)/Makefile \
                     $(top_builddir)/doc/Makefile \
                     $(top_builddir)/platon/html/Makefile \
                     $(top_builddir)/platon/misc/Makefile \
                     $(top_builddir)/platon/net/atlantis/Makefile \
                     $(top_builddir)/platon/net/smtp/Makefile \
                     $(top_builddir)/platon/net/Makefile \
                     $(top_builddir)/platon/str/Makefile \
                     $(top_builddir)/platon/Makefile \
                     $(top_builddir)/utils/Makefile

SCRIPTS            =  $(noinst_SCRIPTS)

HEADERS =  $(include_HEADERS) $(noinst_HEADERS) $(CONFIG_HEADER)

DISTFILES = AUTHORS COPYING README INSTALL TODO \
            Makefile.in configure.in \
            config.h.in \
            config.guess config.sub configure \
            install-sh mkinstalldirs rebuild \
            platon/ \
            $(include_HEADERS) $(noinst_HEADERS) \
            doc/

# }}} Targets

all: configure-scripts makefiles $(MANS) all-subdirs

makefiles: $(top_builddir)/Makefile \
    $(top_builddir)/doc/Makefile \
    $(top_builddir)/platon/html/Makefile \
    $(top_builddir)/platon/misc/Makefile \
    $(top_builddir)/platon/net/atlantis/Makefile \
    $(top_builddir)/platon/net/smtp/Makefile \
    $(top_builddir)/platon/net/Makefile \
    $(top_builddir)/platon/str/Makefile \
    $(top_builddir)/platon/Makefile \
    $(top_builddir)/utils/Makefile
configure-scripts: $(top_builddir)/config.status \
    $(top_srcdir)/configure \
    $(top_builddir)/config.h  \
    $(top_srcdir)/config.h.in

all-subdirs: all-src all-utils

all-src:
    cd $(top_builddir)/platon && $(MAKE)

all-utils:
    cd $(top_builddir)/utils && $(MAKE)

#all-doc target doesn't exists, because documentation 
# is already builded in distribution package
documentation:
    cd $(top_builddir)/doc && $(MAKE)

# don't change dependency files, because this causes make
# to rebuild them. Use trick with '-c' (stdout).
%.gz: %
    $(GZIP) -f -c $< > $@


static:
    cd $(top_builddir)/platon && $(MAKE) $@

dynamic:
    cd $(top_builddir)/platon && $(MAKE) $@

lib:
    cd $(top_builddir)/platon && $(MAKE) $@


.SUFFIXES:

# Makefiles, configure scripts dependencies {{{
# Main Makefile
$(top_builddir)/Makefile: $(top_srcdir)/Makefile.in  $(top_builddir)/config.status
    @cd $(top_builddir) \
      && CONFIG_FILES=$@ CONFIG_HEADERS= \
        $(SHELL) ./config.status

# Makefile in platon/ subdirectory
$(top_builddir)/%/Makefile: $(top_srcdir)/%/Makefile.in  $(top_builddir)/config.status
    @cd $(top_builddir) \
      && CONFIG_FILES=$@ CONFIG_HEADERS= \
        $(SHELL) ./config.status

$(top_builddir)/config.status: $(top_srcdir)/configure.in
    @cd $(top_builddir) \
      && $(SHELL) ./config.status --recheck

$(top_srcdir)/configure: $(top_srcdir)/configure.in
    @cd $(top_builddir) \
      $(SHELL) ./config.status --recheck \
        && cd $(top_srcdir) \
        && $(AUTOCONF)

$(top_builddir)/config.h: $(top_srcdir)/config.h.in \
    $(top_builddir)/config.status
    @cd $(top_builddir) \
      && CONFIG_FILES= CONFIG_HEADERS=config.h \
        $(SHELL) ./config.status \
          && touch config.h

$(top_srcdir)/config.h.in: $(top_srcdir)/configure.in
    @cd $(top_srcdir) \
      && $(AUTOHEADER) \
        && touch config.h.in
# Makefiles, configure scripts dependencies }}}

test:
    @$(MAKE) dist \
        && tar xzf $(distdir).tar.gz \
        && here=`pwd` \
        && cd $(distdir) \
            && ./configure --prefix=install_dir \
            && $(MAKE) --warn-undefined-variables \
            && $(MAKE) --warn-undefined-variables install \
            && $(MAKE) --warn-undefined-variables uninstall \
            && $(MAKE) --warn-undefined-variables dist \
            && $(MAKE) --warn-undefined-variables distcheck \
    && banner="Test of compilation ended without errors, super! :-)"; echo; \
       dashes=`echo "$$banner" | sed s/./=/g`; \
       echo "$$dashes"; \
       echo "$$banner"; \
       echo "$$dashes"; \
    cd $$here; \
    rm -rf $(distdir)


# Section: Install {{{
install: all
    cd $(top_builddir)/platon && $(MAKE) $@
    cd $(top_builddir)/doc && $(MAKE) $@
uninstall:
    cd $(top_builddir)/platon && $(MAKE) $@
    cd $(top_builddir)/doc && $(MAKE) $@

installcheck:
    cd $(top_builddir)/platon && $(MAKE) $@
    cd $(top_builddir)/doc && $(MAKE) $@

install-exec:
    cd $(top_builddir)/platon && $(MAKE) $@
uninstall-exec:
    cd $(top_builddir)/platon && $(MAKE) $@

install-lib:
    cd $(top_builddir)/platon && $(MAKE) $@
uninstall-lib:
    cd $(top_builddir)/platon && $(MAKE) $@

install-data:
    cd $(top_builddir)/doc && $(MAKE) $@

install-strip:
    cd $(top_builddir)/platon && $(MAKE) $@

installdirs:
    cd $(top_builddir)/platon && $(MAKE) $@
    cd $(top_builddir)/doc && $(MAKE) $@

install-man: $(MANS)
    cd $(top_builddir)/doc && $(MAKE) $@
uninstall-man:
    cd $(top_builddir)/doc && $(MAKE) $@

install-includeHEADERS: $(include_HEADERS)
    cd $(top_builddir)/platon && $(MAKE) $@
uninstall-includeHEADERS:
    cd $(top_builddir)/platon && $(MAKE) $@


# }}} Section: Install

# Section: TAGS {{{
tags: TAGS

ID:
    cd $(top_builddir)/platon && $(MAKE) $@
TAGS:
    cd $(top_builddir)/platon && $(MAKE) $@

# }}}  Section: TAGS

# Section: distribution {{{
# This target untars the dist file and tries a VPATH configuration.  Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
    -rm -rf $(distdir)
    GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
    mkdir $(distdir)/=build
    mkdir $(distdir)/=inst
    dc_install_base=`cd $(distdir)/=inst && pwd`; \
    cd $(distdir)/=build \
      && ../configure --srcdir=.. --prefix=$$dc_install_base \
      && $(MAKE) --warn-undefined-variables \
      && $(MAKE) --warn-undefined-variables dvi \
      && $(MAKE) --warn-undefined-variables documentation \
      && $(MAKE) --warn-undefined-variables check \
      && $(MAKE) --warn-undefined-variables install \
      && $(MAKE) --warn-undefined-variables installcheck \
      && $(MAKE) --warn-undefined-variables dist
    -rm -rf $(distdir)
    @banner="$(distdir).tar.gz is ready for distribution"; \
    dashes=`echo "$$banner" | sed s/./=/g`; \
    echo "$$dashes"; \
    echo "$$banner"; \
    echo "$$dashes"
    
dist-all: dist
dist: distdir distdir-permisions
    GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz  $(distdir)
    @#BZIP=$(GZIP_ENV) $(TAR) chojf $(distdir).tar.bz2 $(distdir)
    -rm -rf $(distdir)
    -@banner="md5sum is: `md5sum $(distdir).tar.gz |tee md5sum.$(distdir)`"; \
    dashes=`echo "$$banner" | sed s/./=/g`; \
    echo "$$dashes"; \
    echo "$$banner"; \
    echo "$$dashes"

# These target are needed for 'distdir' -- it creates documentation
# included in tarball before creating distribution dir.
doc/html:      documentation
doc/html/*:    documentation
doc/doxygen/*: documentation
distdir: $(DISTFILES)
    -rm -rf $(distdir)
    mkdir $(distdir)
    -chmod a+rx $(distdir)
    @here=`cd $(top_builddir) && pwd`; \
    top_distdir=`cd $(distdir) && pwd`; \
    distdir=`cd $(distdir) && pwd`; \
    umask 022; \
    for file in $(DISTFILES); do \
      d=$(srcdir); \
      if test -d $$d/$$file; then \
        mkdir $(distdir)/$$file; \
      else \
        test -f $(distdir)/$$file \
        || cp $$d/$$file $(distdir)/$$file || :; \
      fi; \
    done
 
# || ln $$d/$$file $(distdir)/$$file 2> /dev/null \

distdir-permisions:
    @for file in $(DISTFILES); do \
      if test -d $(distdir)/$$file; then \
        chmod a+rx $(distdir)/$$file; \
      else \
        test -f $(distdir)/$$file \
        && chmod a+r $(distdir)/$$file; \
      fi; \
      if test -x $(srcdir)/$$file; then \
          chmod a+x $(distdir)/$$file; \
      fi; \
    done

# }}} Section: distribution

info:
dvi:
check: all

# Section clean {{{

clean: clean-src clean-hdr
    -rm -rf  *.o core *.core .deps/ debian-build/
    -rm -f md5sum* *.deb

clean-src:
    cd $(top_builddir)/platon && $(MAKE) clean

clean-doc:
    cd $(top_builddir)/doc && $(MAKE) clean

clean-tags:
    cd $(top_builddir)/platon && $(MAKE) $@

clean-hdr:
    -rm -f config.h


mostlyclean: mostlyclean-src mostlyclean-hdr clean-tags
    -rm -rf  *.o core *.core .deps/
    -rm -f md5sum* *.deb

mostlyclean-src:
    cd $(top_builddir)/platon && $(MAKE) mostlyclean
mostlyclean-hdr:
    cd $(top_builddir)/platon && $(MAKE) mostlyclean

maintainer-clean: distclean maintainer-clean-generic
    @echo
    @echo "-----------------------------------------------------------"
    @echo "This command is intended for maintainers to use;"
    @echo "it deletes files that may require special tools to rebuild."
    @echo "-----------------------------------------------------------"
    @echo

maintainer-clean-generic:
    -rm -f $(top_builddir)/config.status $(top_srcdir)/configure
    -rm -f $(top_srcdir)/config.h.in
    -rm -f $(top_builddir)/$(PACKAGE)-*.tar.gz
    -rm -f $(top_builddir)/*.deb


distclean: distclean-src distclean-doc distclean-hdr \
    distclean-tags distclean-generic 
    -rm -f config.status
    -rm -rf  *.o core *.core .deps/ debian-build
    -rm -f md5sum* *.deb 
    -rm -rf $(distdir) $(distdir).tar.gz

distclean-src:
    cd $(top_builddir)/platon && $(MAKE) distclean

distclean-doc:
    cd $(top_builddir)/doc && $(MAKE) distclean

distclean-hdr:
    -rm -f config.h

distclean-tags:
    -rm -f TAGS ID

distclean-generic:
    -rm -f Makefile $(CONFIG_CLEAN_FILES)
    -rm -f config.cache config.log stamp-h stamp-h[0-9]*

# }}} Section clean

# PHONY {{{
.PHONY: distclean-hdr clean-hdr \
install uninstall installdirs \
install-exec install-data \
install-man3 uninstall-man3 \
install-man  uninstall-man \
install-lib  uninstall-lib \
install-includeHEADERS uninstall-includeHEADERS \
tags \
distclean-tags clean-tags distdir info \
dvi check installcheck \
distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# }}} PHONY

.PHONY:    sources
sources:
    cd $(top_builddir)/platon && $(MAKE) $@

.PHONY: lclint
lclint:
    cd $(top_builddir)/platon && $(MAKE) $@

.PHONY: archive
archive: 
    @echo "This is $(PACKAGE)-$(VERSION)."
    @sleep 5
    @cvs -Q tag -F $(CVSTAG) .
    @rm -rf /tmp/$(PACKAGE)-$(VERSION) /tmp/$(PACKAGE)
    @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(PACKAGE) || :
    @mv /tmp/$(PACKAGE) /tmp/$(PACKAGE)-$(VERSION)
    @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh ; $(MAKE) depend; $(MAKE) distclean
    @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh --noconfigure
    @cd /tmp; tar czSpf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
    @rm -rf /tmp/$(PACKAGE)-$(VERSION)
    @cp /tmp/$(PACKAGE)-$(VERSION).tar.gz .
    @rm -f /tmp/$(PACKAGE)-$(VERSION).tar.gz 
    @echo " "
    @echo "The final archive is ./$(PACKAGE)-$(VERSION).tar.gz."

# Create RPM
# This target is for maintainers only!
rpm:    rpm-clean spec dist
    mkdir rpm
    rpmbuild -ba contrib/libcfg+.spec ;

spec: $(PACKAGE).spec

rpm-clean:
    rm -rf rpm

# Create Debian distribution package
# This target is for maintainers only!
deb:
    rm -rf debian-build
    mkdir debian-build && cd debian-build \
        && here=`pwd`/$(PACKAGE)_$(VERSION)_all \
        && ../$(top_srcdir)/configure \
                --prefix=$$here/usr \
                --exec-prefix=$$here/usr \
                --mandir=$$here/usr/share/man \
        && $(MAKE) install deb-copy \
        && mv DEBIAN/ $(PACKAGE)_$(VERSION)_all \
        && chmod 0755 $(PACKAGE)_$(VERSION)_all/DEBIAN \
        && dpkg-deb --build $(PACKAGE)_$(VERSION)_all \
        && mv $(PACKAGE)_$(VERSION)_all.deb ../ \
        && cd .. \
        && rm -rf debian-build
    -@banner="md5sum is: `md5sum $(PACKAGE)_$(VERSION)_all.deb |tee md5sum.$(PACKAGE)_$(VERSION)_all.deb`"; \
    dashes=`echo "$$banner" | sed s/./=/g`; \
    echo "$$dashes"; \
    echo "$$banner"; \
    echo "$$dashes"

.PHONY: deb deb-copy

deb-copy:
    mkdir -p ./DEBIAN
    cp $(top_srcdir)/contrib/debian/changelog ./DEBIAN
    cp $(top_srcdir)/contrib/debian/conffiles ./DEBIAN
    cp $(top_srcdir)/contrib/debian/copyright ./DEBIAN
    sed 's/@''PACKAGE''@/$(PACKAGE)/g; s/@''VERSION''@/$(VERSION)/g;' \
        $(top_srcdir)/contrib/debian/control.in > ./DEBIAN/control


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

# Help {{{
.PHONY: help
help:
    @echo
    @echo "Common targets:"
    @echo "---------------"
    @echo "make [all]          - builds sources, don't builds documentation"
    @echo "make help           - print this help"
    @echo "make install        - install all files to destination"
    @echo "make uninstall      - remove installed files"
    @echo "make clean          - remove builded files, don't remove documentation"
    @echo
    @echo "Targets for maintainers only:"
    @echo "-----------------------------"
    @echo "make dist           - create distribution package"
    @echo "make distcheck      - test package"
    @echo "make documentation  - build documentation"
    @echo "make distclean      - remove builded files (also documentation)"
    @echo
# }}}

# vim600: fdm=marker fdc=3


Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top