Article View: es.comp.os.linux.programacion
Article #14993Re: Acerca del archivo makefile
From: J.A. Gutierrez
Date: Fri, 01 Sep 2000 10:46
Date: Fri, 01 Sep 2000 10:46
68 lines
3001 bytes
3001 bytes
Santiago Romero <sromero@unix-shells.com> wrote: : El Thu, 31 Aug 2000 10:19:55 +0200, Antoni Merelles-Tormo escribi�: :> :>Alguien sabe d�nde puedo encontrar informaci�n (castellano ?) :>sobre el contenido del archivo makefile, qu� significa cada cosa :>de las que all� aparece, como constuirlos ... : te pego un makefile de un programa mio a ver si asi te queda : mas claro que hacen. Este implemente el make, make install, make : clean, y make uninstall: <modo tocapelotas> : #!/bin/sh ^^^^^^^^ Me lo explique. Que pinta eso en un Makefile? : install: : @echo INSTALL: : @if [ ! -f $(EXE) ]; then \ : echo "First compile the program with using the make command."; \ : fi no seria mas facil (y adecuado) haber puesto install: $(EXE) ? : @echo Installing executable on $(DESTBINPATH) ... : @if [ -f $(DESTBINPATH)$(EXE) ]; then \ : rm -f $(DESTBINPATH)$(EXE); \ se suele hacer mas "mv $(EXE) $(EXE).old" Aun hay algunos unix que no permiten eliminar el fichero de un ejecutable que esta en uso; y ademas puede interesar volver a la version anterior. : fi : @cp $(EXE) $(DESTBINPATH)/ cp? y los permisos? y los propietarios? : clean: : @echo CLEAN: : @echo Deleting the $(EXE) binary ... : @if [ -f $(EXE) ]; then \ : rm -f $(EXE); \ : fi por que el "if"? si no existe, el rm -f no se queja ni hace nada... </modo tocapelotas> Respecto a la pregunta original, si te preocupa saber que va a hacer "make install", la solucion es facil: haces "make -n install" y si te gusta lo que ves, haces "make install" tranquilo. -- PGP and other useless info at \ Oh, show us the way http://www.cps.unizar.es/~spd/ \ to the next whisky bar finger://daphne.cps.unizar.es/spd \ Weill/Bretch es doloroso ser sabio y descubrir la sopa de ajo (Pla)
Technical Details
Message-ID:
<8oo1do$3pi$1@news.unizar.es>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!news.rediris.es!news.unizar.es!not-for-mailReferences:
<39AE152B.F4333F14@uv.es> <slrn8qt70o.ms.sromero@compiler.dhis.org>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,e82f0fb9d1fed054
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2000-09-01 03:39:39 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-east!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.icl.net!newsfeeds.belnet.be!naxos.belnet.be!news.belnet.be!news.rediris.es!news.unizar.es!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Acerca del archivo makefile
Date: 1 Sep 2000 10:46:16 GMT
Organization: Rank
Lines: 68
Message-ID: <8oo1do$3pi$1@news.unizar.es>
References: <39AE152B.F4333F14@uv.es> <slrn8qt70o.ms.sromero@compiler.dhis.org>
NNTP-Posting-Host: daphne.cps.unizar.es
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: news.unizar.es 967805176 3890 155.210.152.20 (1 Sep 2000 10:46:16 GMT)
X-Complaints-To: usenet@news.unizar.es
NNTP-Posting-Date: 1 Sep 2000 10:46:16 GMT
User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (IRIX/6.2 (IP22))