LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-24-2008, 12:37 AM   #1
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444

Rep: Reputation: 30
Some questions on an autogenerated Makefile


Can someone explain what these lines mean?
This is the toplevel makefile. I don't understand what's going one with the $(top_srcdir)/configure.in and such.
Code:
SUBDIRS = $(TOPSUBDIRS)

$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;

$(top_srcdir)/subdirs:
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs

$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in
	@cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4

MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files 

package-messages:
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
	$(MAKE) -C po merge

EXTRA_DIST = admin COPYING configure.in.in

dist-hook:
	cd $(top_distdir) && perl admin/am_edit -padmin
	cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs
And then there is the Makefile for the actual program itself in ./src.
Code:
# set the include path for X, qt and KDE
INCLUDES = $(all_includes)

# these are the headers for your project

# let automoc handle all of the meta source files (moc)
METASOURCES = AUTO

messages: rc.cpp
	$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
	$(XGETTEXT) *.cpp -o $(podir)/sigcreate.pot

KDE_ICON = AUTO

#########################################################################
# APPLICATION SECTION
#########################################################################
# this is the program that gets installed.  it's name is used for all
# of the other Makefile.am variables
bin_PROGRAMS = sigcreate

# the application source, library search path, and link libraries
sigcreate_SOURCES = main.cpp sigcreate.cpp sigcreatedlg.ui
sigcreate_LDFLAGS = $(KDE_RPATH) $(all_libraries)
sigcreate_LDADD = $(LIB_KDEUI)

# this is where the desktop file will go 
shelldesktopdir   = $(kde_appsdir)/Utilities
shelldesktop_DATA = sigcreate.desktop

# this is where the shell's XML-GUI resource file goes
shellrcdir   = $(kde_datadir)/sigcreate
shellrc_DATA = sigcreateui.rc

noinst_HEADERS = sigcreate.h
What is this thing with rc.cpp? Thanks for helping me understand this.
 
Old 04-24-2008, 03:04 AM   #2
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444

Original Poster
Rep: Reputation: 30
Ok, I now understand everything in the second file except for the
Code:
messages: rc.cpp
	$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
	$(XGETTEXT) *.cpp -o $(podir)/sigcreate.pot
What does that do? It looks like it is trying to build a file called rc.cpp what does this file do? I cannot find any information on the variables EXTRACTRC, XGETTEXT and podir. Can someone explain this line to me? The Makefile.am in the top level source directory is a complete mystery. What does this line do:
Code:
$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ;
and this line
Code:
package-messages:
	cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages
	$(MAKE) -C po merge
Knowing this stuff could greatly enhance my ability to generate my own custom Makefiles. Thanks again.
 
Old 04-27-2008, 12:02 AM   #3
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 444

Original Poster
Rep: Reputation: 30
Anyone know how to write this stuff yet. I'm still trying...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem when compiling autogenerated KDevelop application SteQve Linux - Software 0 12-22-2005 12:00 PM
SQL - getting the primary key autogenerated of an INSERT statement vharishankar Programming 3 12-05-2005 02:47 AM
Makefile questions kornerr Programming 2 08-17-2005 01:30 AM
how to get (makefile -f makefile )output into the textview widget in Pygtk sailu_mvn Programming 3 02-28-2005 03:57 AM
generate Makefile from Makefile.in without calling ./configure ? chris78 Programming 2 05-02-2004 12:23 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration