1#ident @(#)rules.rel 1.10 15/08/22 2########################################################################### 3# Written 2001 by J. Schilling 4########################################################################### 5# 6# Release building rules 7# 8########################################################################### 9# Copyright (c) J. Schilling 10########################################################################### 11# The contents of this file are subject to the terms of the 12# Common Development and Distribution License, Version 1.0 only 13# (the "License"). You may not use this file except in compliance 14# with the License. 15# 16# See the file CDDL.Schily.txt in this distribution for details. 17# A copy of the CDDL is also available via the Internet at 18# http://www.opensource.org/licenses/cddl1.txt 19# 20# When distributing Covered Code, include this CDDL HEADER in each 21# file and include the License file CDDL.Schily.txt from this distribution. 22########################################################################### 23 24MAKE_LICENSE=MKGNU2 25REL_SRC_MATCH=cat 26REL_MAKEFILE_MATCH=cat 27 28DRELFILES= $(CFILES:%=release/%) $(HFILES:%=release/%) $(XRELFILES:%=release/%) 29 30_RELFILES= $(_UNIQ)$(RELFILES) 31__RELFILES= $(_RELFILES:$(_UNIQ)=$(DRELFILES)) 32RELFILES_= $(__RELFILES:$(_UNIQ)%=%) 33 34rel: release/ $(RELDIRS) $(RELFILES_) 35 36release/: 37 $(MKDIR) -p $@ 38 39release/%.c: %.c 40 rm -f $@ 41 -unifdef $(IFDEF) $< | $(REL_SRC_MATCH) >$@ 42 -chmod 444 $@ 43 -cpmodes $< $@ 44 cptime $< $@ 45 $(MAKE_LICENSE) $@ 46 rm -f $@.bak 47 48release/%.h: %.h 49 rm -f $@ 50 -unifdef $(IFDEF) $< | $(REL_SRC_MATCH) >$@ 51 -chmod 444 $@ 52 -cpmodes $< $@ 53 cptime $< $@ 54 $(MAKE_LICENSE) $@ 55 rm -f $@.bak 56 57release/Makefile%: Makefile% 58 rm -f $@ 59 -sed -e '/IFDEF=/,$$d' $< | $(REL_MAKEFILE_MATCH) >$@ 60 -chmod 444 $@ 61 -cpmodes $< $@ 62 cptime $< $@ 63 $(MAKE_LICENSE) $@ 64 rm -f $@.bak 65 66release/%.mk: %.mk 67 rm -f $@ 68 -sed -e '/IFDEF=/,$$d' $< >$@ 69 -chmod 444 $@ 70 -cpmodes $< $@ 71 cptime $< $@ 72 $(MAKE_LICENSE) $@ 73 rm -f $@.bak 74 75release/%: % 76 rm -f $@ 77# -unifdef $(IFDEF) $< >$@ 78 -cat $< >$@ 79 -chmod 444 $@ 80 -cpmodes $< $@ 81 cptime $< $@ 82 $(MAKE_LICENSE) $@ 83 rm -f $@.bak 84