L'ordre make en sistemes de la família Debian/Ubuntu és proporcionada pel paquet del mateix nom:
$ whereis make make: /usr/bin/make /usr/share/man/man1/make.1.gz $ dpkg -S /usr/bin/make make: /usr/bin/make
Pe tant per instal·lar-la:
$ sudo apt-get install make
Entorn de desenvolupament
$HOME/development/nom_delprojecte | \_Makefile | \_debian
Estructura mínima del Makefile:
clean: #només en llenguatges compilats build: #copiar els fitxers de l'entorn de producció (path relatius a l'usuari) al sistema (segons estàndard FHS) install:
El podeu obtenir amb subversion:
$ svn co http://www.iesebre.com/subversion/projectes/bashdebianesqueleton/
El fitxer (a data --acacha 16:35, 25 feb 2011 (UTC)) és:
#!/usr/bin/make -f # This makefile has to be in a folder with name # APLICATIONNAME_in_lower_case-VERSION_in_lover_case # Example: bashdebianesqueleton-0.1 APLICATION_NAME=bashdebianesqueleton VERSION=0.1 #DEVELOPER ENVIRONMENT VARIABLES: DEBIAN_PACKAGE_CREATOR_FULLNAME=Sergi Tur Badenas [email protected] DEBIAN_PACKAGE_LICENSE=gpl3 #INSTALL OPTIONS OWNER=root GROUP=root INSTALL=/usr/bin/install SHAREDIR=usr/share/$(APLICATION_NAME) DOCDIR=usr/share/doc/$(APLICATION_NAME) #... #TODO clean: install: mkdir -p $(DESTDIR)/$(DOCDIR) $(INSTALL) -o $(OWNER) -g $(GROUP) -m 644 $(DOCDIR)/TODO $(DESTDIR)/$(DOCDIR) uninstall: rm -f $(DOCDIR) install_dev_tools: /usr/bin/apt-get -y --force-yes install dh-make fakeroot \ build-essential devscripts debhelper build_workspace: export DEBFULLNAME="$(DEBIAN_PACKAGE_CREATOR_FULLNAME)"; \ /usr/bin/dh_make -e $(DEBIAN_PACKAGE_CREATOR_EMAIL) \ --packagename $(APLICATION_NAME) --createorig --single debian: /usr/bin/dpkg-buildpackage
a hyphen–minus (-), specifying that errors are ignored an at sign (@), specifying that the command is not printed to standard output before it is executed a plus sign (+), the command is executed even if Make is invoked in a "do not execute" mode
Quan desenvolupem un Makefile, ens podem trobar un problema ja que la seva execució s'atura en cas que es trobe algun error. A vegades, ens pot interessar que salte els errors i continue en la execució. Això es fa introduint el caràcter "-" davant de la comanda.
-mv /nom_fitxer /desti
Així, encara que no existeixi el fitxer, la execució del Makefile continuarà.
NOTA: Algunes comandes com mv, cp, rm tenen opcions per a continuar i no mostrar error. En aquests casos no fa falta utilitzar el "-", algunes altres no tenen aquesta opció, i ens pot interessar utilitzar-lo