about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorTodd T. Fries <todd@fries.net>2012-01-04 12:49:48 -0600
committerTodd T. Fries <todd@fries.net>2012-01-04 12:49:48 -0600
commit483a2500d9eaed399f8b82a877fcd642dc1b082c (patch)
treeb388fa876847eb5606dd652cc5da59a2fba07f14 /Makefile
parent3a9aa0d96d331722053de3f3e73a7b081c34f0e7 (diff)
downloadxombrero-483a2500d9eaed399f8b82a877fcd642dc1b082c.tar.gz
lets build javascript.h in the obj/ dir if present...
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index d7551bf..5d33918 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@ SRCS= cookie.c inspector.c marco.c about.c whitelist.c settings.c inputfocus.c
 SRCS+= history.c completion.c externaleditor.c xxxterm.c
 CFLAGS+= -O2 -Wall -Wno-format-extra-args -Wunused
 CFLAGS+= -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-sign-compare
+CFLAGS+= -I.
 DEBUG= -ggdb3
 LDADD= -lutil -lgcrypt
 LIBS+= gtk+-2.0
@@ -26,12 +27,19 @@ CPPFLAGS+= -DXXXTERM_BUILDSTR=\"$(BUILDVERSION)\"
 
 MANDIR= ${PREFIX}/man/man
 
-CLEANFILES += ${.CURDIR}/javascript.h xxxterm.cat1 xxxterm.core
+CLEANFILES += ${.CURDIR}/javascript.h javascript.h xxxterm.cat1 xxxterm.core
 
-${.CURDIR}/javascript.h: hinting.js input-focus.js autoscroll.js
-	perl ${.CURDIR}/js-merge-helper.pl ${.CURDIR}/hinting.js \
-	    ${.CURDIR}/input-focus.js ${.CURDIR}/autoscroll.js \
-	    > ${.CURDIR}/javascript.h
+JSFILES += hinting.js
+JSFILES += input-focus.js
+JSFILES += autoscroll.js
+
+.for _js in ${JSFILES}
+JSCURDIR += ${.CURDIR}/${_js}
+.endfor
+
+javascript.h: ${JSFILES} js-merge-helper.pl
+	perl ${.CURDIR}/js-merge-helper.pl \
+		${JSCURDIR} > javascript.h
 
 beforeinstall:
 	install -m 755 -d ${PREFIX}/share/xxxterm