head     1.2;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.2
date     96.02.04.17.07.29;  author svalente;  state Exp;
branches ;
next     1.1;

1.1
date     96.01.04.21.24.16;  author svalente;  state Exp;
branches ;
next     ;


desc
@Imakefile
@


1.2
log
@Added stuff for installing in /usr/athena.  Made lex.c a source file.
@
text
@XCOMM $XConsortium: Imakefile,v 1.36 92/06/01 18:32:20 rws Exp $
XCOMM
XCOMM Here is an Imakefile for twm.  It depends on having TWMDIR defined
XCOMM in Imake.tmpl.  I like to use Imakefiles for everything, and I am sure
XCOMM other people do also, so perhaps you could do us all a favor and
XCOMM distribute this one.
XCOMM

XCOMM Hacked for Athena
BINDIR = /usr/athena/bin
TWMDIR = /usr/athena/lib/X11/twm
INSTALL = /afs/sipb/project/gnu/bin/ginstall

         YFLAGS = -d
        DEPLIBS = $(DEPXMULIB) $(DEPEXTENSIONLIB) $(DEPXLIB)
LOCAL_LIBRARIES = $(XMULIB) $(EXTENSIONLIB) $(XLIB)
       LINTLIBS = $(LINTXMU) $(LINTEXTENSIONLIB) $(LINTXLIB)
        DEFINES = $(SIGNAL_DEFINES)

           SRCS = gram.c lex.c deftwmrc.c add_window.c gc.c list.c twm.c \
		parse.c menus.c events.c resize.c util.c version.c iconmgr.c \
		cursor.c icons.c

           OBJS = gram.o lex.o deftwmrc.o add_window.o gc.o list.o twm.o \
		parse.o menus.o events.o resize.o util.o version.o iconmgr.o \
		cursor.o icons.o

AllTarget(twm)

SpecialCObjectRule(parse,$(_NOOP_),'-DSYSTEM_INIT_FILE="'$(TWMDIR)'/system.twmrc"')
#if !HasPutenv
SpecialCObjectRule(util,$(_NOOP_),-DNOPUTENV)
#endif

depend:: gram.c deftwmrc.c 

ComplexProgramTarget(twm)
InstallNonExecFile(system.twmrc,$(TWMDIR))

gram.h gram.c: gram.y
	$(YACC) $(YFLAGS) gram.y
	$(MV) y.tab.c gram.c
	$(MV) y.tab.h gram.h

XCOMM  "clean" modified to not erase "lex.c".  Some systems don't have lex,
XCOMM  so I've made lex.c a part of the source tree rather than a file that's
XCOMM  created at compile time.

clean::
	$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c deftwmrc.c 

deftwmrc.c:  system.twmrc
	$(RM) $@@
	echo '/* ' >>$@@
	echo ' * This file is generated automatically from the default' >>$@@
	echo ' * twm bindings file system.twmrc by the twm Imakefile.' >>$@@
	echo ' */' >>$@@
	echo '' >>$@@
	echo 'char *defTwmrc[] = {' >>$@@
	sed -e '/^#/d' -e 's/"/\\"/g' -e 's/^/    "/' -e 's/$$/",/' \
		system.twmrc >>$@@
	echo '    (char *) 0 };' >>$@@

@


1.1
log
@Initial revision
@
text
@d9 5
d35 1
a35 1
depend:: lex.c gram.c deftwmrc.c 
d45 4
d50 1
a50 1
	$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c 
@
