Confused : MAKEDEV

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

 



Hi,
I am trying to build a minimal Linux from source code. I am not following Linux From Scratch as my purpose is not to have a fully functional build, just for educational purpose. So I am following "Build a Mimimal Linux System from Source Code' which is recommended in LFS document.


One of the 1st steps is to run MAKEDEV. My machine has Fedora Core 1 installed, so I got to FC1 download site and get MAKEDEV-3.3.8 source code package, and now the questions are;

1) From what I see MAKEDEV version seems the latest is 1.7, on some site I do see 2.x, but I never see version 3. Then where does this version 3.3.8 come from? Is it a special version from RedHat?

2) After unzip the package I see the files are like this,
<root>
COPYING MAKEDEV.spec genataraid genida
MAKEDEV.c Makefile gencciss makedev.d
MAKEDEV.m devices.txt gendac960 mksock.c
<root>/makedev.d
00macros ia64 linux-2.2.x raid std_s390
cdrom ibcs linux-2.4.x redhat undocumented
console ide linux1394 s390 usb
ftape ipfilter mouse sound v4l
generic isdn qic std


I can not see README file detailing how I should build/install. I take a look at the Makefile, it seems I should do the followinf steps:

      export DESTDIR=/mnt/mybld
       make
       make install

     Is this correct?

     I list the Makefile below.

Thanks a lot.


VERSION=$(shell awk '/Version:/ { print $$2 }' MAKEDEV.spec) RELEASE=$(shell awk '/Release:/ { print $$2 }' MAKEDEV.spec) TAG = makedev$(subst .,-,$(VERSION)-$(RELEASE))

CONF_S390= 00macros console generic std_s390 ftape \
     ipfilter raid s390 undocumented

CONF= 00macros ataraid cciss cdrom console dac960 ftape generic ia64 ibcs ida \
ide ipfilter isdn linux1394 linux-2.4.x mouse qic raid redhat sound std \
undocumented usb v4l


devdir=$(DESTDIR)/dev
sbindir=$(DESTDIR)/usr/sbin
sysconfdir=$(DESTDIR)/etc
mandir=$(DESTDIR)/usr/share/man
manext=8
mansubdir=$(mandir)/man$(manext)
confdir=$(sysconfdir)/makedev.d

DEBUGFLAGS=
DEFINES=-DCFGDIR=\"$(confdir)\" -DDEVDIR=\"$(devdir)\" -DVERSION=\"$(VERSION)\"
OPTFLAGS=-g -Wall
CFLAGS=$(OPTFLAGS) $(DEFINES) $(DEBUG)


ifdef S390
all: MAKEDEV mksock
else
all: MAKEDEV mksock makedev.d/dac960 makedev.d/ida makedev.d/cciss makedev.d/ataraid
endif


force-tag:
	cvs tag -cFR $(TAG) || echo GRRRrrrrr -- [tag aborted]

tag:
	cvs tag -cR $(TAG) || echo GRRRrrrrr -- [tag aborted]

archive:
	@rm -rf /tmp/MAKEDEV
	@rm -rf /tmp/MAKEDEV-$(VERSION)
	@dir=`pwd`; cd /tmp; cvs -q -d `cat $$dir/CVS/Root` export -r$(TAG) MAKEDEV
	@mv /tmp/MAKEDEV /tmp/MAKEDEV-$(VERSION)
	@cd /tmp; tar czSpf MAKEDEV-$(VERSION)-$(RELEASE).tar.gz MAKEDEV-$(VERSION)
	@rm -rf /tmp/MAKEDEV-$(VERSION)
	@cp /tmp/MAKEDEV-$(VERSION)-$(RELEASE).tar.gz .
	@rm -f /tmp/MAKEDEV-$(VERSION)-$(RELEASE).tar.gz
	@echo " "
	@echo "The final archive is MAKEDEV-$(VERSION)-$(RELEASE).tar.gz."

MAKEDEV: MAKEDEV.c

mksock: mksock.c

install: $(devdir)/MAKEDEV $(sbindir)/mksock install-conf

GENERATED = makedev.d/dac960 makedev.d/ida makedev.d/cciss makedev.d/ataraid

clean:
	$(RM) -f MAKEDEV core mksock $(GENERATED)

makedev.d/dac960: gendac960
	./gendac960 > makedev.d/dac960

makedev.d/ida: genida
	./genida > makedev.d/ida

makedev.d/cciss: gencciss
	./gencciss > makedev.d/cciss

makedev.d/ataraid: genataraid
	./genataraid > makedev.d/ataraid

$(devdir)/MAKEDEV: MAKEDEV
	install -m755 -d $(devdir)
	install -m755 MAKEDEV $(devdir)/MAKEDEV
	install -m755 -d $(mansubdir)
	install -m644 MAKEDEV.m $(mansubdir)/MAKEDEV.$(manext)

$(sbindir)/mksock: mksock
	install -m755 -d $(sbindir)
	install -m755 mksock $(sbindir)/mksock

install-conf:
	install -m755 -d $(confdir)
ifdef S390
	cd makedev.d ; install -m644 $(CONF_S390) $(confdir)/
else
	cd makedev.d ; install -m644 $(CONF) $(confdir)/
endif

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux