File: rules.tpk

package info (click to toggle)
sfind 1.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,404 kB
  • ctags: 2,727
  • sloc: ansic: 16,006; sh: 3,297; makefile: 106
file content (66 lines) | stat: -rw-r--r-- 2,770 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ident "@(#)rules.tpk	1.4 06/05/14 "
###########################################################################
# Written 2005 by J. Schilling
###########################################################################
#
# Rules for creating binary tar packages
#
###########################################################################
# Copyright (c) J. Schilling
###########################################################################
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only.
# (the "License").  You may not use this file except in compliance
# with the License.
#
# See the file CDDL.Schily.txt in this distribution for details.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file CDDL.Schily.txt from this distribution.
###########################################################################

###########################################################################
# If we are included before rules.dir, this will stop to propagate
# the targets tarpkg1 & tarpkg to sub makes but handle packaging at this
# directory bundling level.
###########################################################################
PKGTARGETS=

OTARSDIR=	$(SRCROOTSL)tars/$(OARCH)
$(OTARSDIR):
		$(MKDIR) -p $@


_TARGETAR=	$(TARGET_AR:%=$(OTARSDIR)/%)
__TARGETAR=	$(_UNIQ)$(_TARGETAR)
___TARGETAR=	$(__TARGETAR:$(_UNIQ)=tarpkg)
TARGETAR=	$(___TARGETAR:$(_UNIQ)%=%)

_MCS_PROJECT=	$(_UNIQ)$(PROJECTNAME)
__MCS_PROJECT=	$(_MCS_PROJECT:$(_UNIQ)=SPS-Generic)
MCS_PROJECTNAME= $(__MCS_PROJECT:$(_UNIQ)%=%)

ta:
	echo "'$(TARGETAR)'"
	echo "'$(TARGETAR).tar'"

tarpkg: $(OTARSDIR) tarpkg1 tarpkg2

tarpkg1:
	rm -rf tarpkg
	mkdir -p tarpkg tarpkg/$(INS_BASE)/bin tarpkg/$(INS_BASE)/sbin tarpkg/$(INS_BASE)/etc \
		tarpkg/$(INS_BASE)/lib tarpkg/$(INS_BASE)/share/man
	ln -s share/man tarpkg/$(INS_BASE)/man
	if [ ."$(PRE_INST_CMDS)" != . ]; then cd tarpkg && eval "$(PRE_INST_CMDS)" ; fi
	$(MAKE) $(MAKE_FILE) DESTDIR=`pwd`/tarpkg install
	if [ ."$(POST_INST_CMDS)" != . ]; then cd tarpkg && eval "$(POST_INST_CMDS)" ; fi
	-if [ ."$(STRIPLIST)" != . ];  then chmod u+w $(STRIPLIST:%=tarpkg/%); strip $(STRIPLIST:%=tarpkg/%); fi
	-if [ ."$(STRIPXLIST)" != . ]; then chmod u+w $(STRIPXLIST:%=tarpkg/%); strip -x $(STRIPXLIST:%=tarpkg/%); fi
	-if [ ."$(MCSLIST)" != . ];    then chmod u+w $(MCSLIST:%=tarpkg/%); mcs -d -a "$(MCS_PROJECTNAME)" $(MCSLIST:%=tarpkg/%); fi
	if [ ."$(POST_STRIP_CMDS)" != . ]; then cd tarpkg && eval "$(POST_STRIP_CMDS)" ; fi
	find tarpkg -print | sort > /tmp/so.$$; diff filelist /tmp/so.$$; rm -f /tmp/so.$$

tarpkg2:
	star -C tarpkg/ pkglist=pkglist -cP > $(TARGETAR).tar
	bzip2 -9f $(TARGETAR).tar
	rm -rf tarpkg