direct-io.hg

changeset 1139:65aadb3d7e55

bitkeeper revision 1.761 (40446b53iVC1lWMdd8aC4YbIBLbvLg)

Makefile:
Installation fixes from Adam Heath.
author kaf24@scramble.cl.cam.ac.uk
date Tue Mar 02 11:09:07 2004 +0000 (2004-03-02)
parents 5b6243a7571b
children b25f306dd0db
files docs/Makefile tools/balloon/Makefile tools/examples/Makefile tools/misc/Makefile tools/misc/miniterm/Makefile tools/xc/lib/Makefile tools/xc/py/Makefile tools/xend/Makefile xen/Makefile xenolinux-2.4.25-sparse/Makefile xenolinux-2.4.25-sparse/arch/xeno/Makefile
line diff
     1.1 --- a/docs/Makefile	Mon Mar 01 17:04:00 2004 +0000
     1.2 +++ b/docs/Makefile	Tue Mar 02 11:09:07 2004 +0000
     1.3 @@ -4,7 +4,7 @@
     1.4  # Xfig and tgif diagrams should be in the fig/ subdirectory.
     1.5  # DOCUMENTS should be a list of the target Postscript files.
     1.6  
     1.7 -DOCUMENTS = interface.ps
     1.8 +DOCUMENTS = interface.ps interface.pdf
     1.9  
    1.10  GFX  = $(patsubst %.obj, %.eps, $(wildcard figs/*.obj))
    1.11  GFX += $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
    1.12 @@ -17,10 +17,17 @@ pristine: clean
    1.13  clean:
    1.14  	rm -f .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~ 
    1.15  	rm -f *.ilg *.log *.ind *.toc *.bak core
    1.16 -	rm -f figs/*.eps
    1.17 +	rm -f figs/*.eps $(DOCUMENTS)
    1.18 +
    1.19 +install: $(DOCUMENTS)
    1.20 +	mkdir -p $(prefix)/usr/share/doc/xen
    1.21 +	cp -a $(DOCUMENTS) VBD-HOWTO.txt Xeno-1.2-HOWTO.txt $(prefix)/usr/share/doc/xen
    1.22 +
    1.23 +%.pdf: %.ps
    1.24 +	ps2pdf $< $@
    1.25  
    1.26  %.ps: %.dvi $(GFX)
    1.27 -	dvips -o $@ $<
    1.28 +	dvips -Ppdf -G0 -o $@ $<
    1.29  
    1.30  %.dvi: %.tex
    1.31  	latex $*
     2.1 --- a/tools/balloon/Makefile	Mon Mar 01 17:04:00 2004 +0000
     2.2 +++ b/tools/balloon/Makefile	Tue Mar 02 11:09:07 2004 +0000
     2.3 @@ -5,8 +5,8 @@ TARGET=balloon
     2.4  	$(CC) -O2 -Wall -o $(TARGET) balloon.c
     2.5  
     2.6  install: $(TARGET)
     2.7 -	mkdir -p /usr/bin
     2.8 -	cp -a $(TARGET) /usr/bin
     2.9 +	mkdir -p $(prefix)/usr/bin
    2.10 +	cp -a $(TARGET) $(prefix)/usr/bin
    2.11  
    2.12  dist: $(TARGET)
    2.13  	mkdir -p ../../../install/bin
     3.1 --- a/tools/examples/Makefile	Mon Mar 01 17:04:00 2004 +0000
     3.2 +++ b/tools/examples/Makefile	Tue Mar 02 11:09:07 2004 +0000
     3.3 @@ -14,13 +14,13 @@ INITD    = xendomains
     3.4  all: 
     3.5  
     3.6  install: all
     3.7 -	mkdir -p /usr/bin
     3.8 -	cp -a $(INSTALL) /usr/bin
     3.9 +	mkdir -p $(prefix)/usr/bin
    3.10 +	cp -a $(INSTALL) $(prefix)/usr/bin
    3.11  	#chmod 755 $(INSTALL)
    3.12 -	mkdir -p /etc/xc
    3.13 -	for i in $(ETC) ; do [ ! -e /etc/xc/$$i ] && echo Install $$i && cp $$i /etc/xc/ ; done || true
    3.14 -	mkdir -p /etc/xc/auto
    3.15 -	for i in $(INITD) ; do [ -e /etc/init.d/ ] && [ ! -e /etc/init.d/$$i ] && cp $$i /etc/init.d/ ; done || true
    3.16 +	mkdir -p $(prefix)/etc/xc
    3.17 +	for i in $(ETC) ; do [ ! -e $(prefix)/etc/xc/$$i ] && echo Install $$i && cp $$i $(prefix)/etc/xc/ ; done || true
    3.18 +	mkdir -p $(prefix)/etc/xc/auto
    3.19 +	for i in $(INITD) ; do [ -e $(prefix)/etc/init.d/ ] && [ ! -e $(prefix)/etc/init.d/$$i ] && cp $$i $(prefix)/etc/init.d/ ; done || true
    3.20  
    3.21  dist: all
    3.22  	mkdir -p ../../../install/bin
     4.1 --- a/tools/misc/Makefile	Mon Mar 01 17:04:00 2004 +0000
     4.2 +++ b/tools/misc/Makefile	Tue Mar 02 11:09:07 2004 +0000
     4.3 @@ -15,11 +15,11 @@ all: $(TARGETS)
     4.4  	$(MAKE) -C miniterm	
     4.5  
     4.6  install: all
     4.7 -	mkdir -p /usr/bin
     4.8 -	cp -a $(INSTALL) /usr/bin
     4.9 -	chmod 755 /usr/bin/xen-mkdevnodes
    4.10 -	chmod 755 /usr/bin/xen_nat_enable
    4.11 -	chmod 755 /usr/bin/xen-clone
    4.12 +	mkdir -p $(prefix)/usr/bin
    4.13 +	cp -a $(INSTALL) $(prefix)/usr/bin
    4.14 +	chmod 755 $(prefix)/usr/bin/xen-mkdevnodes
    4.15 +	chmod 755 $(prefix)/usr/bin/xen_nat_enable
    4.16 +	chmod 755 $(prefix)/usr/bin/xen-clone
    4.17  	$(MAKE) -C miniterm install
    4.18  
    4.19  dist: all
     5.1 --- a/tools/misc/miniterm/Makefile	Mon Mar 01 17:04:00 2004 +0000
     5.2 +++ b/tools/misc/miniterm/Makefile	Tue Mar 02 11:09:07 2004 +0000
     5.3 @@ -4,7 +4,7 @@ CFLAGS  = -O3 -march=i686 -Wall
     5.4  all: miniterm
     5.5  
     5.6  install: all
     5.7 -	cp -a miniterm /usr/bin/	
     5.8 +	cp -a miniterm $(prefix)/usr/bin/	
     5.9  
    5.10  dist: all
    5.11  	cp -a miniterm ../../../../install/bin/	
     6.1 --- a/tools/xc/lib/Makefile	Mon Mar 01 17:04:00 2004 +0000
     6.2 +++ b/tools/xc/lib/Makefile	Tue Mar 02 11:09:07 2004 +0000
     6.3 @@ -1,3 +1,7 @@
     6.4 +
     6.5 +MAJOR    = 1.3
     6.6 +MINOR    = 0
     6.7 +SONAME   = libxc.so.$(MAJOR)
     6.8  
     6.9  CC       = gcc
    6.10  CFLAGS   = -c -Wall -O3 
    6.11 @@ -6,7 +10,7 @@ CFLAGS  += -I../../../xen/include -I../.
    6.12  HDRS     = $(wildcard *.h)
    6.13  OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
    6.14  
    6.15 -LIB      = libxc.so
    6.16 +LIB      = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
    6.17  
    6.18  all: check-for-zlib $(LIB)
    6.19  
    6.20 @@ -19,17 +23,17 @@ check-for-zlib:
    6.21  	fi
    6.22  
    6.23  install: all
    6.24 -	mkdir -p /usr/lib
    6.25 -	mkdir -p /usr/include
    6.26 -	cp $(LIB) /usr/lib
    6.27 -	chmod 755 /usr/lib/$(LIB)
    6.28 -	cp xc.h /usr/include
    6.29 -	chmod 644 /usr/include/xc.h
    6.30 +	mkdir -p $(prefix)/usr/lib
    6.31 +	mkdir -p $(prefix)/usr/include
    6.32 +	cp -a $(LIB) $(prefix)/usr/lib
    6.33 +	chmod 755 $(prefix)/usr/lib/$(LIB)
    6.34 +	cp xc.h $(prefix)/usr/include
    6.35 +	chmod 644 $(prefix)/usr/include/xc.h
    6.36  
    6.37  dist: all
    6.38  	mkdir -p ../../../../install/lib
    6.39  	mkdir -p ../../../../install/include
    6.40 -	cp $(LIB) ../../../../install/lib
    6.41 +	cp -a $(LIB) ../../../../install/lib
    6.42  	chmod 755 ../../../../install/lib/$(LIB)
    6.43  	cp xc.h ../../../../install/include
    6.44  	chmod 644 ../../../../install/include/xc.h
    6.45 @@ -46,8 +50,12 @@ rpm: all
    6.46  	mv staging/i386/*.rpm .
    6.47  	rm -rf staging
    6.48  
    6.49 -libxc.so: $(OBJS)
    6.50 -	$(LD) -shared -o $@ $^ -lz
    6.51 +libxc.so:
    6.52 +	ln -sf libxc.so.$(MAJOR) $@
    6.53 +libxc.so.$(MAJOR):
    6.54 +	ln -sf libxc.so.$(MAJOR).$(MINOR) $@
    6.55 +libxc.so.$(MAJOR).$(MINOR): $(OBJS)
    6.56 +	$(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -lz
    6.57  
    6.58  %.o: %.c $(HDRS) Makefile
    6.59  	$(CC) $(CFLAGS) -o $@ $<
     7.1 --- a/tools/xc/py/Makefile	Mon Mar 01 17:04:00 2004 +0000
     7.2 +++ b/tools/xc/py/Makefile	Tue Mar 02 11:09:07 2004 +0000
     7.3 @@ -1,9 +1,10 @@
     7.4  
     7.5 -all: ../lib/libxc.so ../lib/xc.h
     7.6 +all: ../lib/libxc.so.1.3.0 ../lib/xc.h
     7.7  	python setup.py build
     7.8  
     7.9  install: all
    7.10 -	python setup.py install
    7.11 +	if [ "$(prefix)" = "" ]; then python setup.py install; \
    7.12 +	else python setup.py install --root "$(prefix)"; fi
    7.13  
    7.14  dist: all
    7.15  	mkdir -p ../../../../install/lib/python
     8.1 --- a/tools/xend/Makefile	Mon Mar 01 17:04:00 2004 +0000
     8.2 +++ b/tools/xend/Makefile	Tue Mar 02 11:09:07 2004 +0000
     8.3 @@ -11,9 +11,9 @@ BIN      = xend
     8.4  all: $(BIN)
     8.5  
     8.6  install: all
     8.7 -	mkdir -p /usr/sbin
     8.8 -	cp $(BIN) /usr/sbin
     8.9 -	chmod 755 /usr/sbin/$(BIN)
    8.10 +	mkdir -p $(prefix)/usr/sbin
    8.11 +	cp $(BIN) $(prefix)/usr/sbin
    8.12 +	chmod 755 $(prefix)/usr/sbin/$(BIN)
    8.13  
    8.14  dist: all
    8.15  	mkdir -p ../../../install/sbin
     9.1 --- a/xen/Makefile	Mon Mar 01 17:04:00 2004 +0000
     9.2 +++ b/xen/Makefile	Tue Mar 02 11:09:07 2004 +0000
     9.3 @@ -19,8 +19,8 @@ debug:
     9.4  
     9.5  install: $(TARGET)
     9.6  	gzip -f -9 < $(TARGET) > $(TARGET).gz
     9.7 -	mkdir -p /boot
     9.8 -	cp -a $(TARGET).gz /boot
     9.9 +	mkdir -p $(prefix)/boot
    9.10 +	cp -a $(TARGET).gz $(prefix)/boot
    9.11  
    9.12  dist: $(TARGET)
    9.13  	gzip -f -9 < $(TARGET) > $(TARGET).gz
    10.1 --- a/xenolinux-2.4.25-sparse/Makefile	Mon Mar 01 17:04:00 2004 +0000
    10.2 +++ b/xenolinux-2.4.25-sparse/Makefile	Tue Mar 02 11:09:07 2004 +0000
    10.3 @@ -1,15 +1,15 @@
    10.4  VERSION = 2
    10.5  PATCHLEVEL = 4
    10.6  SUBLEVEL = 25
    10.7 -EXTRAVERSION = -xeno
    10.8 +EXTRAVERSION =
    10.9  
   10.10  KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
   10.11  
   10.12 -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
   10.13 -
   10.14 -# Xeno hack XXX
   10.15 -ARCH    := xeno
   10.16 -SUBARCH := i386
   10.17 +# SUBARCH always tells us the underlying machine architecture.
   10.18 +# Unless overridden, by default ARCH is equivalent to SUBARCH.
   10.19 +# This will be overriden for Xen and UML builds.
   10.20 +SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
   10.21 +ARCH := $(SUBARCH)
   10.22  
   10.23  KERNELPATH=kernel-$(shell echo $(KERNELRELEASE) | sed -e "s/-//g")
   10.24  
   10.25 @@ -87,7 +87,7 @@ endif
   10.26  # makefile but the arguement can be passed to make if needed.
   10.27  #
   10.28  
   10.29 -MODLIB	:= $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
   10.30 +MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
   10.31  export MODLIB
   10.32  
   10.33  #
   10.34 @@ -425,7 +425,7 @@ depmod_opts	:= -b $(INSTALL_MOD_PATH) -r
   10.35  endif
   10.36  .PHONY: _modinst_post
   10.37  _modinst_post: _modinst_post_pcmcia
   10.38 -#	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
   10.39 +	if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi
   10.40  
   10.41  # Backwards compatibilty symlinks for people still using old versions
   10.42  # of pcmcia-cs with hard coded pathnames on insmod.  Remove
    11.1 --- a/xenolinux-2.4.25-sparse/arch/xeno/Makefile	Mon Mar 01 17:04:00 2004 +0000
    11.2 +++ b/xenolinux-2.4.25-sparse/arch/xeno/Makefile	Tue Mar 02 11:09:07 2004 +0000
    11.3 @@ -16,6 +16,8 @@
    11.4  #           Added '-march' and '-mpreferred-stack-boundary' support
    11.5  #
    11.6  
    11.7 +override EXTRAVERSION := -xeno$(EXTRAVERSION)
    11.8 +
    11.9  LD=$(CROSS_COMPILE)ld -m elf_i386
   11.10  OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
   11.11  LDFLAGS=-e stext