Add obtheme/ to the build system
authorDana Jansens <danakj@orodu.net>
Fri, 21 May 2010 18:43:12 +0000 (14:43 -0400)
committerDana Jansens <danakj@orodu.net>
Sat, 26 Jun 2010 23:30:45 +0000 (01:30 +0200)
Had to rename the .y file so it didn't clash
Added a Makefile stub in the directory to run the top level Makefile

.gitignore
Makefile.am
README.GIT
configure.ac
obtheme/.gitignore [deleted file]
obtheme/Makefile [new file with mode: 0644]
obtheme/lexer.l [moved from obtheme/obtheme.l with 100% similarity]
obtheme/parser.y [moved from obtheme/obtheme.y with 100% similarity]

index dfbbd4f0717be77c3e2e22a3a00bf06c33a0e9fa..428210a59b3ced84f7445df560f32ee634e8b5c5 100644 (file)
@@ -101,3 +101,7 @@ tests/usertimewin
 data/autostart/openbox-autostart
 data/autostart/autostart
 obrender/rendertest
+ylwrap
+obtheme/parser.c
+obtheme/parser.h
+obtheme/lexer.c
index 765ffaa9cb2897a9fa9ba5034d980a15a3ef8a03..c16d754b0cea3506bc8a9354cdbb7876c78a553c 100644 (file)
@@ -1,32 +1,39 @@
 SUBDIRS = m4 po
 
-docxbmdir       = $(docdir)/xbm
-themedir        = $(datadir)/themes
-localedir       = $(datadir)/locale
-configdir       = $(sysconfdir)/xdg
-rcdir           = $(configdir)/openbox
-xsessionsdir    = $(datadir)/xsessions
-gnomewmfilesdir = $(datadir)/gnome/wm-properties
-pkgconfigdir    = $(libdir)/pkgconfig
-obtpubincludedir= $(includedir)/openbox/@OBT_VERSION@/obt
-rrpubincludedir = $(includedir)/openbox/@RR_VERSION@/obrender
-pixmapdir       = $(datadir)/pixmaps
-xsddir          = $(datadir)/openbox
-appsdir         = $(datadir)/applications
+docxbmdir            = $(docdir)/xbm
+themedir             = $(datadir)/themes
+localedir            = $(datadir)/locale
+configdir            = $(sysconfdir)/xdg
+rcdir                = $(configdir)/openbox
+xsessionsdir         = $(datadir)/xsessions
+gnomewmfilesdir      = $(datadir)/gnome/wm-properties
+pkgconfigdir         = $(libdir)/pkgconfig
+obtpubincludedir     = $(includedir)/openbox/@OBT_VERSION@/obt
+obthemepubincludedir = $(includedir)/openbox/@OBTHEME_VERSION@/obrender
+rrpubincludedir      = $(includedir)/openbox/@RR_VERSION@/obrender
+pixmapdir            = $(datadir)/pixmaps
+xsddir               = $(datadir)/openbox
+appsdir              = $(datadir)/applications
 
 theme = Clearlooks
+default_theme = Bomb
 
 AUTOMAKE_OPTIONS = subdir-objects foreign
 
 ACLOCAL_AMFLAGS = -I m4
+AM_YFLAGS = -d
 
 INCLUDES = -I.
 
 check_PROGRAMS = \
        obrender/rendertest
 
+noinst_PROGRAMS = \
+       obtheme/main
+
 lib_LTLIBRARIES = \
        obt/libobt.la \
+       obtheme/libobtheme.la \
        obrender/libobrender.la
 
 bin_PROGRAMS = \
@@ -48,6 +55,42 @@ dist_libexec_SCRIPTS = \
        data/autostart/openbox-xdg-autostart \
        data/autostart/openbox-autostart
 
