# 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. # Makefile for libcfg+ library. PACKAGE = @PACKAGE@ VERSION = @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 = lib$(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 NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : CC = @CC@ CPP = @CPP@ CXX = @CXX@ CFLAGS = -O2 -Wall -pedantic -I$(srcdir) -I$(top_builddir) LN_S = @LN_S@ MAKEINFO = @MAKEINFO@ RANLIB = @RANLIB@ STRIP = @STRIP@ AWK = @AWK@ TAR = tar GZIP_ENV = --best NROFF = nroff DEPEND = makedepend COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ # }}} Programs # Targets {{{ SOURCES = $(srcdir)/src/cfg+.c \ $(srcdir)/src/parse.c \ $(srcdir)/src/props.c \ $(srcdir)/src/cmdline.c \ $(srcdir)/src/cfgfile.c \ $(srcdir)/src/shared.c \ $(srcdir)/src/str/strplus.c \ $(srcdir)/src/str/strctype.c \ $(srcdir)/src/str/strdyn.c \ $(srcdir)/src/str/dynfgets.c OBJECTS = $(srcdir)/src/cfg+.o \ $(srcdir)/src/parse.o \ $(srcdir)/src/props.o \ $(srcdir)/src/cmdline.o \ $(srcdir)/src/cfgfile.o \ $(srcdir)/src/shared.o \ $(srcdir)/src/str/strplus.o \ $(srcdir)/src/str/strctype.o \ $(srcdir)/src/str/strdyn.o \ $(srcdir)/src/str/dynfgets.o DEP_FILES = $(srcdir)/src/.deps/cfg+.P \ $(srcdir)/src/.deps/parse.P \ $(srcdir)/src/.deps/props.P \ $(srcdir)/src/.deps/cmdline.P \ $(srcdir)/src/.deps/cfgfile.P \ $(srcdir)/src/.deps/shared.P CONFIG_HEADER = $(top_srcdir)/config.h include_HEADERS = src/cfg+.h noinst_HEADERS = src/cfgfile.h \ src/cmdline.h \ src/props.h \ src/shared.h \ src/str/dynfgets.h \ src/str/strconv.h \ src/str/strctype.h \ src/str/strdyn.h \ src/str/strplus.h noinst_SCRIPTS = compile_test.sh LIBSTATIC = lib$(PACKAGE).a LIBDYNAMIC = lib$(PACKAGE).so LIBDYNAMICV = lib$(PACKAGE)-$(VERSION).so install_LIB = $(LIBSTATIC) $(LIBDYNAMICV) man_MANS = man3_MANS = MANS = $(man_MANS) $(man3_MANS) CONFIG_CLEAN_FILES = Doxyfile SCRIPTS = $(noinst_SCRIPTS) HEADERS = $(include_HEADERS) $(noinst_HEADERS) $(CONFIG_HEADER) DISTFILES = AUTHOR COPYING TODO \ Doxyfile.in Makefile.in config.h.in configure.in \ config.guess config.sub configure \ install-sh missing mkinstalldirs rebuild \ src/ \ src/Makefile.in \ src/cfg+.c src/cfgfile.c src/cmdline.c src/parse.c src/props.c src/shared.c \ src/str \ src/str/strplus.c \ src/str/strctype.c \ src/str/strdyn.c \ src/str/dynfgets.c \ $(include_HEADERS) $(noinst_HEADERS) \ doc/ \ doc/Makefile.in \ doc/libcfg+.sgml # }}} Targets CVSTAG = $(PACKAGE)-$(subst .,_,$(VERSION)) all: makefiles $(MANS) Doxyfile all-subdirs makefiles: $(top_builddir)/Makefile $(top_builddir)/src/Makefile all-subdirs: all-src all-doc all-src: cd $(top_builddir)/src && $(MAKE) all-doc: cd $(top_builddir)/doc && $(MAKE) DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) -include $(DEP_FILES) static: $(LIBSTATIC) dynamic: $(LIBDYNAMICV) lib: $(LIBSTATIC) $(LIBDYNAMICV) $(LIBSTATIC): $(OBJECTS) $(AR) r $@ $(OBJECTS) $(LIBDYNAMICV): $(OBJECTS) $(LD) $(LDFLAGS) -shared -o $@ $(OBJECTS) .SUFFIXES: $(top_builddir)/Makefile: $(top_builddir)/Makefile.in $(top_builddir)/config.status $(SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(top_builddir)/src/Makefile: $(top_builddir)/src/Makefile.in $(top_builddir)/config.status $(SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(top_builddir)/config.status: $(top_builddir)/configure.in $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(srcdir)/config.h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null $(top_builddir)/Doxyfile: $(top_builddir)/config.status $(top_builddir)/Doxyfile.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: clean-str: cd $(top_srcdir)/src/str && $(MAKE) clean test: cd $(top_builddir)/src && $(MAKE) $@ # Section: Install {{{ install: all cd $(top_builddir)/src && $(MAKE) $@ uninstall: cd $(top_builddir)/src && $(MAKE) $@ installcheck: cd $(top_builddir)/src && $(MAKE) $@ install-exec: cd $(top_builddir)/src && $(MAKE) $@ uninstall-exec: cd $(top_builddir)/src && $(MAKE) $@ install-lib: cd $(top_builddir)/src && $(MAKE) $@ uninstall-lib: cd $(top_builddir)/src && $(MAKE) $@ install-data: cd $(top_builddir)/src && $(MAKE) $@ install-strip: cd $(top_builddir)/src && $(MAKE) $@ installdirs: cd $(top_builddir)/src && $(MAKE) $@ install-man3: cd $(top_builddir)/src && $(MAKE) $@ uninstall-man3: cd $(top_builddir)/src && $(MAKE) $@ install-man: $(MANS) cd $(top_builddir)/src && $(MAKE) $@ uninstall-man: cd $(top_builddir)/src && $(MAKE) $@ install-includeHEADERS: $(include_HEADERS) cd $(top_builddir)/src && $(MAKE) $@ uninstall-includeHEADERS: cd $(top_builddir)/src && $(MAKE) $@ install-symlinks: cd $(top_builddir)/src && $(MAKE) $@ uninstall-symlinks: cd $(top_builddir)/src && $(MAKE) $@ # }}} Section: Install # Section: TAGS {{{ tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: # }}} 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) \ && $(MAKE) dvi \ && $(MAKE) check \ && $(MAKE) install \ && $(MAKE) installcheck \ && $(MAKE) 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) -rm -rf $(distdir) 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 distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* distclean: distclean-hdr distclean-tags distclean-generic clean -rm -f config.status # }}} Section: distribution info: dvi: check: all mostlyclean-generic: clean-generic: maintainer-clean-generic: mostlyclean: mostlyclean-hdr mostlyclean-tags mostlyclean-generic clean: clean-str clean-hdr clean-tags clean-generic mostlyclean clean-lib -cd src/ && \ rm -rf *.o core *.core .deps/ clean-lib: -rm -f $(LIBSTATIC) $(LIBDYNAMIC) $(LIBDYNAMICV) maintainer-clean: maintainer-clean-hdr maintainer-clean-tags \ maintainer-clean-generic distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." -rm -f config.status -rm -f $(PACKAGE)-*.tar.gz # PHONY {{{ .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-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 mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info \ dvi check installcheck \ mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # }}} PHONY .PHONY: sources sources: @echo $(SOURCES:%=cfg/%) .PHONY: lclint lclint: lclint ${DEFS} ${INCLUDES} ${SOURCES} .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." .PHONY: doxygen doxygen: Doxyfile rm -rf doxygen mkdir -p doxygen doxygen # 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: # vim600: fdm=marker fdc=3