Skip to content
Snippets Groups Projects
webstuff 1.22 KiB
Newer Older
  • Learn to ignore specific revisions
  • # -*- makefile -*-
    # $Id$
    
    ## rules to create HTML-pages from wml-files with additional magic to
    ## possibly use the layout of the Dune-homepage
    
    # if DUNEWEBDIR is set to the dune-web directory the layout and
    # install-stuff from that place will be used
    
    # CURDIR should be defined in the same way as in dune-web
    
    
    ####
    # how to run wml
    
    if DUNEWEB
    WMLCMD = cd $(DUNEWEBDIR) && @WML@ --nocd -DROOT=$(BASEDIR)
    else
    
    WMLCMD = cd $(DUNE_COMMON_ROOT)/doc && @WML@ --nocd
    
    ####
    # how to build html files
    
    Martin Nolte's avatar
    Martin Nolte committed
    	if test "`dirname $<`" == "."; then \
    	  input="$(abs_srcdir)/$<"; else \
    	  input="$<"; fi; \
    	$(WMLCMD) -I $(abs_srcdir) $$input -o $(abs_builddir)/$@
    
    ####
    # howto install into the webpage
    
    if DUNEWEB
    
    web-install-default: doc
    
    	if test -d $(DUNEWEBDIR) && test -r $(DUNEWEBDIR)/Make.global ; then \
    	  for DIR in $(SUBDIRS) ; do \
    
    Christian Engwer's avatar
    Christian Engwer committed
    	    $(MAKE) -C $$DIR web-install || exit 1; \
    
    	  done ; \
    	  $(MAKE) -f $(DUNEWEBDIR)/Make.global \
                EXTRAINSTALL="$(EXTRAINSTALL)" CURDIR="$(CURDIR)" install ; \
    	fi
    
    else
    web-install-default:
    
    ####
    # how to clean up
    
    web-build: $(PAGES)
    web-clean:
    
    	-test -z $(PAGES) || rm -f $(PAGES)
    
    doc-clean-local: web-clean
    web-install-local: web-install-default
    doc-local: web-build