File: hgmkmf

package info (click to toggle)
vrweb 1.5-11
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 14,360 kB
  • ctags: 26,143
  • sloc: cpp: 133,581; ansic: 87,373; sh: 936; makefile: 444; perl: 347; csh: 26
file content (49 lines) | stat: -rwxr-xr-x 917 bytes parent folder | download
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
#!/bin/sh
# 
# generate a Makefile from an Imakefile outside of the source tree
# 
# $Id: hgmkmf,v 1.3 1995/11/27 15:05:13 gpani Exp $
# $Log: hgmkmf,v $
# Revision 1.3  1995/11/27 15:05:13  gpani
# Initial Revision
#
#

usage="usage: $0 [-a]"
do_all=

# this must be the absolute path to the installation root
# i.e. the directory containing subdirectories src and config
# set this manually or call makeall -r
# RootDir=/you_have_to_set_RootDir_in_config_scripts_hgmkmf
RootDir=/work/debian/vrweb


case "$#" in
	0)	;;
	1)	case "$1" in
			-a)	do_all="yes"
				;;
			*)	echo "$usage" 1>&2; exit 1
				;;
		esac
		;;
	*)	echo "$usage" 1>&2; exit 1
		;;
esac

if [ -f Makefile ]; then 
	rm -f Makefile.bak
	mv Makefile Makefile.bak
fi

case "$do_all" in
	yes)	set -x
		hgimake -T "template" -I"$RootDir"/config &&
		make Makefiles &&
		make depend
		;;
	*)	set -x
		hgimake -T "template" -I"$RootDir"/config
		;;
esac