aboutsummaryrefslogtreecommitdiff
path: root/toxy/Makefile
blob: 4ae80d2d309508e1c60a31a2a167b5895ffac49c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
ROOT_DIR = ..
WIDPATH = $(ROOT_DIR)/test/toxy/setup.wid
WIQFILE = $(notdir $(WIDPATH:.wid=.wiq))
redefault: checkwiq $(WIQFILE) default
checkwiq:
	@if [ -f $(WIQFILE) ] && ! [ -s $(WIQFILE) ] ; then \
		echo ERROR: empty file $(WIQFILE)... removed ; \
		rm -f $(WIQFILE) ; fi
$(WIQFILE): $(WIDPATH)
	@echo transferring widget definitions from \"$<\" to \"$@\"
	@cat $< | sed \
-e '1i// Do not edit this file (edit \"$<\", and run \"make\").' \
-e '1i//' \
-e '1i\"puts stderr [concat loading built-in widget definitions]\\n\"' \
-e 's/\([\\\"]\)/\\\1/g' \
-e 's/^.*$$/\"&\\n\"/' > $@
	@if [ -f $(WIQFILE) ] && ! [ -s $(WIQFILE) ] ; then \
		echo ERROR: quoteinitializer failed... $(WIQFILE) removed ; \
		rm -f $(WIQFILE) ; fi
include $(ROOT_DIR)/Makefile.common