home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume8
/
cz
/
part09
/
uMakefile
< prev
Wrap
Makefile
|
1989-10-01
|
2KB
|
84 lines
# uMakefile - micro GNU make file for cz
#
# $Header: uMakefile,v 1.6 89/09/22 07:44:45 howard Exp $
#
# Copyright 1989 Howard Lee Gayle
# This file is written in the ISO 8859/1 character set.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 1,
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
include MakeCommon
# Commands:
# Make depend file that shows include files that C programs use.
DEPEND=mkCIncl
# Search for regual expression.
GREP=grep
# Make FREEZE.*.
MKFREEZE=mkFreeze
# Sort file.
SORT=sort
# Sources:
CS := $(filter %.c,$(SRCS))
HS := $(filter %.h,$(SRCS))
# Targets:
it = FREEZE.i ps-abbrev.i state0.i
targets := $(it) Makefile depend
ifdef WORK
.DEFAULT:
$(UNCMPRS) $@
else # WORK
.DEFAULT:
$(DISTI) $@ $(DD)
endif # WORK
.SUFFIXES:
.PHONY: default
default: $(targets)
ifndef WORK
Makefile: $(DD)/Makefile
$(DISTI) $@ $(DD)
endif # WORK
depend: $(CS) $(HS) $(it)
$(DEPEND) "$(INCLUDES)" $(CS) > $@
FREEZE.i: FREEZE
$(RM) FREEZE.*
$(MKFREEZE)
$(CHMOD) a=r FREEZE.*
#The following slick sed script takes the M4-format defines in ps-abbrev.m4
#and turns them into C format #defines suitable for including into cz0.c.
ps-abbrev.i: ps-abbrev.m4
$(GREP) '^define(' $< | \
$(SED) -e \
's;^define(\([^,]*\),\( *\)\([^)]*\))dnl\(..*\);#define \1\2 S("\3") /*\4*/;' \
| $(SORT) > $@
state0.i: ps-abbrev.m4 state0.m4
$(M4) state0.m4 > $@