FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-04-2008, 09:50 PM
MHR
 
Default mkdep vs. makedepend

Where I work, we have an application that has been merrily running
away (and being built) on FC1 (yes, you read that right).

One of my assignments is to bring this up to CentOS, but on my first
effort, I ran into this interesting "feature." The original build
process (FC1) uses mkdep to generate the dependency files that are
subsequently used by the makes to build the app. mkdep does not exist
in CentOS 5.2. There is a makedepend command that operates slightly
differently.

Can someone enlighten me on this, particularly w.r.t. 1) how do I use
makedepend to generate the same files mkdep did and is this a good
idea (my impression is that it's not really that hard but also not
necessarily a good idea or 2) convert all the makefiles to be
makedepend friendly (seems relatively easy, though fairly extensive,
but probably a better idea and also harmless should I wish/need to
continue to build on the FC1 system?

Probably a really basic question or two, but neither google nor the
archives have a good article on this that I could find.

Thanks.

mhr
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-04-2008, 10:08 PM
Johnny Hughes
 
Default mkdep vs. makedepend

MHR wrote:

Where I work, we have an application that has been merrily running
away (and being built) on FC1 (yes, you read that right).

One of my assignments is to bring this up to CentOS, but on my first
effort, I ran into this interesting "feature." The original build
process (FC1) uses mkdep to generate the dependency files that are
subsequently used by the makes to build the app. mkdep does not exist
in CentOS 5.2. There is a makedepend command that operates slightly
differently.

Can someone enlighten me on this, particularly w.r.t. 1) how do I use
makedepend to generate the same files mkdep did and is this a good
idea (my impression is that it's not really that hard but also not
necessarily a good idea or 2) convert all the makefiles to be
makedepend friendly (seems relatively easy, though fairly extensive,
but probably a better idea and also harmless should I wish/need to
continue to build on the FC1 system?

Probably a really basic question or two, but neither google nor the
archives have a good article on this that I could find.


That will probably build as is on CentOS-3


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-04-2008, 10:32 PM
MHR
 
Default mkdep vs. makedepend

On Fri, Jul 4, 2008 at 3:08 PM, Johnny Hughes <johnny@centos.org> wrote:
>
> That will probably build as is on CentOS-3
>

Our aim is to bring it up to 5.2 (the latest) if possible.

Thanks.

mhr
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-04-2008, 11:53 PM
Alfred von Campe
 
Default mkdep vs. makedepend

On Jul 4, 2008, at 17:50, MHR wrote:


One of my assignments is to bring this up to CentOS, but on my first
effort, I ran into this interesting "feature." The original build
process (FC1) uses mkdep to generate the dependency files that are
subsequently used by the makes to build the app. mkdep does not exist
in CentOS 5.2. There is a makedepend command that operates slightly
differently.


I'm not 100% positive on this, but I believe that mkdep/makedepend
are optional and only needed for build avoidance. If you do a "make
clean" followed by a "make all" (or simply "make clean all"), it
should rebuild your application from scratch (assuming that the "all"
target is defined to do so) and no dependency rules are needed. It
will take longer to rebuild since it has to recompile everything, but
it doesn't sound like you run this build every day.


Alfred

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-05-2008, 12:00 AM
Stephen Harris
 
Default mkdep vs. makedepend

> One of my assignments is to bring this up to CentOS, but on my first
> effort, I ran into this interesting "feature." The original build
> process (FC1) uses mkdep to generate the dependency files that are

My FC2 system doesn't have a mkdep command.

> Can someone enlighten me on this, particularly w.r.t. 1) how do I use
> makedepend to generate the same files mkdep did and is this a good
> idea (my impression is that it's not really that hard but also not

If you require a non-standard tool (I've really wouldn't depend
on this! Even makedepend is in the X package on FC2) then you should
bundle it as part of your build process.

--

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-05-2008, 04:16 PM
Nicolas Thierry-Mieg
 
Default mkdep vs. makedepend

MHR wrote:

Where I work, we have an application that has been merrily running
away (and being built) on FC1 (yes, you read that right).

One of my assignments is to bring this up to CentOS, but on my first
effort, I ran into this interesting "feature." The original build
process (FC1) uses mkdep to generate the dependency files that are
subsequently used by the makes to build the app. mkdep does not exist
in CentOS 5.2. There is a makedepend command that operates slightly
differently.

Can someone enlighten me on this, particularly w.r.t. 1) how do I use
makedepend to generate the same files mkdep did and is this a good
idea (my impression is that it's not really that hard but also not
necessarily a good idea or 2) convert all the makefiles to be
makedepend friendly (seems relatively easy, though fairly extensive,
but probably a better idea and also harmless should I wish/need to
continue to build on the FC1 system?




At some point a long time ago I was using makedep/makedepend, but I
replaced that with gcc -MM to generate the Makefile dependancies
automatically.


man gcc, search for -MM will tell you more.


Here's an excerpt from one of my project's Makefile, in case it helps.


################################################## ###############
# making the dependancy files
################################################## ###############
# each .c file has a corresponding .d file in the deps/ subdir.
# This .d file holds the dependancies for the .o.
# The .d is rebuilt automatically whenever the deps may have changed.

# the dependency files
# following only seems to work with gnu make, patsubst should be more
standard

#DEPS := $(SRCS:%.c=deps/%.d)
DEPS := $(patsubst %.c,deps/%.d,$(SRCS))

# rule to build the .d files
# the output of gcc -MM is something like:
# $ gcc -MM pools.c
# pools.o: pools.c config.h types.h pools.h fonc.h
# the perl line then changes this into:
# pools.o deps/pools.d: pools.c config.h types.h pools.h fonc.h
# Therefore each .d depends on all the files that the corresponding
# .o depends on, and will be rebuilt when necessary.
# I think this can be useful for conditional includes, for example
# if pools.c has a block:
# #ifdef GMP
# #include "gmp.h"
# #endif
# and GMP is defined in config.h...

deps/%.d: %.c
@echo rebuilding dependancy file $@
@$(SHELL) -ec '$(CC) -MM $(CFLAGS) $< | $(PERL) -e
'while(<>){s/^(.*).o:/$$1.o deps/$$1.d:/g;print;}'> $@'


# include all dep files
include $(DEPS)


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 11:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org