
#define wafeApp(app) 		                                @@\
psman(.,x/**/app)                                               @@\
InstallManPage(x/**/app,$(MANDIR))                              @@\
install:: 							@@\
	rm -f $(BINDIR)/x/**/app                                @@\
	$(LN) $(WAFEBIN) $(BINDIR)/x/**/app                     @@\

#define psman(dir,xapp)                                         @@\
man.ps::                                                        @@\
	tr2latex -p -m dir/xapp.man > xapp.texman               @@\
	latex xapp.texman                                       @@\
	dvips -f -t a4 xapp.dvi |  \                            @@\
		perl -pe 's/\\370/\/l/g' > ../../hardcopy/xapp.ps  @@\

#define psman1(dir,xapp)                                         @@\
man.ps::                                                        @@\
	tr2latex -p -m dir/xapp.man > xapp.texman               @@\
	latex xapp.texman                                       @@\
	dvips -f -t a4 xapp.dvi |  \                            @@\
		perl -pe 's/\\370/\/l/g' > ../hardcopy/xapp.ps  @@\

#define makeTeX(dir,name,ext)                                   @@\
man.ps::                                                        @@\
	latex dir/name.ext                                      @@\
	latex dir/name.ext                                      @@\
	dvips -f -t a4 name.dvi | \                             @@\
		perl -pe 's/\\370/\/l/g' > ../../hardcopy/name.ps  @@\

#define installWafeBitmaps(bitmaps) 		                @@\
install::                                                       @@\
	@for f in bitmaps; do \                                 @@\
		echo installing $$f in $(BITMAPDIR); \          @@\
		cp $$f $(BITMAPDIR); \                          @@\
	done                                                    @@\


#define installPerls(perls) 		                        @@\
install::                                                       @@\
	@for f in perls; do \                                   @@\
		echo installing $$f in $(PERLLIB); \            @@\
		cp $$f $(PERLLIB); \                            @@\
	done                                                    @@\


#define perlApp(app,opt) 		                        @@\
install::                                                       @@\
	sed -e '1s|^.*$$|#!$(PERLBIN) opt|' \                   @@\
		-e 's|/usr/lib/X11/wafe|$(WAFELIB)|' < app > $(BINDIR)/app @@\
	chmod 755 $(BINDIR)/app                                 @@\
wafeApp(app)                                                    @@\


#define oraperlApp(app,opt) 		                        @@\
install::                                                       @@\
	sed -e '1s|^.*$$|#!$(ORAPERLBIN) opt|' \                @@\
		-e 's|/usr/lib/X11/wafe|$(WAFELIB)|' < app > $(BINDIR)/app @@\
	chmod 755 $(BINDIR)/app                                 @@\
wafeApp(app)                                                    @@\

#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'



