SlideShare uma empresa Scribd logo
1 de 16
Baixar para ler offline
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 ???

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Último

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
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
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
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
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
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
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 

Último (20)

Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
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 ...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
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
 
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
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
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
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
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
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 

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 ●