SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
GNU autotools and building an app




              Vibha Yadav
Outline
●   Why?
●   GNU Autotools
●   Autogen.sh
●   aclocal
●   autoconf
●   automake
●   GNU Build Process
●   Autogen.sh
●   Configure.ac
●   Makefile.am
●   Make targets
●   LibTool
●   References
Why?
●   Platform Issue
●   Makes the process easier
       –   Configure, make, make install
GNU Autotools

●   Autogen.sh
●   Aclocal
●   Autoconf
●   Automake
●   Libtool
Autogen.sh
●   (a.k.a. buildconf)
●   provides automatic build system
    preparation
●   POSIX shell script
●   preparing a build system for compilation
●   verifying versions,
●   ensuring necessary functionality
●   common build preparation issues.
aclocal
●   combining stock installed macros + user defined macros +
    `acinclude.m4' → aclocal.m4
●   to define all of the macros required by `configure.in' in a
    single file
autoconf
●   expands the m4 macros in `configure.in',
    perhaps using macro definitions from
    `aclocal.m4' -> generate the configure
    script.
automake
●   tool for automatically generating
    `Makefile.in' files compliant with the
    GNU Coding Standards
GNU Build Process
Autogen.sh
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.

PKG_NAME=<Package_Name>
REQUIRED_AUTOCONF_VERSION=2.58
REQUIRED_AUTOMAKE_VERSION=1.10
REQUIRED_LIBTOOL_VERSION=2.2
REQUIRED_INTLTOOL_VERSION=0.35.5

(test -f $srcdir/configure.ac 
  && test -f $srcdir/ChangeLog 
  && test -d $srcdir/<filename>) || {
   echo -n "**Error**: Directory "`$srcdir'" does not look like the"
   echo " top-level $PKG_NAME directory"
   exit 1
}

which gnome-autogen.sh || {
  echo "You need to install gnome-common from the GNOME CVS"
  exit 1
}

USE_GNOME2_MACROS=1 . gnome-autogen.sh
Configure.ac
●   The AC_PREREQ(version) macro can be used to ensure that a recent enough
    version of the autoconf program is available to process the configure.ac file
●   AC_INIT(package, version, bug-report-address)
                      ●   specifies the name and version of the software package
●   AC_SUBST                                exports variable into generated files
●   PKG_CHECK_MODULES(prefix, list-of-modules, action-if-found, action-if-not-
    found)                                checks for programs
●
    AC_CHECK_LIB                                 checks for libraries
●
    AC_CHECK_HEADERS                             checks for header files
●
    AC_PROG_CC                                   checks for compiler characteristics
●
    AC_CHECK_FUNCS                               checks for library functions
●   AC_CONFIG_FILES([file...])
●   AC_OUTPUT
●   dnl Comment … …
Makefile.am
●   bin_PROGRAMS = foo
●   foo_SOURCES=foo.c foo.h
●   foo_CPPFLAGS = lib_CFLAGS
●   foo_LIBADD = lib_LIBS
●   noinst_PROGRAMS=test
●   EXTRA_DIST=disclaimer.txt
Make targets
●   dist        Builds a tarball (.tar.gz) for distribution
●   distcheck Builds a tarball, then tries to compile it
●   clean       Deletes the results of compilation (object files and executables), but may
                not delete some generated files that come with the distribution.
●   install     Creates installation directories if needed, and copies the software into
                them.
●   uninstall   Reverses the install (deletes installed files).
●   distclean   Reverse the effects of the configure script and the all target; that is, revert
                a tarball to its pristine state.
●   mostlyclean       Nearly the same as clean, but leaves some object files that most
                     likely don't need to be rebuilt.
●   maintainer-clean        More thorough than clean; may delete some files that require
                           special tools to rebuild, such as machine-generated source
                           code.
●   check       Runs a test suite if you have one
LibTool
●   used for creating portable compiled libraries
●   GNU Libtool simplifies the developer's job by encapsulating
    both the platform-specific dependencies, and the user
    interface, in a single script. GNU Libtool is designed so that
    the complete functionality of each host type is available via
    a generic interface, but nasty quirks are hidden from the
    programmer.
●   GNU Libtool's interface aims to be consistent. Users are
    not expected to read low-level documentation in order to
    have a source package build shared libraries. They should
    only have to run the package's configure script (or
    equivalent), and Libtool should take care of the details.
