3 |
|
|
4 |
|
include Config.inc |
5 |
|
|
6 |
< |
# these files will be included in the distribution |
7 |
< |
FILESRC = README ihost.pl ../generic/statgrab.pl ihostchk.sh |
8 |
< |
FILES = README ihost.pl statgrab.pl ihostchk.sh |
6 |
> |
# these files and directories will be included in the distribution |
7 |
> |
FILES = README ihost.pl ihostchk.sh |
8 |
> |
# where the plugins will be located |
9 |
> |
PLUGINSDIR = plugins |
10 |
|
|
11 |
< |
all: dist |
11 |
> |
# make the default perl, it's cross platform |
12 |
> |
all: perl |
13 |
|
|
14 |
+ |
# build the relevent plugin, then make the distribution |
15 |
+ |
perl: build-perl dist |
16 |
+ |
linux: build-linux dist |
17 |
+ |
solaris: build-solaris dist |
18 |
+ |
freebsd: build-freebsd dist |
19 |
+ |
|
20 |
+ |
build-perl: |
21 |
+ |
mkdir -p $(BUILDDIR)/$(PLUGINSDIR) |
22 |
+ |
cp -R $(PERLPLUGINS)/*.pl $(BUILDDIR)/$(PLUGINSDIR) |
23 |
+ |
|
24 |
+ |
build-linux: |
25 |
+ |
cd $(LINUXPLUGINS) && $(MAKE) linux |
26 |
+ |
mkdir -p $(BUILDDIR)/$(PLUGINSDIR) |
27 |
+ |
cp $(LINUXPLUGINS)/linux $(BUILDDIR)/$(PLUGINSDIR) |
28 |
+ |
|
29 |
+ |
build-solaris: |
30 |
+ |
cd $(SOLARISPLUGINS) && $(MAKE) solaris |
31 |
+ |
mkdir -p $(BUILDDIR)/$(PLUGINSDIR) |
32 |
+ |
cp $(SOLARISPLUGINS)/solaris $(BUILDDIR)/$(PLUGINSDIR) |
33 |
+ |
|
34 |
+ |
build-freebsd: |
35 |
+ |
cd $(FREEBSDPLUGINS) && $(MAKE) freebsd |
36 |
+ |
mkdir -p $(BUILDDIR)/$(PLUGINSDIR) |
37 |
+ |
cp $(FREEBSDPLUGINS)/freebsd $(BUILDDIR)/$(PLUGINSDIR) |
38 |
+ |
|
39 |
|
dist: |
40 |
< |
cp $(FILESRC) $(BUILDDIR) |
41 |
< |
cd $(BUILDDIR) && tar -cvf $(TARFILE) $(FILES) |
40 |
> |
cp -R $(FILES) $(BUILDDIR) |
41 |
> |
cd $(BUILDDIR) && tar -cvf $(TARFILE) $(FILES) $(PLUGINSDIR) |
42 |
|
cd $(BUILDDIR) && gzip -fv9 $(TARFILE) |
43 |
< |
cd $(BUILDDIR) && rm $(FILES) |
43 |
> |
cd $(BUILDDIR) && rm -Rf $(FILES) $(PLUGINSDIR) |
44 |
|
|
45 |
|
cvsbuild: |
46 |
< |
mkdir -p $(CVSBUILDTEMP)/$(IHOST) |
47 |
< |
mkdir -p $(CVSBUILDTEMP)/$(STATGRAB) |
48 |
< |
$(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP)/$(IHOST) $(IHOSTMODULE) |
49 |
< |
$(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP)/$(STATGRAB) $(STATGRABMODULE) |
23 |
< |
cd $(CVSBUILDTEMP)/$(IHOST) && $(MAKE) dist |
24 |
< |
cp $(CVSBUILDTEMP)/$(IHOST)/$(BUILDDIR)/$(TARGZFILE) $(BUILDDIR)/$(ARCNAME)-$(REVISION)$(TARGZEXT) |
46 |
> |
mkdir -p $(CVSBUILDTEMP) |
47 |
> |
$(CVS) -d $(CVSROOT) export -r $(REVISION) -d $(CVSBUILDTEMP) $(CVSMODULE) |
48 |
> |
cd $(CVSBUILDTEMP) && $(MAKE) dist |
49 |
> |
cp $(CVSBUILDTEMP)/$(BUILDDIR)/$(TARGZFILE) $(BUILDDIR)/$(ARCNAME)-$(REVISION)$(TARGZEXT) |
50 |
|
|
51 |
|
clean: |
52 |
|
rm -Rf $(BUILDDIR)/$(TARFILE) |
53 |
|
rm -Rf $(BUILDDIR)/$(TARGZFILE) |
54 |
|
rm -Rf $(BUILDDIR)/$(ARCNAME)-*$(TAREXT) |
55 |
|
rm -Rf $(BUILDDIR)/$(ARCNAME)-*$(TARGZEXT) |
56 |
< |
cd $(BUILDDIR) && rm -Rf $(FILES) |
56 |
> |
cd $(BUILDDIR) && rm -Rf $(FILES) $(PLUGINSDIR) |
57 |
|
rm -Rf $(CVSBUILDTEMP) |
58 |
|
|
59 |
+ |
distclean: clean |
60 |
+ |
cd $(LINUXPLUGINS) && $(MAKE) clean |
61 |
+ |
cd $(SOLARISPLUGINS) && $(MAKE) clean |
62 |
+ |
cd $(FREEBSDPLUGINS) && $(MAKE) clean |
63 |
+ |
|
64 |
|
update: |
65 |
|
$(CVS) -q -d $(CVSROOT) update |
36 |
– |
|
37 |
– |
# for compatibility with other scripts |
38 |
– |
distclean: clean |