+# generated stuff
+BUILT_SOURCES=obtheme/parser.h
+
+## obtheme ##
+
+obtheme_main_CPPFLAGS = \
+       $(PANGO_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       -DG_LOG_DOMAIN=\"ObTheme-Tester\"
+obtheme_main_LDADD = \
+       obtheme/libobtheme.la \
+       $(GLIB_LIBS) \
+       -lm
+obtheme_main_SOURCES = obtheme/main.c
+
+obtheme_libobtheme_la_CPPFLAGS = \
+       $(X_CFLAGS) \
+       $(GLIB_CFLAGS) \
+       $(PANGO_CFLAGS) \
+       $(IMLIB2_CFLAGS) \
+       -DG_LOG_DOMAIN=\"ObTheme\" \
+       -DDEFAULT_THEME=\"$(default_theme)\"
+obtheme_libobtheme_la_LDFLAGS = \
+       -version-info $(OBTHEME_CURRENT):$(OBTHEME_REVISION):$(OBTHEME_AGE)
+obtheme_libobtheme_la_LIBADD = \
+       $(X_LIBS) \
+       $(PANGO_LIBS) \
+       $(GLIB_LIBS) \
+       $(IMLIB2_LIBS) \
+       obt/libobt.la
+obtheme_libobtheme_la_SOURCES = \
+       gettext.h \
+       obtheme/obtheme.h \
+       obtheme/obtheme.c \
+       obtheme/lexer.l \
+       obtheme/parser.y
 
 ## obrender ##
 
@@ -175,6 +218,7 @@ openbox_openbox_LDADD = \
        $(EFENCE_LIBS) \
        $(LIBINTL) \
        obrender/libobrender.la \
+       obtheme/libobtheme.la \
        obt/libobt.la
 openbox_openbox_LDFLAGS = -export-dynamic
 openbox_openbox_SOURCES = \
@@ -420,6 +464,9 @@ dist_syscrash_theme_DATA= \
 
 ## public headers ##
 
+obthemepubinclude_HEADERS = \
+       obtheme/obtheme.h
+
 rrpubinclude_HEADERS = \
        obrender/color.h \
        obrender/font.h \
index b4b05576a0e01eda275ff22cfbd154008c5f971d..038000a5f8c649012f54f4538b752b99bdead0a5 100644 (file)
@@ -11,6 +11,8 @@ Glib 2.0+ library/headers (devel package) (http://www.gtk.org)
 libxml2 2.0+ library/headers (devel package)
 Pango 1.10+ library/headers (devel package)
 cvs
+flex
+bison
 
 Optionally you may want:
 X Cursor library/headers (devel package)
index 4259cda1c3d89ce8416e5d710301fe18ca3b4ff3..2d3fa7d38abbcb56e971b27183571b01f25d820d 100644 (file)
@@ -23,6 +23,13 @@ RR_INTERFACE_AGE=0
 RR_BINARY_AGE=0
 RR_VERSION=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
 
+OBTHEME_MAJOR_VERSION=1
+OBTHEME_MINOR_VERSION=0
+OBTHEME_MICRO_VERSION=0
+OBTHEME_INTERFACE_AGE=0
+OBTHEME_BINARY_AGE=0
+OBTHEME_VERSION=$OBTHEME_MAJOR_VERSION.$OBTHEME_MINOR_VERSION
+
 OBT_MAJOR_VERSION=3
 OBT_MINOR_VERSION=5
 OBT_MICRO_VERSION=0
@@ -36,6 +43,12 @@ AC_SUBST(RR_MICRO_VERSION)
 AC_SUBST(RR_INTERFACE_AGE)
 AC_SUBST(RR_BINARY_AGE)
 AC_SUBST(RR_VERSION)
+AC_SUBST(OBTHEME_MAJOR_VERSION)
+AC_SUBST(OBTHEME_MINOR_VERSION)
+AC_SUBST(OBTHEME_MICRO_VERSION)
+AC_SUBST(OBTHEME_INTERFACE_AGE)
+AC_SUBST(OBTHEME_BINARY_AGE)
+AC_SUBST(OBTHEME_VERSION)
 AC_SUBST(OBT_MAJOR_VERSION)
 AC_SUBST(OBT_MINOR_VERSION)
 AC_SUBST(OBT_MICRO_VERSION)
@@ -50,6 +63,12 @@ RR_REVISION=$RR_INTERFACE_AGE
 RR_AGE=`expr $RR_BINARY_AGE - $RR_INTERFACE_AGE`
 RR_CURRENT_MINUS_AGE=`expr $RR_CURRENT - $RR_AGE`
 
+OBTHEME_RELEASE=$OBTHEME_MAJOR_VERSION.$OBTHEME_MINOR_VERSION
+OBTHEME_CURRENT=`expr $OBTHEME_MICRO_VERSION - $OBTHEME_INTERFACE_AGE`
+OBTHEME_REVISION=$OBTHEME_INTERFACE_AGE
+OBTHEME_AGE=`expr $OBTHEME_BINARY_AGE - $OBTHEME_INTERFACE_AGE`
+OBTHEME_CURRENT_MINUS_AGE=`expr $OBTHEME_CURRENT - $OBTHEME_AGE`
+
 OBT_RELEASE=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
 OBT_CURRENT=`expr $OBT_MICRO_VERSION - $OBT_INTERFACE_AGE`
 OBT_REVISION=$OBT_INTERFACE_AGE
@@ -61,6 +80,11 @@ AC_SUBST(RR_CURRENT)
 AC_SUBST(RR_REVISION)
 AC_SUBST(RR_AGE)
 AC_SUBST(RR_CURRENT_MINUS_AGE)
+AC_SUBST(OBTHEME_RELEASE)
+AC_SUBST(OBTHEME_CURRENT)
+AC_SUBST(OBTHEME_REVISION)
+AC_SUBST(OBTHEME_AGE)
+AC_SUBST(OBTHEME_CURRENT_MINUS_AGE)
 AC_SUBST(OBT_RELEASE)
 AC_SUBST(OBT_CURRENT)
 AC_SUBST(OBT_REVISION)
@@ -84,6 +108,9 @@ LIBTOOL="$LIBTOOL --silent"
 
 AC_PROG_INSTALL
 
+AM_PROG_LEX
+AC_PROG_YACC
+
 AM_GNU_GETTEXT_VERSION(0.15)
 AM_GNU_GETTEXT([external])
 
diff --git a/obtheme/.gitignore b/obtheme/.gitignore
deleted file mode 100644 (file)
index 75b5c16..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-*.o
-obtheme
-obtheme.lex.*
-obtheme.tab.*
diff --git a/obtheme/Makefile b/obtheme/Makefile
new file mode 100644 (file)
index 0000000..b90edac
--- /dev/null
@@ -0,0 +1,4 @@
+all clean install:
+       $(MAKE) -C .. -$(MAKEFLAGS) $@
+
+.PHONY: all clean install
similarity index 100%
rename from obtheme/obtheme.l
rename to obtheme/lexer.l
similarity index 100%
rename from obtheme/obtheme.y
rename to obtheme/parser.y