# $Id: Makefile,v 1.10 1992/11/29 19:10:35 cogito Exp $
# Copyright, 1992, AG-Kastens, University Of Paderborn

# =======================================================
# makefile parameters to be adapted:

# destination directory for installation:
DESTDIR=	../../..

DIR=		Tool/lib/Tech

# =======================================================
# sources:
PLAIN_MODULES=	ChainPtg.doc ChainPtg.lido ChainPtg.specs \
		List.ptg Let.head \
		GenName.c GenName.head GenName.specs \
		GenName.doc GenName.h GenName.lido \
		IndentPtg.c IndentPtg.h IndentPtg.head \
		IndentPtg.specs \
		LeafPtg.doc LeafPtg.lido LeafPtg.ptg \
		LeafPtg.specs \
		OutStr.c OutStr.h OutStr.head \
		String.head \
		ChainPtg.gnrc GenName.gnrc IndentPtg.gnrc LeafPtg.gnrc 

SRC=	Makefile $(PLAIN_MODULES)
INST=	$(PLAIN_MODULES)
TIDY=	core *~ *%
CLEAN=	$(TIDY) 

# =======================================================
# dependencies:

all:	$(INST)
	chmod 0755 *.gnrc

# =======================================================
# cleaning:

# clean any files created by make, but not needed to execute this tool:

tidy:
	@echo "tidy in $(DIR)"
	rm -rf $(TIDY)

clean:
	@echo "clean in $(DIR)"
	rm -rf $(CLEAN)

# ========================================================
# installation:

install: $(INST)
	@cp $(INST) $(DESTDIR)/$(DIR)
	@cd $(DESTDIR)/$(DIR); chmod 0644 $(INST); chmod 0755 *.gnrc

distrib: $(SRC)
	@cp $(SRC) $(DESTDIR)/$(DIR)
	@cd $(DESTDIR)/$(DIR); chmod 0644 $(SRC)

executable:	tidy
	rm -f Makefile

# ========================================================
# rcs operations for the development diectory (RCS in each subdirectory):

RCSSYS=		/usr/local/gnu/rcs/bin
RCSFLAGS=	-q
RCSCMD=		co

rcs:	RCS
	@echo "$(RCSCMD) in Tech"
	@-$(RCSSYS)/$(RCSCMD) $(RCSFLAGS) $(SRC)

comakefile:

RCS:
	@mkdir RCS