References
●   http://developer.gnome.org/doc/GGAD/z70.html
●   http://sourceware.org/autobook/autobook/autobook_75.html
●   http://en.wikipedia.org/wiki/GNU_build_system
●
Questions ???

Contenu connexe

Tendances

DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxAndrii Podanenko
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projectsAleksandra Gavrilovska
 
[Szjug] Docker. Does it matter for java developer?
[Szjug] Docker. Does it matter for java developer?[Szjug] Docker. Does it matter for java developer?
[Szjug] Docker. Does it matter for java developer?Izzet Mustafaiev
 
JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具謝 宗穎
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Developmentallingeek
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.Andrii Podanenko
 
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph GaluschkaOpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph GaluschkaNETWAYS
 
Log monitoring with Logstash and Icinga
Log monitoring with Logstash and IcingaLog monitoring with Logstash and Icinga
Log monitoring with Logstash and IcingaOlinData
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a prosparkfabrik
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Per Henrik Lausten
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7Chris Caple
 
Deployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails WorldDeployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails WorldNikhil Mungel
 
Gitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CIGitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CIUilian Ries
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with DockerAnton Egorov
 
How to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsHow to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsBo-Yi Wu
 

Tendances (20)

DrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration ToolboxDrupalCon Los Angeles - Continuous Integration Toolbox
DrupalCon Los Angeles - Continuous Integration Toolbox
 
Continuos integration for iOS projects
Continuos integration for iOS projectsContinuos integration for iOS projects
Continuos integration for iOS projects
 
[Szjug] Docker. Does it matter for java developer?
[Szjug] Docker. Does it matter for java developer?[Szjug] Docker. Does it matter for java developer?
[Szjug] Docker. Does it matter for java developer?
 
Workshop - Golang language
Workshop - Golang languageWorkshop - Golang language
Workshop - Golang language
 
JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具JCConf 2015 workshop 動手玩 Java 專案建置工具
JCConf 2015 workshop 動手玩 Java 專案建置工具
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Development
 
MoldCamp - multidimentional testing workflow. CIBox.
MoldCamp  - multidimentional testing workflow. CIBox.MoldCamp  - multidimentional testing workflow. CIBox.
MoldCamp - multidimentional testing workflow. CIBox.
 
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph GaluschkaOpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
OpenNebula Conf 2014: CentOS, QA an OpenNebula - Christoph Galuschka
 
Log monitoring with Logstash and Icinga
Log monitoring with Logstash and IcingaLog monitoring with Logstash and Icinga
Log monitoring with Logstash and Icinga
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
 
CI CD WORKFLOW
CI CD WORKFLOWCI CD WORKFLOW
CI CD WORKFLOW
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
 
Lando - AddWeb Solution
Lando - AddWeb Solution Lando - AddWeb Solution
Lando - AddWeb Solution
 
Deployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails WorldDeployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails World
 
OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5OpenCms Days 2014 - Updating to OpenCms 9.5
OpenCms Days 2014 - Updating to OpenCms 9.5
 
Fabric8 CI/CD
Fabric8 CI/CDFabric8 CI/CD
Fabric8 CI/CD
 
Gitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CIGitlab - Creating C++ applications with Gitlab CI
Gitlab - Creating C++ applications with Gitlab CI
 
Deliver Python Apps with Docker
Deliver Python Apps with DockerDeliver Python Apps with Docker
Deliver Python Apps with Docker
 
How to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsHow to integrate front end tool via gruntjs
How to integrate front end tool via gruntjs
 

En vedette

11th Annual CTE Meet at Doraha College of Education
11th Annual CTE Meet at Doraha College of Education11th Annual CTE Meet at Doraha College of Education
11th Annual CTE Meet at Doraha College of Educationgaurav11111
 
clockitbrochure-160413063254
clockitbrochure-160413063254clockitbrochure-160413063254
clockitbrochure-160413063254jaseemabbassv
 
Acura tl photo album
Acura tl photo albumAcura tl photo album
Acura tl photo albumviktor22
 
Service proit chain
Service proit chainService proit chain
Service proit chainsardesai
 

En vedette (8)

