head 1.11; access; symbols FSL_1_7_0:1.11 CFG_0_9_11:1.11 FSL_1_6_1:1.9 CFG_0_9_10:1.9 FSL_1_6_0:1.9 FSL_1_6b2:1.9 CFG_0_9_9:1.9 FSL_1_6b1:1.9 CFG_0_9_8:1.9 CFG_0_9_7:1.8 CFG_0_9_6:1.8 CFG_0_9_5:1.7 CFG_0_9_4:1.6 FSL_1_5_0:1.5 FSL_1_5a3:1.5 CFG_0_9_3:1.5 FSL_1_5a2:1.5 FSL_1_5a1:1.5 FSL_1_4_0:1.5 FSL_1_4b1:1.5 CFG_0_9_2:1.5 CFG_0_9_1:1.5 FSL_1_4a1:1.5 FSL_1_3_0:1.5 FSL_1_3b1:1.5 FSL_1_2_1:1.5 FSL_1_2_0:1.5 FSL_1_1_0:1.5 FSL_1_1b1:1.5 FSL_1_0_8:1.5 FSL_1_0_7:1.5 FSL_1_0_6:1.4 FSL_1_0_5:1.4 FSL_1_0_4:1.4 FSL_1_0_3:1.4 FSL_1_0_2:1.4 FSL_1_0_1:1.2 FSL_1_0_0:1.2 FSL_0_9_0:1.2 CFG_0_9_0:1.2 FSL_0_1_12:1.2 FSL_0_1_11:1.2 FSL_0_1_10:1.2 FSL_0_1_9:1.2 FSL_0_1_8:1.2 FSL_0_1_7:1.2 FSL_0_1_6:1.2 FSL_0_1_5:1.2 FSL_0_1_1:1.2; locks; strict; comment @# @; 1.11 date 2006.08.10.19.35.56; author rse; state Exp; branches; next 1.10; commitid Isy241gp4yykKkIr; 1.10 date 2006.08.10.19.32.57; author rse; state Exp; branches; next 1.9; commitid KbosAzCq3U7jJkIr; 1.9 date 2004.12.31.19.16.24; author rse; state Exp; branches; next 1.8; 1.8 date 2004.11.29.07.35.52; author rse; state Exp; branches; next 1.7; 1.7 date 2004.11.27.19.56.24; author rse; state Exp; branches; next 1.6; 1.6 date 2004.07.17.07.37.55; author rse; state Exp; branches; next 1.5; 1.5 date 2003.01.06.11.17.42; author rse; state Exp; branches; next 1.4; 1.4 date 2002.08.02.19.18.00; author rse; state Exp; branches; next 1.3; 1.3 date 2002.08.02.19.07.12; author rse; state Exp; branches; next 1.2; 1.2 date 2002.07.10.12.00.23; author rse; state Exp; branches; next 1.1; 1.1 date 2002.07.09.08.29.19; author rse; state Exp; branches; next ; desc @@ 1.11 log @cleanup source tree for status as of 2006 @ text @## ## OSSP cfg - Configuration Parsing ## Copyright (c) 2002-2006 Ralf S. Engelschall ## Copyright (c) 2002-2006 The OSSP Project ## ## This file is part of OSSP cfg, a configuration parsing library which ## can be found at http://www.ossp.org/pkg/lib/cfg/. ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## ## Makefile.in: make(1) build procedure ## @@SET_MAKE@@ # installation paths DESTDIR = prefix = @@prefix@@ exec_prefix = @@exec_prefix@@ datarootdir = @@datarootdir@@ bindir = @@bindir@@ libdir = @@libdir@@ includedir = @@includedir@@ mandir = @@mandir@@ # build tools CC = @@CC@@ CPPFLAGS = @@CPPFLAGS@@ CFLAGS = @@DEFS@@ @@CFLAGS@@ LDFLAGS = @@LDFLAGS@@ LIBS = @@LIBS@@ RM = rm -f RMDIR = rmdir SHTOOL = ./shtool LIBTOOL = ./libtool TRUE = true POD2MAN = pod2man FLEX = @@FLEX@@ BISON = @@BISON@@ PERL = @@PERL@@ # build objects LIB_NAME = libcfg.la LIB_OBJS = cfg_main.lo cfg_buf.lo cfg_grid.lo cfg_data.lo cfg_node.lo cfg_fmt.lo \ cfg_syn.lo cfg_syn_parse.lo cfg_syn_scan.lo cfg_util.lo cfg_vers.lo TST_NAME = cfg_test TST_OBJS = cfg_test.o PERL_NAME = perl/blib/lib/OSSP/cfg.pm PERL_OBJS = perl/cfg.pm WITH_PERL = @@WITH_PERL@@ # recognized suffixes for implicit rules .SUFFIXES: .SUFFIXES: .c .o .lo # default target all: $(LIB_NAME) $(TST_NAME) @@PERL_NAME@@ # implicit rules for compilation .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c $< .c.lo: $(LIBTOOL) --quiet --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $< # explicit rule for library linking $(LIB_NAME): $(LIB_OBJS) $(LIBTOOL) --quiet --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \ -version-info `$(SHTOOL) version -l c -d libtool cfg_vers.c` # explicit rule for test program linking $(TST_NAME): $(TST_OBJS) $(LIB_NAME) $(LIBTOOL) --quiet --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS) # explicit rule for Perl API $(PERL_NAME): $(PERL_OBJS) $(LIB_NAME) @@cd perl && $(PERL) Makefile.PL PREFIX=$(prefix) && $(MAKE) $(MFLAGS) all @@touch $(PERL_NAME) # explicit rules for compiler construction tools cfg_syn.c: cfg_syn.h cfg_syn_parse.h cfg_syn_scan.o: cfg_syn_scan.c cfg_syn_parse.h cfg_syn_scan.c: cfg_syn_scan.l $(FLEX) -Pcfg_syn_ -s -8 -B -ocfg_syn_scan.c cfg_syn_scan.l cfg_syn_parse.c cfg_syn_parse.h: cfg_syn_parse.y $(BISON) -d -k -pcfg_syn_ -ocfg_syn_parse.c cfg_syn_parse.y # explicit rule for manual page construction man: cfg.3 cfg.3: cfg.pod V1=`$(SHTOOL) version -l c -d short cfg_vers.c`; \ V2=`$(SHTOOL) version -l c -d long cfg_vers.c`; \ D=`$(SHTOOL) version -l c -d long cfg_vers.c | sed -e 's;.*(;;' -e 's;).*;;'`; \ $(POD2MAN) --quotes=none \ --section=3 --center="Configuration Parsing" \ --release="$$D" --date="OSSP cfg $$V1" cfg.pod | \ sed -e "s;CFG_VERSION_STR;$$V2;" >cfg.3 # running the test suite test: check check: $(TST_NAME) @@$(SHTOOL) echo -e "%BParsing cfg_test.cfg:%b"; \ ./$(TST_NAME) cfg_test.cfg 2>&1 | tee cfg_test.try -@@diff -u3 cfg_test.out cfg_test.try >/dev/null 2>&1; \ if [ $$? -ne 0 ]; then \ $(SHTOOL) echo -e "%BATTENTION: Parsing Difference (cfg_test.cfg vs. cfg_test.out):%b"; \ diff -u3 cfg_test.out cfg_test.try; \ fi -@@if [ ".$(WITH_PERL)" = .yes ]; then \ (cd perl && $(MAKE) $(MFLAGS) test); \ fi check-setup: @@./$(TST_NAME) cfg_test.cfg >cfg_test.out # perform installation procedure install: $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(prefix) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(includedir) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3 $(SHTOOL) install -c -m 755 cfg-config $(DESTDIR)$(bindir)/ $(SHTOOL) install -c -m 644 cfg.h $(DESTDIR)$(includedir)/ $(SHTOOL) install -c -m 644 cfg.3 $(DESTDIR)$(mandir)/man3/ $(LIBTOOL) --quiet --mode=install $(SHTOOL) install -c -m 644 libcfg.la $(DESTDIR)$(libdir)/ -@@if [ ".$(WITH_PERL)" = .yes ]; then \ (cd perl && $(MAKE) $(MFLAGS) install); \ fi # perform uninstallation procedure uninstall: $(LIBTOOL) --quiet --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libcfg.la -$(RM) $(DESTDIR)$(mandir)/man3/cfg.3 -$(RM) $(DESTDIR)$(includedir)/cfg.h -$(RM) $(DESTDIR)$(bindir)/cfg-config -$(RMDIR) $(DESTDIR)$(mandir)/man3 >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(mandir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(libdir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE) -$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE) # perform build clean up procedure clean: -$(RM) $(LIB_NAME) $(LIB_OBJS) -$(RM) $(TST_NAME) $(TST_OBJS) -$(RM) cfg_test.try -$(RM) -r .libs >/dev/null 2>&1 || $(TRUE) -$(RM) *.o *.lo -@@if [ ".$(WITH_PERL)" = .yes ]; then \ (cd perl && $(MAKE) $(MFLAGS) clean); \ fi # perform distribution clean up procedure distclean: clean -$(RM) config.log config.status config.cache -$(RM) Makefile config.h cfg-config -$(RM) libtool -@@if [ ".$(WITH_PERL)" = .yes ]; then \ (cd perl && $(MAKE) $(MFLAGS) distclean || true; rm -f Makefile.old); \ fi # perform developer clean up procedure realclean: distclean -$(RM) cfg.3 -$(RM) configure config.h.in -$(RM) shtool -$(RM) ltmain.sh libtool.m4 config.guess config.sub -$(RM) cfg_syn_parse.c cfg_syn_parse.h -$(RM) cfg_syn_scan.c @ 1.10 log @bump before release @ text @d3 2 a4 3 ## Copyright (c) 2002-2005 Ralf S. Engelschall ## Copyright (c) 2002-2005 The OSSP Project ## Copyright (c) 2002-2005 Cable & Wireless @ 1.9 log @Adjust copyright messages for new year 2005. @ text @d37 1 @ 1.8 log @do not rebuild the Perl API every time if no changes were actually made @ text @d3 3 a5 3 ## Copyright (c) 2002-2004 Ralf S. Engelschall ## Copyright (c) 2002-2004 The OSSP Project ## Copyright (c) 2002-2004 Cable & Wireless @ 1.7 log @add Autoconf support for new Perl API @ text @d95 1 @ 1.6 log @Adjust copyright messages for new year 2004. @ text @d56 1 d65 5 d75 1 a75 1 all: $(LIB_NAME) $(TST_NAME) d92 4 d125 3 d142 3 d166 3 d175 3 @ 1.5 log @update copyright messages for new year @ text @d3 3 a5 3 ## Copyright (c) 2002-2003 Ralf S. Engelschall ## Copyright (c) 2002-2003 The OSSP Project ## Copyright (c) 2002-2003 Cable & Wireless Deutschland @ 1.4 log @Enhanced test suite by comparing against previously saved output @ text @d3 3 a5 3 ## Copyright (c) 2002 Ralf S. Engelschall ## Copyright (c) 2002 The OSSP Project ## Copyright (c) 2002 Cable & Wireless Deutschland @ 1.3 log @full source tree overhauling @ text @d108 9 a116 1 @@./$(TST_NAME) cfg_test.cfg d147 1 @ 1.2 log @Mega-change: full API overhauling. @ text @d33 1 d42 1 d57 1 d60 1 a60 2 cfg_syn.lo cfg_syn_parse.lo cfg_syn_scan.lo cfg_util.lo d64 1 d68 1 d71 1 a73 1 d75 1 a75 1 @@$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c $< d77 1 d79 2 a80 2 @@$(LIBTOOL) --mode=link $(CC) -o $(LIB_NAME) $(LIB_OBJS) -rpath $(libdir) \ -version-info `$(SHTOOL) version -l txt -d libtool VERSION` d82 1 d84 1 a84 1 @@$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $(TST_NAME) $(TST_OBJS) $(LIB_NAME) $(LIBS) d86 1 d94 1 d97 3 a99 3 V1=`$(SHTOOL) version -l txt -d short VERSION`; \ V2=`$(SHTOOL) version -l txt -d long VERSION`; \ D=`$(SHTOOL) version -l txt -d long VERSION | sed -e 's;.*(;;' -e 's;).*;;'`; \ d105 2 d108 1 a108 5 @@$(LIBTOOL) --mode=execute ./$(TST_NAME) test1: ./$(TST_NAME) sample.cfg test2: ./$(TST_NAME) sample2.cfg d110 1 d120 1 a120 1 @@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 libcfg.la $(DESTDIR)$(libdir)/ d122 1 d124 1 a124 1 @@$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/libcfg.la d135 1 d142 1 d148 1 @ 1.1 log @add standard OSSP autoconf/libtool/shtool environment @ text @d56 1 a56 1 LIB_OBJS = cfg_buf.lo cfg_grid.lo cfg_data.lo cfg_node.lo cfg_fmt.lo \ @