From f03e3a1487f7e33b2913e499a4c2f70e92a5c650 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 21 May 2010 14:43:12 -0400 Subject: [PATCH] Add obtheme/ to the build system 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 | 4 ++ Makefile.am | 73 +++++++++++++++++++++++++++------ README.GIT | 2 + configure.ac | 27 ++++++++++++ obtheme/.gitignore | 4 -- obtheme/Makefile | 4 ++ obtheme/{obtheme.l => lexer.l} | 0 obtheme/{obtheme.y => parser.y} | 0 8 files changed, 97 insertions(+), 17 deletions(-) delete mode 100644 obtheme/.gitignore create mode 100644 obtheme/Makefile rename obtheme/{obtheme.l => lexer.l} (100%) rename obtheme/{obtheme.y => parser.y} (100%) diff --git a/.gitignore b/.gitignore index dfbbd4f0..428210a5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Makefile.am b/Makefile.am index 765ffaa9..c16d754b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/README.GIT b/README.GIT index b4b05576..038000a5 100644 --- a/README.GIT +++ b/README.GIT @@ -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) diff --git a/configure.ac b/configure.ac index 4259cda1..2d3fa7d3 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 75b5c165..00000000 --- a/obtheme/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*.o -obtheme -obtheme.lex.* -obtheme.tab.* diff --git a/obtheme/Makefile b/obtheme/Makefile new file mode 100644 index 00000000..b90edacf --- /dev/null +++ b/obtheme/Makefile @@ -0,0 +1,4 @@ +all clean install: + $(MAKE) -C .. -$(MAKEFLAGS) $@ + +.PHONY: all clean install diff --git a/obtheme/obtheme.l b/obtheme/lexer.l similarity index 100% rename from obtheme/obtheme.l rename to obtheme/lexer.l diff --git a/obtheme/obtheme.y b/obtheme/parser.y similarity index 100% rename from obtheme/obtheme.y rename to obtheme/parser.y -- 2.34.1