11th Annual CTE Meet at Doraha College of Education
11th Annual CTE Meet at Doraha College of Education11th Annual CTE Meet at Doraha College of Education
11th Annual CTE Meet at Doraha College of Education
 
clockitbrochure-160413063254
clockitbrochure-160413063254clockitbrochure-160413063254
clockitbrochure-160413063254
 
Acura tl photo album
Acura tl photo albumAcura tl photo album
Acura tl photo album
 
Autotools
AutotoolsAutotools
Autotools
 
Service proit chain
Service proit chainService proit chain
Service proit chain
 
TESTING
TESTINGTESTING
TESTING
 
Intark Presentasjon Linkedin
Intark Presentasjon LinkedinIntark Presentasjon Linkedin
Intark Presentasjon Linkedin
 
Interior Design Details
Interior Design DetailsInterior Design Details
Interior Design Details
 

Similaire à Autotools

Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the AutotoolsScott Garman
 
Android open source project build system phi innovations - android summit 2015
Android open source project build system   phi innovations - android summit 2015Android open source project build system   phi innovations - android summit 2015
Android open source project build system phi innovations - android summit 2015Rafael Coutinho
 
Gnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semGnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semSagun Baijal
 
Gnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-semGnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-semSagun Baijal
 
Autotools pratical training
Autotools pratical trainingAutotools pratical training
Autotools pratical trainingThierry Gayet
 
LOSS_C11- Programming Linux 20221006.pdf
LOSS_C11- Programming Linux 20221006.pdfLOSS_C11- Programming Linux 20221006.pdf
LOSS_C11- Programming Linux 20221006.pdfThninh2
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in EnglishOtavio Salvador
 
Autoconf&Automake
Autoconf&AutomakeAutoconf&Automake
Autoconf&Automakeniurui
 
SPACK: A Package Manager for Supercomputers, Linux, and MacOS
SPACK: A Package Manager for Supercomputers, Linux, and MacOSSPACK: A Package Manager for Supercomputers, Linux, and MacOS
SPACK: A Package Manager for Supercomputers, Linux, and MacOSinside-BigData.com
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdfAbid Malik
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using SwiftDiego Freniche Brito
 
Process (OS),GNU,Introduction to Linux oS
Process (OS),GNU,Introduction to Linux oSProcess (OS),GNU,Introduction to Linux oS
Process (OS),GNU,Introduction to Linux oSHarrytoye2
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo家榮 吳
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications Ramakrishna Reddy
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and moreAcquia
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Opersys inc.
 
Kubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battleKubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battleAmir Moghimi
 

Similaire à Autotools (20)

Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the Autotools
 
Android open source project build system phi innovations - android summit 2015
Android open source project build system   phi innovations - android summit 2015Android open source project build system   phi innovations - android summit 2015
Android open source project build system phi innovations - android summit 2015
 
Gnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semGnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-sem
 
Gnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-semGnubs pres-foss-cdac-sem
Gnubs pres-foss-cdac-sem
 
Autotools
AutotoolsAutotools
Autotools
 
Autotools pratical training
Autotools pratical trainingAutotools pratical training
Autotools pratical training
 
LOSS_C11- Programming Linux 20221006.pdf
LOSS_C11- Programming Linux 20221006.pdfLOSS_C11- Programming Linux 20221006.pdf
LOSS_C11- Programming Linux 20221006.pdf
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
 
Autoconf&Automake
Autoconf&AutomakeAutoconf&Automake
Autoconf&Automake
 
SPACK: A Package Manager for Supercomputers, Linux, and MacOS
SPACK: A Package Manager for Supercomputers, Linux, and MacOSSPACK: A Package Manager for Supercomputers, Linux, and MacOS
SPACK: A Package Manager for Supercomputers, Linux, and MacOS
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdf
 
Flash develop presentation
Flash develop presentationFlash develop presentation
Flash develop presentation
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Process (OS),GNU,Introduction to Linux oS
Process (OS),GNU,Introduction to Linux oSProcess (OS),GNU,Introduction to Linux oS
Process (OS),GNU,Introduction to Linux oS
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications
 
Dockerized maven
Dockerized mavenDockerized maven
Dockerized maven
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
Kubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battleKubernetes: training micro-dragons for a serious battle
Kubernetes: training micro-dragons for a serious battle
 

Dernier

Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 

Dernier (20)

FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 

