From: William D. <wdo...@us...> - 2005-02-15 19:34:58
|
Update of /cvsroot/flexml/flexml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29487 Modified Files: Makefile Log Message: Extract common defs to Makefile.defs; install flexml to version-specific location; general cleanup Index: Makefile =================================================================== RCS file: /cvsroot/flexml/flexml/Makefile,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- Makefile 10 Feb 2005 12:16:05 -0000 1.31 +++ Makefile 15 Feb 2005 19:34:24 -0000 1.32 @@ -22,79 +22,46 @@ # FILES. -VER = 1.2 +include Makefile.defs -STUFF = GPL Makefile flexml.pl FleXML.html -BINS = flexml -LIBS = flexml-act -DATA = skel -MANS = flexml.1 -DOCS = README NOTES TODO flexml-act.dtd EnlargeFlex.patch +STUFF = GPL Makefile Makefile.defs flexml.pl FleXML.html +BINS = flexml-$(VER) +LIBS = flexml-act-$(VER) +DATA = skel +MANS = flexml.1 +DOCS = README NOTES TODO flexml-act.dtd EnlargeFlex.patch HTMLS = FleXML.html -# index.html flexml.html paper.html -SAMPS = -#SAMPS = my.dtd my-show.act my-joke.xml my-joke2.xml my-joke3.xml \ -# tricky.dtd tricky.act tricky.xml \ -# test.html - -SRC = $(STUFF) $(DATA) $(DOCS) $(HTMLS) $(SAMPS) -ALL = $(PROGS) $(LIBS) $(DATA) $(MANS) $(DOCS) $(HTMLS) $(SAMPS) - -# SETUP. - -# Installation paths -USR = /usr -BINDIR = $(USR)/bin -LIBDIR = $(USR)/lib -SHARE = /usr/share -MAN1DIR = $(SHARE)/man/man1 -DOCDIR = $(SHARE)/doc -DATADIR = $(SHARE)/flexml -TMPDIR = /var/tmp - -# Permanent program locations -PERL = /usr/bin/perl -POD2MAN = /usr/bin/pod2man -POD2HTML =/usr/bin/pod2html -FLEX = /usr/bin/flex -FLEXML = $(BINDIR)/flexml -ACT = $(LIBDIR)/flexml-act -SKEL = $(DATADIR)/skel - -# Build compilation setup. -CC = gcc -Wall -ansi -pedantic -CFLAGS = -O2 -g -#FLEXDEBUG = -d -# Web location. +SRC = $(STUFF) $(DATA) $(DOCS) $(HTMLS) +ALL = $(PROGS) $(LIBS) $(DATA) $(MANS) $(DOCS) $(HTMLS) -WEBHOME = info:public_html -FTPHOME = info:public_html/ftp/FleXML +.PHONY: all install dist test clean # PRIMARY TARGETS. -.PHONY: all install dist test clean - all: $(ALL) install: $(ALL) mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) \ $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(DOCDIR) \ $(DESTDIR)$(DATADIR) \ - $(DESTDIR)$(DOCDIR)/flexml/html \ - $(DESTDIR)$(DOCDIR)/flexml/examples + $(DESTDIR)$(DOCDIR)/html \ + $(DESTDIR)$(DOCDIR)/examples install -m555 $(BINS) $(DESTDIR)$(BINDIR)/ install -m555 $(LIBS) $(DESTDIR)$(LIBDIR)/ install -m444 $(DATA) $(DESTDIR)$(DATADIR)/ install -m444 $(MANS) $(DESTDIR)$(MAN1DIR)/ - install -m444 $(DOCS) $(DESTDIR)$(DOCDIR)/flexml/ - install -m444 $(HTMLS) $(DESTDIR)$(DOCDIR)/flexml/html/ + install -m444 $(DOCS) $(DESTDIR)$(DOCDIR)/ + install -m444 $(HTMLS) $(DESTDIR)$(DOCDIR)/html/ + rm -f $(DESTDIR)$(BINDIR)/flexml + ln -s $(DESTDIR)$(BINDIR)/flexml-$(VER) $(DESTDIR)$(BINDIR)/flexml make -C examples install dist: clean @echo "Building distribution..." mkdir flexml-$(VER)/ - cp $(STUFF) $(DATA) $(DOCS) $(HTMLS) $(SAMPS) flexml-act-bootstrap.c flexml-$(VER)/ + cp $(STUFF) $(DATA) $(DOCS) $(HTMLS) flexml-act-bootstrap.c \ + flexml-$(VER)/ cp -r examples flexml-$(VER)/ find flexml-$(VER) -name CVS | xargs rm -rf find flexml-$(VER) -name .cvsignore | xargs rm -rf @@ -105,7 +72,7 @@ #rsync -va --cvs-exclude --delete-excluded ./ $(FTPHOME)/ clean::; @echo "Cleaning..." - $(RM) -rf flexml-$(VER)/ + $(RM) -rf flexml-$(VER).tar.gz flexml-$(VER)/ $(RM) *.[olh1] *-dummy.? lex.* *~ ./#* find -name '*~' | xargs $(RM) test:: all @@ -134,19 +101,22 @@ # MAIN PROGRAM. -clean::; $(RM) flexml flexml-act flexml-act.c +clean::; $(RM) flexml-$(VER) flexml-act-$(VER) flexml-act flexml-act.c -flexml: flexml.pl +flexml-$(VER): flexml.pl sed \ -e "s;[.][/]flexml-act;$(ACT);g" \ -e "s;[.][/]skel;$(SKEL);g" \ -e "s;/var/tmp;$(TMPDIR);g" \ - -e "s;/usr/share/doc/;$(DOCDIR)/;g" flexml.pl >flexml - chmod +x flexml + -e "s;/usr/share/doc/;$(DOCDIR)/;g" flexml.pl > $@ + chmod +x $@ + +flexml-act-$(VER): flexml-act + cp flexml-act $@ # Action language... flexml-act.l: flexml-act.dtd - ./flexml.pl $(FLEXDEBUG) -Lv -ractions -s skel $< + $(PERL) ./flexml.pl $(FLEXDEBUG) -Lv -ractions -s skel $< flexml-act.c: flexml-act.l $(FLEX) -B -s -v -oflexml-act.c flexml-act.l @@ -163,14 +133,14 @@ clean::; $(RM) flexml.html index.html pod2html-* -flexml.1: flexml - $(POD2MAN) flexml >flexml.1 +flexml.1: flexml-$(VER) + $(POD2MAN) flexml-$(VER) > $@ -flexml.html: flexml - $(POD2HTML) <flexml >flexml.html +flexml.html: flexml-$(VER) + $(POD2HTML) < flexml-$(VER) > $@ index.html: FleXML.html - sed 's.ftp/FleXML/..g' FleXML.html >index.html + sed 's.ftp/FleXML/..g' FleXML.html > $@ # TESTS. |