Skip to content

Commit

Permalink
Use automake for www/ directory
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Sep 28, 2011
1 parent 75f2a10 commit d70d7ed
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 25 deletions.
5 changes: 4 additions & 1 deletion Makefile.am
@@ -1,5 +1,8 @@

SUBDIRS = www
SUBDIRS =
if BUILD_WWW
SUBDIRS += www
endif
if USE_NLS
SUBDIRS += po
endif
Expand Down
11 changes: 10 additions & 1 deletion configure.ac
Expand Up @@ -84,4 +84,13 @@ AC_CHECK_LIB(ssl, dtls1_stop_timer,
AC_DEFINE(HAVE_DTLS1_STOP_TIMER, [1], [OpenSSL has dtls1_stop_timer() function]),
,,${OPENSSL_LIBS})

AC_OUTPUT(Makefile openconnect.pc po/Makefile.in)
AC_PATH_PROG(PYTHON, [python], [], $PATH:/bin:/usr/bin)
if (test -n "${ac_cv_path_PYTHON}"); then
AC_SUBST(PYTHON, ${ac_cv_path_PYTHON})
else
AC_MSG_NOTICE([Python not found; not building HTML pages])
fi
AM_CONDITIONAL(BUILD_WWW, [test -n "${ac_cv_path_PYTHON}"])

AC_OUTPUT(Makefile openconnect.pc po/Makefile.in www/Makefile \
www/styles/Makefile www/inc/Makefile www/images/Makefile)
23 changes: 0 additions & 23 deletions www/Makefile

This file was deleted.

30 changes: 30 additions & 0 deletions www/Makefile.am
@@ -0,0 +1,30 @@
#

SUBDIRS = styles inc images
CONV = "./html.py"

FTR_PAGES = csd.html features.html gui.html nonroot.html
START_PAGES = building.html connecting.html manual.html started.html vpnc-script.html
INDEX_PAGES = changelog.html download.html index.html packages.html platforms.html
TOPLEVEL_PAGES = contribute.html mail.html technical.html

ALL_PAGES = $(FTR_PAGES) $(START_PAGES) $(INDEX_PAGES) $(TOPLEVEL_PAGES)

pkgdata_DATA = $(ALL_PAGES)

.xml.html:
$(PYTHON) $(CONV) -f $< || (rm $@; exit 1)

clean-local:
rm -f $(ALL_PAGES) openconnect.8.inc

$(ALL_PAGES): menu1.xml inc/*.tmpl
$(FTR_PAGES): menu2-features.xml
$(START_PAGES): menu2-started.xml
$(MAIN_PAGES): menu2.xml

manual.html: openconnect.8.inc
openconnect.8.inc: ../openconnect.8
groff -t -K UTF-8 -mandoc -Txhtml $^ | sed -e '1,/<body>/d' -e '/<\/body>/,$$d' > $@

EXTRA_DIST = $(patsubst %.html,%.xml,$(ALL_PAGES)) menu1.xml menu2*.xml html.py
3 changes: 3 additions & 0 deletions www/images/Makefile.am
@@ -0,0 +1,3 @@
imagesdir = $(pkgdatadir)/images
dist_images_DATA = *.png *.svg

3 changes: 3 additions & 0 deletions www/inc/Makefile.am
@@ -0,0 +1,3 @@
tmpldatadir = $(pkgdatadir)/inc
dist_tmpldata_DATA = *.tmpl

3 changes: 3 additions & 0 deletions www/styles/Makefile.am
@@ -0,0 +1,3 @@
stylesdatadir = $(pkgdatadir)/styles
dist_stylesdata_DATA = main.css

0 comments on commit d70d7ed

Please sign in to comment.