Autotools

  • 1. GNU autotools and building an app Vibha Yadav
  • 2. Outline ● Why? ● GNU Autotools ● Autogen.sh ● aclocal ● autoconf ● automake ● GNU Build Process ● Autogen.sh ● Configure.ac ● Makefile.am ● Make targets ● LibTool ● References
  • 3. Why? ● Platform Issue ● Makes the process easier – Configure, make, make install
  • 4. GNU Autotools ● Autogen.sh ● Aclocal ● Autoconf ● Automake ● Libtool
  • 5. Autogen.sh ● (a.k.a. buildconf) ● provides automatic build system preparation ● POSIX shell script ● preparing a build system for compilation ● verifying versions, ● ensuring necessary functionality ● common build preparation issues.
  • 6. aclocal ● combining stock installed macros + user defined macros + `acinclude.m4' → aclocal.m4 ● to define all of the macros required by `configure.in' in a single file
  • 7. autoconf ● expands the m4 macros in `configure.in', perhaps using macro definitions from `aclocal.m4' -> generate the configure script.
  • 8. automake ● tool for automatically generating `Makefile.in' files compliant with the GNU Coding Standards
  • 10. Autogen.sh srcdir=`dirname $0` test -z "$srcdir" && srcdir=. PKG_NAME=<Package_Name> REQUIRED_AUTOCONF_VERSION=2.58 REQUIRED_AUTOMAKE_VERSION=1.10 REQUIRED_LIBTOOL_VERSION=2.2 REQUIRED_INTLTOOL_VERSION=0.35.5 (test -f $srcdir/configure.ac && test -f $srcdir/ChangeLog && test -d $srcdir/<filename>) || { echo -n "**Error**: Directory "`$srcdir'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 } which gnome-autogen.sh || { echo "You need to install gnome-common from the GNOME CVS" exit 1 } USE_GNOME2_MACROS=1 . gnome-autogen.sh
  • 11. Configure.ac ● The AC_PREREQ(version) macro can be used to ensure that a recent enough version of the autoconf program is available to process the configure.ac file ● AC_INIT(package, version, bug-report-address) ● specifies the name and version of the software package ● AC_SUBST exports variable into generated files ● PKG_CHECK_MODULES(prefix, list-of-modules, action-if-found, action-if-not- found) checks for programs ● AC_CHECK_LIB checks for libraries ● AC_CHECK_HEADERS checks for header files ● AC_PROG_CC checks for compiler characteristics ● AC_CHECK_FUNCS checks for library functions ● AC_CONFIG_FILES([file...]) ● AC_OUTPUT ● dnl Comment … …
  • 12. Makefile.am ● bin_PROGRAMS = foo ● foo_SOURCES=foo.c foo.h ● foo_CPPFLAGS = lib_CFLAGS ● foo_LIBADD = lib_LIBS ● noinst_PROGRAMS=test ● EXTRA_DIST=disclaimer.txt
  • 13. Make targets ● dist Builds a tarball (.tar.gz) for distribution ● distcheck Builds a tarball, then tries to compile it ● clean Deletes the results of compilation (object files and executables), but may not delete some generated files that come with the distribution. ● install Creates installation directories if needed, and copies the software into them. ● uninstall Reverses the install (deletes installed files). ● distclean Reverse the effects of the configure script and the all target; that is, revert a tarball to its pristine state. ● mostlyclean Nearly the same as clean, but leaves some object files that most likely don't need to be rebuilt. ● maintainer-clean More thorough than clean; may delete some files that require special tools to rebuild, such as machine-generated source code. ● check Runs a test suite if you have one
  • 14. LibTool ● used for creating portable compiled libraries ● GNU Libtool simplifies the developer's job by encapsulating both the platform-specific dependencies, and the user interface, in a single script. GNU Libtool is designed so that the complete functionality of each host type is available via a generic interface, but nasty quirks are hidden from the programmer. ● GNU Libtool's interface aims to be consistent. Users are not expected to read low-level documentation in order to have a source package build shared libraries. They should only have to run the package's configure script (or equivalent), and Libtool should take care of the details.
  • 15. References ● http://developer.gnome.org/doc/GGAD/z70.html ● http://sourceware.org/autobook/autobook/autobook_75.html ● http://en.wikipedia.org/wiki/GNU_build_system ●