| version 1.70, 2002/10/04 20:40:20 |
version 1.71, 2002/10/07 14:41:14 |
|
|
| # PARTICULAR PURPOSE. |
# PARTICULAR PURPOSE. |
| |
|
| # Main Makefile for libcfg+ library. |
# Main Makefile for libcfg+ library. |
| # $Platon: $ |
# $Platon: libcfg+/Makefile.in,v 1.70 2002/10/04 20:40:20 rajo Exp $ |
| |
|
| PACKAGE = @PACKAGE@ |
PACKAGE = @PACKAGE@ |
| VERSION = @VERSION@ |
VERSION = @VERSION@ |
| |
MANVOLNUM = @MANVOLNUM@ |
| |
|
| CVSTAG = $(PACKAGE)-$(subst .,_,$(VERSION)) |
|
| |
|
| SHELL = @SHELL@ |
|
| |
|
| # Directories {{{ |
# Directories {{{ |
| top_builddir = . |
top_builddir = . |
| Line 52 top_distdir = $(distdir) |
|
| Line 50 top_distdir = $(distdir) |
|
| |
|
| # }}} Directories |
# }}} 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 {{{ |
# Targets {{{ |
| |
|
| CONFIG_HEADER = $(top_builddir)/config.h |
CONFIG_HEADER = $(top_builddir)/config.h |
| Line 132 SCRIPTS = $(noinst_SCRIPTS) |
|
| Line 79 SCRIPTS = $(noinst_SCRIPTS) |
|
| HEADERS = $(include_HEADERS) $(noinst_HEADERS) $(CONFIG_HEADER) |
HEADERS = $(include_HEADERS) $(noinst_HEADERS) $(CONFIG_HEADER) |
| |
|
| DISTFILES = AUTHORS COPYING README INSTALL TODO \ |
DISTFILES = AUTHORS COPYING README INSTALL TODO \ |
| Makefile.in configure.in \ |
Makefile.in Rules.make.in configure.in \ |
| config.h.in config.h.top config.h.bot \ |
config.h.in config.h.top config.h.bot \ |
| config.guess config.sub configure \ |
config.guess config.sub configure \ |
| install-sh mkinstalldirs rebuild \ |
install-sh mkinstalldirs rebuild \ |
| Line 166 DISTFILES = AUTHORS COPYING README INSTA |
|
| Line 113 DISTFILES = AUTHORS COPYING README INSTA |
|
| |
|
| all: configure-scripts makefiles $(MANS) all-subdirs |
all: configure-scripts makefiles $(MANS) all-subdirs |
| |
|
| |
include $(top_builddir)/Rules.make |
| |
|
| all-subdirs: all-src |
all-subdirs: all-src |
| |
|
| all-src: |
all-src: |
| cd $(top_builddir)/src && $(MAKE) |
cd $(top_builddir)/src && $(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: |
static: |
| cd $(top_builddir)/src && $(MAKE) $@ |
cd $(top_builddir)/src && $(MAKE) $@ |
|
|
| |
|
| .SUFFIXES: |
.SUFFIXES: |
| |
|
| # Makefiles, configure scripts dependencies {{{ |
|
| |
|
| makefiles: \ |
|
| $(top_builddir)/Makefile \ |
|
| $(top_builddir)/src/Makefile \ |
|
| $(top_builddir)/doc/Makefile \ |
|
| $(top_builddir)/doc/Doxyfile \ |
|
| $(top_builddir)/doc/sgml/defs.sgml \ |
|
| $(top_builddir)/doc/man/libcfg+.man |
|
| configure-scripts: $(top_builddir)/config.status \ |
|
| $(top_srcdir)/configure \ |
|
| $(top_builddir)/config.h \ |
|
| $(top_srcdir)/config.h.in |
|
| |
|
| |
|
| $(top_builddir)/%/Makefile: $(top_srcdir)/%/Makefile.in $(top_builddir)/config.status |
|
| @cd $(top_builddir) \ |
|
| && CONFIG_FILES=`echo "$@" | sed 's%^$(top_builddir)/%%g;'` CONFIG_HEADERS= \ |
|
| $(SHELL) ./config.status |
|
| |
|
| $(top_builddir)/doc/Doxyfile: $(top_srcdir)/doc/Doxyfile.in $(top_builddir)/config.status |
|
| @cd $(top_builddir) \ |
|
| && CONFIG_FILES=doc/Doxyfile CONFIG_HEADERS= \ |
|
| $(SHELL) ./config.status |
|
| |
|
| $(top_builddir)/doc/sgml/defs.sgml: $(top_srcdir)/doc/sgml/defs.sgml.in $(top_builddir)/config.status |
|
| @cd $(top_builddir) \ |
|
| && CONFIG_FILES=doc/sgml/defs.sgml CONFIG_HEADERS= \ |
|
| $(SHELL) ./config.status |
|
| |
|
| $(top_builddir)/doc/man/libcfg+.man: $(top_srcdir)/doc/man/libcfg+.man.in $(top_builddir)/config.status |
|
| @cd $(top_builddir) \ |
|
| && CONFIG_FILES=doc/man/libcfg+.man CONFIG_HEADERS= \ |
|
| $(SHELL) ./config.status |
|
| |
|
| $(top_builddir)/contrib/$(PACKAGE).spec: $(top_srcdir)/contrib/$(PACKAGE).spec.in $(top_builddir)/config.status |
|
| @cd $(top_builddir) \ |
|
| && sed 's/@''PACKAGE''@/$(PACKAGE)/g; s/@''VERSION''@/$(VERSION)/g;' $< > $@ |
|
| |
|
| $(top_builddir)/config.status: $(top_srcdir)/configure.in |
|
| @cd $(top_builddir) \ |
|
| && $(SHELL) ./config.status --recheck |
|
| |
|
| $(top_srcdir)/configure: $(top_srcdir)/configure.in |
|
| @here=`pwd`; \ |
|
| cd $(top_builddir) \ |
|
| $(SHELL) ./config.status --recheck \ |
|
| && cd $$here && cd $(top_srcdir) \ |
|
| && $(AUTOCONF) |
|
| |
|
| $(top_builddir)/config.h: $(top_srcdir)/config.h.in \ |
|
| $(top_srcdir)/config.h.top \ |
|
| $(top_srcdir)/config.h.bot \ |
|
| $(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: |
test: |
| @$(MAKE) dist \ |
@$(MAKE) dist \ |
| && tar xzf $(distdir).tar.gz \ |
&& tar xzf $(distdir).tar.gz \ |
| Line 324 uninstall-includeHEADERS: |
|
| Line 198 uninstall-includeHEADERS: |
|
| |
|
| # }}} Section: Install |
# }}} Section: Install |
| |
|
| # Section: TAGS {{{ |
|
| tags: TAGS |
|
| |
|
| ID: |
|
| cd $(top_builddir)/src && $(MAKE) $@ |
|
| TAGS: |
|
| cd $(top_builddir)/src && $(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 {{{ |
# Section clean {{{ |
| |
|
| clean: clean-src clean-hdr |
clean: clean-src clean-hdr |
| Line 483 distclean-generic: |
|
| Line 266 distclean-generic: |
|
| |
|
| # }}} Section clean |
# }}} Section clean |
| |
|
| # PHONY {{{ |
# Create packages *.rpm *.deb {{{ |
| .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)/src && $(MAKE) $@ |
|
| |
|
| .PHONY: lclint |
|
| lclint: |
|
| cd $(top_builddir)/src && $(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 |
spec: $(PACKAGE).spec |
| |
|
| rpm-clean: |
rpm-clean: |
|
|
| sed 's/@''PACKAGE''@/$(PACKAGE)/g; s/@''VERSION''@/$(VERSION)/g;' \ |
sed 's/@''PACKAGE''@/$(PACKAGE)/g; s/@''VERSION''@/$(VERSION)/g;' \ |
| $(top_srcdir)/contrib/debian/control.in > ./DEBIAN/control |
$(top_srcdir)/contrib/debian/control.in > ./DEBIAN/control |
| |
|
| |
# }}} |
| |
|
| # Tell versions [3.59,3.63) of GNU make to not export all variables. |
# 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. |
# Otherwise a system limit (for SysV at least) may be exceeded. |
| .NOEXPORT: |
.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 |
# vim600: fdm=marker fdc=3 |
| |
|