[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [boot-floppies] overhauling makefiles?



> This is just moving stuff around, no substantive changes to the logic.

similar to what i plan to do on a first pass as well.

> Here are the logic changes I want to do:
> 
>   - all the arch-level stuff should be broken into make.<arch> files

yup, this is what i've done. so, f.i., all the evil flavors stuff in
i386 doesn't need to clutter the main makefile. (see end of message)

>   - building, say, the compact 1.44 root disk should build the file
>     right into release/images-1.44/compact/root.bin; this would
>     eliminate the evil coupling between releases.sh and the top-level
>     Makefile.

this is a good optimization... i can look into it.

> However, I'm a little hestitant to do this, or have someone else work
> on it, until we have the system building on woody, which right now,
> means having it build with the pools.

indeed. is there any reason why pathcmd can't be changed to something
like:

(in config)
archive		= /archive/debian
(in makefile)
pathcmd         = ls -1ft $(CURDIR)/updates/P $(local_dir)/P $(archive)/pool/*/P 2>/dev/null | head -1

of course, this assumes all the packages we want are in pools... this
also doesn't deal with multiple versions and multiple architectures, though
that should be easy to fix.

while you are probably right that we should get things to work before
optimizing, there are some things that are so evil in the tree now that
fixing it might take less time. dbootstrap's makefile is probably a good 
example of this. (i spent about an hour trying to get it to work on ia64
and hppa, finally gave up and rewrote the makefile in about 10 minutes)

> Pretty much I'm doing the same thing, but where you're using a prefix
> of 'build/Makefile.' I'm using a prefix of 'make.*'.

... and breaking up the architectures. see example makefile.i386

randolph
-- 
Debian Developer <tausq@debian.org>
http://www.TauSq.org/


# i386-specific make rules

kerneli386_compact := $(shell $(pathcmd:P=kernel-image-$(kver)-compact_*.deb))
pcmciai386_compact := $(shell $(pathcmd:P=pcmcia-modules-$(kver)-compact_*.deb))
kerneli386_udma66 := $(shell $(pathcmd:P=kernel-image-$(kver)-ide_*.deb))
pcmciai386_udma66 := $(shell $(pathcmd:P=pcmcia-modules-$(kver)-ide_*.deb))
kerneli386_idepci := $(shell $(pathcmd:P=kernel-image-$(kver)-idepci_*.deb))
pcmciai386_idepci := $(shell $(pathcmd:P=pcmcia-modules-$(kver)-idepci_*.deb))

depends_checks := dosfstools syslinux zlib-bin
tools_checks := rawrite2.zip lodlin16.zip

check_kernel:
	@[ -f "$(kernel)" ] || \
		( echo $(MSG) kernel \($(kver)\) is not available ; exit 1 )
	@[ -f "$(pcmcia_package)" ] || \
		( echo $(MSG) PCMCIA modules \($(pcmcia_kver)\) are not available ; exit 1 )
	@[ -f "$(kerneli386_compact)" ] || \
		( echo compact kernel is not available ; exit 1 )
	@[ -f "$(pcmciai386_compact)" ] || \
		( echo compact flavor PCMCIA modules are not available ; exit 1 )
	@[ -f "$(kerneli386_udma66)" ] || \
		( echo udma66 kernel is not available ; exit 1 )
	@[ -f "$(pcmciai386_udma66)" ] || \
		( echo udma66 flavor PCMCIA modules are not available ; exit 1 )
	@[ -f "$(kerneli386_idepci)" ] || \
		( echo idepci kernel is not available ; exit 1 )
	@[ -f "$(pcmciai386_idepci)" ] || \
		( echo idepci flavor PCMCIA modules are not available ; exit 1 )
	
modulesudma66.tgz sys_mapudma66.gz configudma66.gz linuxudma66 \
modcontudma66: $(packages_with_modules) kernel.sh $(kernel) Makefile
	$(ROOTCMD) ./kernel.sh "udma66" $(kerneli386_udma66) $(pcmciai386_udma66)

modulesidepci.tgz sys_mapidepci.gz configidepci.gz linuxidepci \
modcontidepci: $(packages_with_modules) kernel.sh $(kernel) Makefile
	$(ROOTCMD) ./kernel.sh "idepci" $(kerneli386_idepci) $(pcmciai386_idepci)

modulescompact.tgz sys_mapcompact.gz configcompact.gz linuxcompact \
modcontcompact: $(packages_with_modules) kernel.sh $(kernel) Makefile
	$(ROOTCMD) ./kernel.sh "compact" $(kerneli386_compact) $(pcmciai386_compact)

root1440udma66.bin: 	resc1440udma66.bin
rootudma66.bin:		rootdisk.sh common.sh Makefile keymaps.tgz \
			utilities/dbootstrap/dbootstrap
	$(ROOTCMD) ./rootdisk.sh "udma66" $(archive) 3200 $(debianversion) "" $(LINGUA) "$(FONT)" $(SFONT)

root1440idepci.bin:	resc1440idepci.bin
rootidepci.bin:		rootdisk.sh common.sh Makefile keymaps.tgz \
			utilities/dbootstrap/dbootstrap
	$(ROOTCMD) ./rootdisk.sh "idepci" $(archive) 3200 $(debianversion) "" $(LINGUA) "$(FONT)" $(SFONT)

root1440compact.bin:	resc1440compact.bin
rootcompact.bin:	rootdisk.sh common.sh Makefile keymaps.tgz \
			utilities/dbootstrap/dbootstrap
	$(ROOTCMD) ./rootdisk.sh "compact" $(archive) 3200 $(debianversion) "" $(LINGUA) "$(FONT)" $(SFONT)

resc1200$(EXT).bin:	linux$(EXT) sys_map$(EXT).gz config$(EXT).gz rescue.sh Makefile \
		$(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "$(EXT)" $(kernel) root.bin 1200 $(debianversion) "" $(LINGUA) $(SFONT)

resc1440$(EXT).bin:	linux$(EXT) sys_map$(EXT).gz config$(EXT).gz rescue.sh Makefile \
		$(arch_rescue_deps) \
		root.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "$(EXT)" $(kernel) root.bin 1440 $(debianversion) "" $(LINGUA) $(SFONT)

# @@ tausq TODO  make this generic
resc1440udma66.bin:	linuxudma66 sys_mapudma66.gz configudma66.gz rescue.sh \
		Makefile $(arch_rescue_deps) \
		rootudma66.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "udma66" $(kerneli386_udma66) rootudma66.bin 1440 $(debianversion) "" $(LINGUA) $(SFONT)

# @@ tausq TODO  make this generic
resc2880udma66.bin:	linuxudma66 sys_mapudma66.gz configudma66.gz rescue.sh \
		Makefile $(arch_rescue_deps) \
		rootudma66.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "udma66" $(kerneli386_udma66) rootudma66.bin 2880 $(debianversion) "" $(LINGUA) $(SFONT)

# @@ tausq TODO  make this generic
resc1440idepci.bin:	linuxidepci sys_mapidepci.gz configidepci.gz rescue.sh \
		Makefile $(arch_rescue_deps) \
		rootidepci.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "idepci" $(kerneli386_idepci) rootidepci.bin 1440 $(debianversion) "" $(LINGUA) $(SFONT)

# @@ tausq TODO  make this generic
resc2880idepci.bin:	linuxidepci sys_mapidepci.gz configidepci.gz rescue.sh \
		Makefile $(arch_rescue_deps) \
		rootidepci.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "idepci" $(kerneli386_idepci) rootidepci.bin 2880 $(debianversion) "" $(LINGUA) $(SFONT)

# @@ tausq TODO  make this generic
resc1440compact.bin:	linuxcompact sys_mapcompact.gz configcompact.gz rescue.sh \
		Makefile $(arch_rescue_deps) \
		rootcompact.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "compact" $(kerneli386_compact) rootcompact.bin 1440 $(debianversion) "" $(LINGUA) $(SFONT)

# @@ tausq TODO  make this generic
resc2880compact.bin:	linuxcompact sys_mapcompact.gz configcompact.gz rescue.sh \
		Makefile $(arch_rescue_deps) \
		rootcompact.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "compact" $(kerneli386_compact) rootcompact.bin 2880 $(debianversion) "" $(LINGUA) $(SFONT)

resc2880.bin:	linux sys_map.gz config.gz rescue.sh Makefile \
		$(arch_rescue_deps) \
		root.bin $(shell find scripts/rescue -type f )
	$(ROOTCMD) ./rescue.sh "" $(kernel) root.bin 2880 $(debianversion) "" $(LINGUA) $(SFONT)

resc1200-s.bin:	resc1200.bin safe.sh
	$(ROOTCMD) ./safe.sh $< $@

resc1440-s.bin:	resc1440.bin safe.sh
	$(ROOTCMD) ./safe.sh $< $@

resc1440-graphical.bin: linux sys_map.gz config.gz rescue.sh Makefile \
			$(arch_rescue_deps) \
			root-graphical.bin $(shell find scripts/rescue -type f)
	GRAPHICAL=yes $(ROOTCMD) ./rescue.sh "-graphical" $(kernel) root-graphical.bin 1440 $(debianversion) "" $(LINGUA) $(SFONT)


build_arch:
	$(MAKE) resc1440.bin resc1440-s.bin
	$(MAKE) resc1440compact.bin
	$(MAKE) driverscompact.tgz
	$(MAKE) resc1440udma66.bin
	$(MAKE) driversudma66.tgz
	$(MAKE) resc1440idepci.bin
	$(MAKE) driversidepci.tgz
	$(MAKE) resc1200.bin resc1200-s.bin
	$(MAKE) resc2880.bin
	$(MAKE) resc2880compact.bin
	$(MAKE) resc2880udma66.bin
	$(MAKE) resc2880idepci.bin
	$(MAKE) drivers$(EXT).tgz

release_arch:
	TOOLS_DIR=$(tools_dir) ./release.sh i386 $(debname) $(debianversion) $(kernel)

HAVE_BUILD_ARCH:= 1
HAVE_RELEASE_ARCH:= 1



Reply to: