2
0

automake.info-2 318 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185
  1. This is automake.info, produced by makeinfo version 6.1 from
  2. automake.texi.
  3. This manual is for GNU Automake (version 1.15.1, 17 June 2017), a
  4. program that creates GNU standards-compliant Makefiles from template
  5. files.
  6. Copyright © 1995-2017 Free Software Foundation, Inc.
  7. Permission is granted to copy, distribute and/or modify this
  8. document under the terms of the GNU Free Documentation License,
  9. Version 1.3 or any later version published by the Free Software
  10. Foundation; with no Invariant Sections, with no Front-Cover texts,
  11. and with no Back-Cover Texts. A copy of the license is included in
  12. the section entitled “GNU Free Documentation License.”
  13. INFO-DIR-SECTION Software development
  14. START-INFO-DIR-ENTRY
  15. * Automake: (automake). Making GNU standards-compliant Makefiles.
  16. END-INFO-DIR-ENTRY
  17. INFO-DIR-SECTION Individual utilities
  18. START-INFO-DIR-ENTRY
  19. * aclocal-invocation: (automake)aclocal Invocation. Generating aclocal.m4.
  20. * automake-invocation: (automake)automake Invocation. Generating Makefile.in.
  21. END-INFO-DIR-ENTRY
  22. 
  23. File: automake.info, Node: Staged Installs, Next: Install Rules for the User, Prev: Extending Installation, Up: Install
  24. 12.4 Staged Installs
  25. ====================
  26. Automake generates support for the ‘DESTDIR’ variable in all install
  27. rules. ‘DESTDIR’ is used during the ‘make install’ step to relocate
  28. install objects into a staging area. Each object and path is prefixed
  29. with the value of ‘DESTDIR’ before being copied into the install area.
  30. Here is an example of typical DESTDIR usage:
  31. mkdir /tmp/staging &&
  32. make DESTDIR=/tmp/staging install
  33. The ‘mkdir’ command avoids a security problem if the attacker creates
  34. a symbolic link from ‘/tmp/staging’ to a victim area; then ‘make’ places
  35. install objects in a directory tree built under ‘/tmp/staging’. If
  36. ‘/gnu/bin/foo’ and ‘/gnu/share/aclocal/foo.m4’ are to be installed, the
  37. above command would install ‘/tmp/staging/gnu/bin/foo’ and
  38. ‘/tmp/staging/gnu/share/aclocal/foo.m4’.
  39. This feature is commonly used to build install images and packages
  40. (*note DESTDIR::).
  41. Support for ‘DESTDIR’ is implemented by coding it directly into the
  42. install rules. If your ‘Makefile.am’ uses a local install rule (e.g.,
  43. ‘install-exec-local’) or an install hook, then you must write that code
  44. to respect ‘DESTDIR’.
  45. *Note (standards)Makefile Conventions::, for another usage example.
  46. 
  47. File: automake.info, Node: Install Rules for the User, Prev: Staged Installs, Up: Install
  48. 12.5 Install Rules for the User
  49. ===============================
  50. Automake also generates rules for targets ‘uninstall’, ‘installdirs’,
  51. and ‘install-strip’.
  52. Automake supports ‘uninstall-local’ and ‘uninstall-hook’. There is
  53. no notion of separate uninstalls for “exec” and “data”, as these
  54. features would not provide additional functionality.
  55. Note that ‘uninstall’ is not meant as a replacement for a real
  56. packaging tool.
  57. 
  58. File: automake.info, Node: Clean, Next: Dist, Prev: Install, Up: Top
  59. 13 What Gets Cleaned
  60. ********************
  61. The GNU Makefile Standards specify a number of different clean rules.
  62. *Note Standard Targets for Users: (standards)Standard Targets.
  63. Generally the files that can be cleaned are determined automatically
  64. by Automake. Of course, Automake also recognizes some variables that
  65. can be defined to specify additional files to clean. These variables
  66. are ‘MOSTLYCLEANFILES’, ‘CLEANFILES’, ‘DISTCLEANFILES’, and
  67. ‘MAINTAINERCLEANFILES’.
  68. When cleaning involves more than deleting some hard-coded list of
  69. files, it is also possible to supplement the cleaning rules with your
  70. own commands. Simply define a rule for any of the ‘mostlyclean-local’,
  71. ‘clean-local’, ‘distclean-local’, or ‘maintainer-clean-local’ targets
  72. (*note Extending::). A common case is deleting a directory, for
  73. instance, a directory created by the test suite:
  74. clean-local:
  75. -rm -rf testSubDir
  76. Since ‘make’ allows only one set of rules for a given target, a more
  77. extensible way of writing this is to use a separate target listed as a
  78. dependency:
  79. clean-local: clean-local-check
  80. .PHONY: clean-local-check
  81. clean-local-check:
  82. -rm -rf testSubDir
  83. As the GNU Standards aren’t always explicit as to which files should
  84. be removed by which rule, we’ve adopted a heuristic that we believe was
  85. first formulated by François Pinard:
  86. • If ‘make’ built it, and it is commonly something that one would
  87. want to rebuild (for instance, a ‘.o’ file), then ‘mostlyclean’
  88. should delete it.
  89. • Otherwise, if ‘make’ built it, then ‘clean’ should delete it.
  90. • If ‘configure’ built it, then ‘distclean’ should delete it.
  91. • If the maintainer built it (for instance, a ‘.info’ file), then
  92. ‘maintainer-clean’ should delete it. However ‘maintainer-clean’
  93. should not delete anything that needs to exist in order to run
  94. ‘./configure && make’.
  95. We recommend that you follow this same set of heuristics in your
  96. ‘Makefile.am’.
  97. 
  98. File: automake.info, Node: Dist, Next: Tests, Prev: Clean, Up: Top
  99. 14 What Goes in a Distribution
  100. ******************************
  101. * Menu:
  102. * Basics of Distribution:: Files distributed by default
  103. * Fine-grained Distribution Control:: ‘dist_’ and ‘nodist_’ prefixes
  104. * The dist Hook:: A target for last-minute distribution changes
  105. * Checking the Distribution:: ‘make distcheck’ explained
  106. * The Types of Distributions:: A variety of formats and compression methods
  107. 
  108. File: automake.info, Node: Basics of Distribution, Next: Fine-grained Distribution Control, Up: Dist
  109. 14.1 Basics of Distribution
  110. ===========================
  111. The ‘dist’ rule in the generated ‘Makefile.in’ can be used to generate a
  112. gzipped ‘tar’ file and other flavors of archive for distribution. The
  113. file is named based on the ‘PACKAGE’ and ‘VERSION’ variables
  114. automatically defined by either the ‘AC_INIT’ invocation or by a
  115. _deprecated_ two-arguments invocation of the ‘AM_INIT_AUTOMAKE’ macro
  116. (see *note Public Macros:: for how these variables get their values,
  117. from either defaults or explicit values – it’s slightly trickier than
  118. one would expect). More precisely the gzipped ‘tar’ file is named
  119. ‘${PACKAGE}-${VERSION}.tar.gz’. You can use the ‘make’ variable
  120. ‘GZIP_ENV’ to control how gzip is run. The default setting is ‘--best’.
  121. For the most part, the files to distribute are automatically found by
  122. Automake: all source files are automatically included in a distribution,
  123. as are all ‘Makefile.am’ and ‘Makefile.in’ files. Automake also has a
  124. built-in list of commonly used files that are automatically included if
  125. they are found in the current directory (either physically, or as the
  126. target of a ‘Makefile.am’ rule); this list is printed by ‘automake
  127. --help’. Note that some files in this list are actually distributed
  128. only if other certain conditions hold (for example, the ‘config.h.top’
  129. and ‘config.h.bot’ files are automatically distributed only if, e.g.,
  130. ‘AC_CONFIG_HEADERS([config.h])’ is used in ‘configure.ac’). Also, files
  131. that are read by ‘configure’ (i.e. the source files corresponding to the
  132. files specified in various Autoconf macros such as ‘AC_CONFIG_FILES’ and
  133. siblings) are automatically distributed. Files included in a
  134. ‘Makefile.am’ (using ‘include’) or in ‘configure.ac’ (using
  135. ‘m4_include’), and helper scripts installed with ‘automake
  136. --add-missing’ are also distributed.
  137. Still, sometimes there are files that must be distributed, but which
  138. are not covered in the automatic rules. These files should be listed in
  139. the ‘EXTRA_DIST’ variable. You can mention files from subdirectories in
  140. ‘EXTRA_DIST’.
  141. You can also mention a directory in ‘EXTRA_DIST’; in this case the
  142. entire directory will be recursively copied into the distribution.
  143. Please note that this will also copy _everything_ in the directory,
  144. including, e.g., Subversion’s ‘.svn’ private directories or CVS/RCS
  145. version control files; thus we recommend against using this feature
  146. as-is. However, you can use the ‘dist-hook’ feature to ameliorate the
  147. problem; *note The dist Hook::.
  148. If you define ‘SUBDIRS’, Automake will recursively include the
  149. subdirectories in the distribution. If ‘SUBDIRS’ is defined
  150. conditionally (*note Conditionals::), Automake will normally include all
  151. directories that could possibly appear in ‘SUBDIRS’ in the distribution.
  152. If you need to specify the set of directories conditionally, you can set
  153. the variable ‘DIST_SUBDIRS’ to the exact list of subdirectories to
  154. include in the distribution (*note Conditional Subdirectories::).
  155. 
  156. File: automake.info, Node: Fine-grained Distribution Control, Next: The dist Hook, Prev: Basics of Distribution, Up: Dist
  157. 14.2 Fine-grained Distribution Control
  158. ======================================
  159. Sometimes you need tighter control over what does _not_ go into the
  160. distribution; for instance, you might have source files that are
  161. generated and that you do not want to distribute. In this case Automake
  162. gives fine-grained control using the ‘dist’ and ‘nodist’ prefixes. Any
  163. primary or ‘_SOURCES’ variable can be prefixed with ‘dist_’ to add the
  164. listed files to the distribution. Similarly, ‘nodist_’ can be used to
  165. omit the files from the distribution.
  166. As an example, here is how you would cause some data to be
  167. distributed while leaving some source code out of the distribution:
  168. dist_data_DATA = distribute-this
  169. bin_PROGRAMS = foo
  170. nodist_foo_SOURCES = do-not-distribute.c
  171. 
  172. File: automake.info, Node: The dist Hook, Next: Checking the Distribution, Prev: Fine-grained Distribution Control, Up: Dist
  173. 14.3 The dist Hook
  174. ==================
  175. Occasionally it is useful to be able to change the distribution before
  176. it is packaged up. If the ‘dist-hook’ rule exists, it is run after the
  177. distribution directory is filled, but before the actual distribution
  178. archives are created. One way to use this is for removing unnecessary
  179. files that get recursively included by specifying a directory in
  180. ‘EXTRA_DIST’:
  181. EXTRA_DIST = doc
  182. dist-hook:
  183. rm -rf `find $(distdir)/doc -type d -name .svn`
  184. Note that the ‘dist-hook’ recipe shouldn’t assume that the regular files
  185. in the distribution directory are writable; this might not be the case
  186. if one is packaging from a read-only source tree, or when a ‘make
  187. distcheck’ is being done. For similar reasons, the recipe shouldn’t
  188. assume that the subdirectories put into the distribution directory as
  189. effect of having them listed in ‘EXTRA_DIST’ are writable. So, if the
  190. ‘dist-hook’ recipe wants to modify the content of an existing file (or
  191. ‘EXTRA_DIST’ subdirectory) in the distribution directory, it should
  192. explicitly to make it writable first:
  193. EXTRA_DIST = README doc
  194. dist-hook:
  195. chmod u+w $(distdir)/README $(distdir)/doc
  196. echo "Distribution date: `date`" >> README
  197. rm -f $(distdir)/doc/HACKING
  198. Two variables that come handy when writing ‘dist-hook’ rules are
  199. ‘$(distdir)’ and ‘$(top_distdir)’.
  200. ‘$(distdir)’ points to the directory where the ‘dist’ rule will copy
  201. files from the current directory before creating the tarball. If you
  202. are at the top-level directory, then ‘distdir = $(PACKAGE)-$(VERSION)’.
  203. When used from subdirectory named ‘foo/’, then ‘distdir =
  204. ../$(PACKAGE)-$(VERSION)/foo’. ‘$(distdir)’ can be a relative or
  205. absolute path, do not assume any form.
  206. ‘$(top_distdir)’ always points to the root directory of the
  207. distributed tree. At the top-level it’s equal to ‘$(distdir)’. In the
  208. ‘foo/’ subdirectory ‘top_distdir = ../$(PACKAGE)-$(VERSION)’.
  209. ‘$(top_distdir)’ too can be a relative or absolute path.
  210. Note that when packages are nested using ‘AC_CONFIG_SUBDIRS’ (*note
  211. Subpackages::), then ‘$(distdir)’ and ‘$(top_distdir)’ are relative to
  212. the package where ‘make dist’ was run, not to any sub-packages involved.
  213. 
  214. File: automake.info, Node: Checking the Distribution, Next: The Types of Distributions, Prev: The dist Hook, Up: Dist
  215. 14.4 Checking the Distribution
  216. ==============================
  217. Automake also generates a ‘distcheck’ rule that can be of help to ensure
  218. that a given distribution will actually work. Simplifying a bit, we can
  219. say this rule first makes a distribution, and then, _operating from it_,
  220. takes the following steps:
  221. • tries to do a ‘VPATH’ build (*note VPATH Builds::), with the
  222. ‘srcdir’ and all its content made _read-only_;
  223. • runs the test suite (with ‘make check’) on this fresh build;
  224. • installs the package in a temporary directory (with ‘make
  225. install’), and tries runs the test suite on the resulting
  226. installation (with ‘make installcheck’);
  227. • checks that the package can be correctly uninstalled (by ‘make
  228. uninstall’) and cleaned (by ‘make distclean’);
  229. • finally, makes another tarball to ensure the distribution is
  230. self-contained.
  231. All of these actions are performed in a temporary directory. Please
  232. note that the exact location and the exact structure of such a directory
  233. (where the read-only sources are placed, how the temporary build and
  234. install directories are named and how deeply they are nested, etc.) is
  235. to be considered an implementation detail, which can change at any time;
  236. so do not reply on it.
  237. DISTCHECK_CONFIGURE_FLAGS
  238. -------------------------
  239. Building the package involves running ‘./configure’. If you need to
  240. supply additional flags to ‘configure’, define them in the
  241. ‘AM_DISTCHECK_CONFIGURE_FLAGS’ variable in your top-level ‘Makefile.am’.
  242. The user can still extend or override the flags provided there by
  243. defining the ‘DISTCHECK_CONFIGURE_FLAGS’ variable, on the command line
  244. when invoking ‘make’. It’s worth nothing that ‘make distcheck’ needs
  245. complete control over the ‘configure’ options ‘--srcdir’ and ‘--prefix’,
  246. so those options cannot be overridden by ‘AM_DISTCHECK_CONFIGURE_FLAGS’
  247. nor by ‘DISTCHECK_CONFIGURE_FLAGS’.
  248. Also note that developers are encouraged to strive to make their code
  249. buildable without requiring any special configure option; thus, in
  250. general, you shouldn’t define ‘AM_DISTCHECK_CONFIGURE_FLAGS’. However,
  251. there might be few scenarios in which the use of this variable is
  252. justified. GNU ‘m4’ offers an example. GNU ‘m4’ configures by default
  253. with its experimental and seldom used "changeword" feature disabled; so
  254. in its case it is useful to have ‘make distcheck’ run configure with the
  255. ‘--with-changeword’ option, to ensure that the code for changeword
  256. support still compiles correctly. GNU ‘m4’ also employs the
  257. ‘AM_DISTCHECK_CONFIGURE_FLAGS’ variable to stress-test the use of
  258. ‘--program-prefix=g’, since at one point the ‘m4’ build system had a bug
  259. where ‘make installcheck’ was wrongly assuming it could blindly test
  260. "‘m4’", rather than the just-installed "‘gm4’".
  261. distcheck-hook
  262. --------------
  263. If the ‘distcheck-hook’ rule is defined in your top-level ‘Makefile.am’,
  264. then it will be invoked by ‘distcheck’ after the new distribution has
  265. been unpacked, but before the unpacked copy is configured and built.
  266. Your ‘distcheck-hook’ can do almost anything, though as always caution
  267. is advised. Generally this hook is used to check for potential
  268. distribution errors not caught by the standard mechanism. Note that
  269. ‘distcheck-hook’ as well as ‘AM_DISTCHECK_CONFIGURE_FLAGS’ and
  270. ‘DISTCHECK_CONFIGURE_FLAGS’ are not honored in a subpackage
  271. ‘Makefile.am’, but the flags from ‘AM_DISTCHECK_CONFIGURE_FLAGS’ and
  272. ‘DISTCHECK_CONFIGURE_FLAGS’ are passed down to the ‘configure’ script of
  273. the subpackage.
  274. distcleancheck
  275. --------------
  276. Speaking of potential distribution errors, ‘distcheck’ also ensures that
  277. the ‘distclean’ rule actually removes all built files. This is done by
  278. running ‘make distcleancheck’ at the end of the ‘VPATH’ build. By
  279. default, ‘distcleancheck’ will run ‘distclean’ and then make sure the
  280. build tree has been emptied by running ‘$(distcleancheck_listfiles)’.
  281. Usually this check will find generated files that you forgot to add to
  282. the ‘DISTCLEANFILES’ variable (*note Clean::).
  283. The ‘distcleancheck’ behavior should be OK for most packages,
  284. otherwise you have the possibility to override the definition of either
  285. the ‘distcleancheck’ rule, or the ‘$(distcleancheck_listfiles)’
  286. variable. For instance, to disable ‘distcleancheck’ completely, add the
  287. following rule to your top-level ‘Makefile.am’:
  288. distcleancheck:
  289. @:
  290. If you want ‘distcleancheck’ to ignore built files that have not been
  291. cleaned because they are also part of the distribution, add the
  292. following definition instead:
  293. distcleancheck_listfiles = \
  294. find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
  295. sh '{}' ';'
  296. The above definition is not the default because it’s usually an error
  297. if your Makefiles cause some distributed files to be rebuilt when the
  298. user build the package. (Think about the user missing the tool required
  299. to build the file; or if the required tool is built by your package,
  300. consider the cross-compilation case where it can’t be run.) There is an
  301. entry in the FAQ about this (*note Errors with distclean::), make sure
  302. you read it before playing with ‘distcleancheck_listfiles’.
  303. distuninstallcheck
  304. ------------------
  305. ‘distcheck’ also checks that the ‘uninstall’ rule works properly, both
  306. for ordinary and ‘DESTDIR’ builds. It does this by invoking ‘make
  307. uninstall’, and then it checks the install tree to see if any files are
  308. left over. This check will make sure that you correctly coded your
  309. ‘uninstall’-related rules.
  310. By default, the checking is done by the ‘distuninstallcheck’ rule,
  311. and the list of files in the install tree is generated by
  312. ‘$(distuninstallcheck_listfiles)’ (this is a variable whose value is a
  313. shell command to run that prints the list of files to stdout).
  314. Either of these can be overridden to modify the behavior of
  315. ‘distcheck’. For instance, to disable this check completely, you would
  316. write:
  317. distuninstallcheck:
  318. @:
  319. 
  320. File: automake.info, Node: The Types of Distributions, Prev: Checking the Distribution, Up: Dist
  321. 14.5 The Types of Distributions
  322. ===============================
  323. Automake generates rules to provide archives of the project for
  324. distributions in various formats. Their targets are:
  325. ‘dist-gzip’
  326. Generate a ‘gzip’ tar archive of the distribution. This is the
  327. only format enabled by default.
  328. ‘dist-bzip2’
  329. Generate a ‘bzip2’ tar archive of the distribution. bzip2 archives
  330. are frequently smaller than gzipped archives. By default, this
  331. rule makes ‘bzip2’ use a compression option of ‘-9’. To make it
  332. use a different one, set the ‘BZIP2’ environment variable. For
  333. example, ‘make dist-bzip2 BZIP2=-7’.
  334. ‘dist-lzip’
  335. Generate an ‘lzip’ tar archive of the distribution. ‘lzip’
  336. archives are frequently smaller than ‘bzip2’-compressed archives.
  337. ‘dist-xz’
  338. Generate an ‘xz’ tar archive of the distribution. ‘xz’ archives
  339. are frequently smaller than ‘bzip2’-compressed archives. By
  340. default, this rule makes ‘xz’ use a compression option of ‘-e’. To
  341. make it use a different one, set the ‘XZ_OPT’ environment variable.
  342. For example, run this command to use the default compression ratio,
  343. but with a progress indicator: ‘make dist-xz XZ_OPT=-ve’.
  344. ‘dist-zip’
  345. Generate a ‘zip’ archive of the distribution.
  346. ‘dist-tarZ’
  347. Generate a tar archive of the distribution, compressed with the
  348. historical (and obsolescent) program ‘compress’. This option is
  349. deprecated, and it and the corresponding functionality will be
  350. removed altogether in Automake 2.0.
  351. ‘dist-shar’
  352. Generate a ‘shar’ archive of the distribution. This format archive
  353. is obsolescent, and use of this option is deprecated. It and the
  354. corresponding functionality will be removed altogether in Automake
  355. 2.0.
  356. The rule ‘dist’ (and its historical synonym ‘dist-all’) will create
  357. archives in all the enabled formats (*note List of Automake options::
  358. for how to change this list). By default, only the ‘dist-gzip’ target
  359. is hooked to ‘dist’.
  360. 
  361. File: automake.info, Node: Tests, Next: Rebuilding, Prev: Dist, Up: Top
  362. 15 Support for test suites
  363. **************************
  364. Automake can generate code to handle two kinds of test suites. One is
  365. based on integration with the ‘dejagnu’ framework. The other (and most
  366. used) form is based on the use of generic test scripts, and its
  367. activation is triggered by the definition of the special ‘TESTS’
  368. variable. This second form allows for various degrees of sophistication
  369. and customization; in particular, it allows for concurrent execution of
  370. test scripts, use of established test protocols such as TAP, and
  371. definition of custom test drivers and test runners.
  372. In either case, the testsuite is invoked via ‘make check’.
  373. * Menu:
  374. * Generalities about Testing:: Concepts and terminology about testing
  375. * Simple Tests:: Listing test scripts in ‘TESTS’
  376. * Custom Test Drivers:: Writing and using custom test drivers
  377. * Using the TAP test protocol:: Integrating test scripts that use the TAP protocol
  378. * DejaGnu Tests:: Interfacing with the ‘dejagnu’ testing framework
  379. * Install Tests:: Running tests on installed packages
  380. 
  381. File: automake.info, Node: Generalities about Testing, Next: Simple Tests, Up: Tests
  382. 15.1 Generalities about Testing
  383. ===============================
  384. The purpose of testing is to determine whether a program or system
  385. behaves as expected (e.g., known inputs produce the expected outputs,
  386. error conditions are correctly handled or reported, and older bugs do
  387. not resurface).
  388. The minimal unit of testing is usually called _test case_, or simply
  389. _test_. How a test case is defined or delimited, and even what exactly
  390. _constitutes_ a test case, depends heavily on the testing paradigm
  391. and/or framework in use, so we won’t attempt any more precise
  392. definition. The set of the test cases for a given program or system
  393. constitutes its _testsuite_.
  394. A _test harness_ (also _testsuite harness_) is a program or software
  395. component that executes all (or part of) the defined test cases,
  396. analyzes their outcomes, and report or register these outcomes
  397. appropriately. Again, the details of how this is accomplished (and how
  398. the developer and user can influence it or interface with it) varies
  399. wildly, and we’ll attempt no precise definition.
  400. A test is said to _pass_ when it can determine that the condition or
  401. behaviour it means to verify holds, and is said to _fail_ when it can
  402. determine that such condition of behaviour does _not_ hold.
  403. Sometimes, tests can rely on non-portable tools or prerequisites, or
  404. simply make no sense on a given system (for example, a test checking a
  405. Windows-specific feature makes no sense on a GNU/Linux system). In this
  406. case, accordingly to the definition above, the tests can neither be
  407. considered passed nor failed; instead, they are _skipped_ – i.e., they
  408. are not run, or their result is anyway ignored for what concerns the
  409. count of failures an successes. Skips are usually explicitly reported
  410. though, so that the user will be aware that not all of the testsuite has
  411. really run.
  412. It’s not uncommon, especially during early development stages, that
  413. some tests fail for known reasons, and that the developer doesn’t want
  414. to tackle these failures immediately (this is especially true when the
  415. failing tests deal with corner cases). In this situation, the better
  416. policy is to declare that each of those failures is an _expected
  417. failure_ (or _xfail_). In case a test that is expected to fail ends up
  418. passing instead, many testing environments will flag the result as a
  419. special kind of failure called _unexpected pass_ (or _xpass_).
  420. Many testing environments and frameworks distinguish between test
  421. failures and hard errors. As we’ve seen, a test failure happens when
  422. some invariant or expected behaviour of the software under test is not
  423. met. An _hard error_ happens when e.g., the set-up of a test case
  424. scenario fails, or when some other unexpected or highly undesirable
  425. condition is encountered (for example, the program under test
  426. experiences a segmentation fault).
  427. 
  428. File: automake.info, Node: Simple Tests, Next: Custom Test Drivers, Prev: Generalities about Testing, Up: Tests
  429. 15.2 Simple Tests
  430. =================
  431. * Menu:
  432. * Scripts-based Testsuites:: Automake-specific concepts and terminology
  433. * Serial Test Harness:: Older (and discouraged) serial test harness
  434. * Parallel Test Harness:: Generic concurrent test harness
  435. 
  436. File: automake.info, Node: Scripts-based Testsuites, Next: Serial Test Harness, Up: Simple Tests
  437. 15.2.1 Scripts-based Testsuites
  438. -------------------------------
  439. If the special variable ‘TESTS’ is defined, its value is taken to be a
  440. list of programs or scripts to run in order to do the testing. Under
  441. the appropriate circumstances, it’s possible for ‘TESTS’ to list also
  442. data files to be passed to one or more test scripts defined by different
  443. means (the so-called “log compilers”, *note Parallel Test Harness::).
  444. Test scripts can be executed serially or concurrently. Automake
  445. supports both these kinds of test execution, with the parallel test
  446. harness being the default. The concurrent test harness relies on the
  447. concurrence capabilities (if any) offered by the underlying ‘make’
  448. implementation, and can thus only be as good as those are.
  449. By default, only the exit statuses of the test scripts are considered
  450. when determining the testsuite outcome. But Automake allows also the
  451. use of more complex test protocols, either standard (*note Using the TAP
  452. test protocol::) or custom (*note Custom Test Drivers::). Note that you
  453. can’t enable such protocols when the serial harness is used, though. In
  454. the rest of this section we are going to concentrate mostly on
  455. protocol-less tests, since we cover test protocols in a later section
  456. (again, *note Custom Test Drivers::).
  457. When no test protocol is in use, an exit status of 0 from a test
  458. script will denote a success, an exit status of 77 a skipped test, an
  459. exit status of 99 an hard error, and any other exit status will denote a
  460. failure.
  461. You may define the variable ‘XFAIL_TESTS’ to a list of tests (usually
  462. a subset of ‘TESTS’) that are expected to fail; this will effectively
  463. reverse the result of those tests (with the provision that skips and
  464. hard errors remain untouched). You may also instruct the testsuite
  465. harness to treat hard errors like simple failures, by defining the
  466. ‘DISABLE_HARD_ERRORS’ make variable to a nonempty value.
  467. Note however that, for tests based on more complex test protocols,
  468. the exact effects of ‘XFAIL_TESTS’ and ‘DISABLE_HARD_ERRORS’ might
  469. change, or they might even have no effect at all (for example, in tests
  470. using TAP, there is not way to disable hard errors, and the
  471. ‘DISABLE_HARD_ERRORS’ variable has no effect on them).
  472. The result of each test case run by the scripts in ‘TESTS’ will be
  473. printed on standard output, along with the test name. For test
  474. protocols that allow more test cases per test script (such as TAP), a
  475. number, identifier and/or brief description specific for the single test
  476. case is expected to be printed in addition to the name of the test
  477. script. The possible results (whose meanings should be clear from the
  478. previous *note Generalities about Testing::) are ‘PASS’, ‘FAIL’, ‘SKIP’,
  479. ‘XFAIL’, ‘XPASS’ and ‘ERROR’. Here is an example of output from an
  480. hypothetical testsuite that uses both plain and TAP tests:
  481. PASS: foo.sh
  482. PASS: zardoz.tap 1 - Daemon started
  483. PASS: zardoz.tap 2 - Daemon responding
  484. SKIP: zardoz.tap 3 - Daemon uses /proc # SKIP /proc is not mounted
  485. PASS: zardoz.tap 4 - Daemon stopped
  486. SKIP: bar.sh
  487. PASS: mu.tap 1
  488. XFAIL: mu.tap 2 # TODO frobnication not yet implemented
  489. A testsuite summary (expected to report at least the number of run,
  490. skipped and failed tests) will be printed at the end of the testsuite
  491. run.
  492. If the standard output is connected to a capable terminal, then the
  493. test results and the summary are colored appropriately. The developer
  494. and the user can disable colored output by setting the ‘make’ variable
  495. ‘AM_COLOR_TESTS=no’; the user can in addition force colored output even
  496. without a connecting terminal with ‘AM_COLOR_TESTS=always’. It’s also
  497. worth noting that some ‘make’ implementations, when used in parallel
  498. mode, have slightly different semantics (*note (autoconf)Parallel
  499. make::), which can break the automatic detection of a connection to a
  500. capable terminal. If this is the case, the user will have to resort to
  501. the use of ‘AM_COLOR_TESTS=always’ in order to have the testsuite output
  502. colorized.
  503. Test programs that need data files should look for them in ‘srcdir’
  504. (which is both a make variable and an environment variable made
  505. available to the tests), so that they work when building in a separate
  506. directory (*note Build Directories: (autoconf)Build Directories.), and
  507. in particular for the ‘distcheck’ rule (*note Checking the
  508. Distribution::).
  509. The ‘AM_TESTS_ENVIRONMENT’ and ‘TESTS_ENVIRONMENT’ variables can be
  510. used to run initialization code and set environment variables for the
  511. test scripts. The former variable is developer-reserved, and can be
  512. defined in the ‘Makefile.am’, while the latter is reserved for the user,
  513. which can employ it to extend or override the settings in the former;
  514. for this to work portably, however, the contents of a non-empty
  515. ‘AM_TESTS_ENVIRONMENT’ _must_ be terminated by a semicolon.
  516. The ‘AM_TESTS_FD_REDIRECT’ variable can be used to define file
  517. descriptor redirections for the test scripts. One might think that
  518. ‘AM_TESTS_ENVIRONMENT’ could be used for this purpose, but experience
  519. has shown that doing so portably is practically impossible. The main
  520. hurdle is constituted by Korn shells, which usually set the
  521. close-on-exec flag on file descriptors opened with the ‘exec’ builtin,
  522. thus rendering an idiom like ‘AM_TESTS_ENVIRONMENT = exec 9>&2;’
  523. ineffectual. This issue also affects some Bourne shells, such as the
  524. HP-UX’s ‘/bin/sh’,
  525. AM_TESTS_ENVIRONMENT = \
  526. ## Some environment initializations are kept in a separate shell
  527. ## file 'tests-env.sh', which can make it easier to also run tests
  528. ## from the command line.
  529. . $(srcdir)/tests-env.sh; \
  530. ## On Solaris, prefer more POSIX-compliant versions of the standard
  531. ## tools by default.
  532. if test -d /usr/xpg4/bin; then \
  533. PATH=/usr/xpg4/bin:$$PATH; export PATH; \
  534. fi;
  535. ## With this, the test scripts will be able to print diagnostic
  536. ## messages to the original standard error stream, even if the test
  537. ## driver redirects the stderr of the test scripts to a log file
  538. ## before executing them.
  539. AM_TESTS_FD_REDIRECT = 9>&2
  540. Note however that ‘AM_TESTS_ENVIRONMENT’ is, for historical and
  541. implementation reasons, _not_ supported by the serial harness (*note
  542. Serial Test Harness::).
  543. Automake ensures that each file listed in ‘TESTS’ is built before it
  544. is run; you can list both source and derived programs (or scripts) in
  545. ‘TESTS’; the generated rule will look both in ‘srcdir’ and ‘.’. For
  546. instance, you might want to run a C program as a test. To do this you
  547. would list its name in ‘TESTS’ and also in ‘check_PROGRAMS’, and then
  548. specify it as you would any other program.
  549. Programs listed in ‘check_PROGRAMS’ (and ‘check_LIBRARIES’,
  550. ‘check_LTLIBRARIES’...) are only built during ‘make check’, not during
  551. ‘make all’. You should list there any program needed by your tests that
  552. does not need to be built by ‘make all’. Note that ‘check_PROGRAMS’ are
  553. _not_ automatically added to ‘TESTS’ because ‘check_PROGRAMS’ usually
  554. lists programs used by the tests, not the tests themselves. Of course
  555. you can set ‘TESTS = $(check_PROGRAMS)’ if all your programs are test
  556. cases.
  557. 
  558. File: automake.info, Node: Serial Test Harness, Next: Parallel Test Harness, Prev: Scripts-based Testsuites, Up: Simple Tests
  559. 15.2.2 Older (and discouraged) serial test harness
  560. --------------------------------------------------
  561. First, note that today the use of this harness is strongly discouraged
  562. in favour of the parallel test harness (*note Parallel Test Harness::).
  563. Still, there are _few_ situations when the advantages offered by the
  564. parallel harness are irrelevant, and when test concurrency can even
  565. cause tricky problems. In those cases, it might make sense to still use
  566. the serial harness, for simplicity and reliability (we still suggest
  567. trying to give the parallel harness a shot though).
  568. The serial test harness is enabled by the Automake option
  569. ‘serial-tests’. It operates by simply running the tests serially, one
  570. at the time, without any I/O redirection. It’s up to the user to
  571. implement logging of tests’ output, if that’s required or desired.
  572. For historical and implementation reasons, the ‘AM_TESTS_ENVIRONMENT’
  573. variable is _not_ supported by this harness (it will be silently ignored
  574. if defined); only ‘TESTS_ENVIRONMENT’ is, and it is to be considered a
  575. developer-reserved variable. This is done so that, when using the
  576. serial harness, ‘TESTS_ENVIRONMENT’ can be defined to an invocation of
  577. an interpreter through which the tests are to be run. For instance, the
  578. following setup may be used to run tests with Perl:
  579. TESTS_ENVIRONMENT = $(PERL) -Mstrict -w
  580. TESTS = foo.pl bar.pl baz.pl
  581. It’s important to note that the use of ‘TESTS_ENVIRONMENT’ endorsed here
  582. would be _invalid_ with the parallel harness. That harness provides a
  583. more elegant way to achieve the same effect, with the further benefit of
  584. freeing the ‘TESTS_ENVIRONMENT’ variable for the user (*note Parallel
  585. Test Harness::).
  586. Another, less serious limit of the serial harness is that it doesn’t
  587. really distinguish between simple failures and hard errors; this is due
  588. to historical reasons only, and might be fixed in future Automake
  589. versions.
  590. 
  591. File: automake.info, Node: Parallel Test Harness, Prev: Serial Test Harness, Up: Simple Tests
  592. 15.2.3 Parallel Test Harness
  593. ----------------------------
  594. By default, Automake generated a parallel (concurrent) test harness. It
  595. features automatic collection of the test scripts output in ‘.log’
  596. files, concurrent execution of tests with ‘make -j’, specification of
  597. inter-test dependencies, lazy reruns of tests that have not completed in
  598. a prior run, and hard errors for exceptional failures.
  599. The parallel test harness operates by defining a set of ‘make’ rules
  600. that run the test scripts listed in ‘TESTS’, and, for each such script,
  601. save its output in a corresponding ‘.log’ file and its results (and
  602. other “metadata”, *note API for Custom Test Drivers::) in a
  603. corresponding ‘.trs’ (as in Test ReSults) file. The ‘.log’ file will
  604. contain all the output emitted by the test on its standard output and
  605. its standard error. The ‘.trs’ file will contain, among the other
  606. things, the results of the test cases run by the script.
  607. The parallel test harness will also create a summary log file,
  608. ‘TEST_SUITE_LOG’, which defaults to ‘test-suite.log’ and requires a
  609. ‘.log’ suffix. This file depends upon all the ‘.log’ and ‘.trs’ files
  610. created for the test scripts listed in ‘TESTS’.
  611. As with the serial harness above, by default one status line is
  612. printed per completed test, and a short summary after the suite has
  613. completed. However, standard output and standard error of the test are
  614. redirected to a per-test log file, so that parallel execution does not
  615. produce intermingled output. The output from failed tests is collected
  616. in the ‘test-suite.log’ file. If the variable ‘VERBOSE’ is set, this
  617. file is output after the summary.
  618. Each couple of ‘.log’ and ‘.trs’ files is created when the
  619. corresponding test has completed. The set of log files is listed in the
  620. read-only variable ‘TEST_LOGS’, and defaults to ‘TESTS’, with the
  621. executable extension if any (*note EXEEXT::), as well as any suffix
  622. listed in ‘TEST_EXTENSIONS’ removed, and ‘.log’ appended. Results are
  623. undefined if a test file name ends in several concatenated suffixes.
  624. ‘TEST_EXTENSIONS’ defaults to ‘.test’; it can be overridden by the user,
  625. in which case any extension listed in it must be constituted by a dot,
  626. followed by a non-digit alphabetic character, followed by any number of
  627. alphabetic characters. For example, ‘.sh’, ‘.T’ and ‘.t1’ are valid
  628. extensions, while ‘.x-y’, ‘.6c’ and ‘.t.1’ are not.
  629. It is important to note that, due to current limitations (unlikely to
  630. be lifted), configure substitutions in the definition of ‘TESTS’ can
  631. only work if they will expand to a list of tests that have a suffix
  632. listed in ‘TEST_EXTENSIONS’.
  633. For tests that match an extension ‘.EXT’ listed in ‘TEST_EXTENSIONS’,
  634. you can provide a custom “test runner” using the variable
  635. ‘EXT_LOG_COMPILER’ (note the upper-case extension) and pass options in
  636. ‘AM_EXT_LOG_FLAGS’ and allow the user to pass options in
  637. ‘EXT_LOG_FLAGS’. It will cause all tests with this extension to be
  638. called with this runner. For all tests without a registered extension,
  639. the variables ‘LOG_COMPILER’, ‘AM_LOG_FLAGS’, and ‘LOG_FLAGS’ may be
  640. used. For example,
  641. TESTS = foo.pl bar.py baz
  642. TEST_EXTENSIONS = .pl .py
  643. PL_LOG_COMPILER = $(PERL)
  644. AM_PL_LOG_FLAGS = -w
  645. PY_LOG_COMPILER = $(PYTHON)
  646. AM_PY_LOG_FLAGS = -v
  647. LOG_COMPILER = ./wrapper-script
  648. AM_LOG_FLAGS = -d
  649. will invoke ‘$(PERL) -w foo.pl’, ‘$(PYTHON) -v bar.py’, and
  650. ‘./wrapper-script -d baz’ to produce ‘foo.log’, ‘bar.log’, and
  651. ‘baz.log’, respectively. The ‘foo.trs’, ‘bar.trs’ and ‘baz.trs’ files
  652. will be automatically produced as a side-effect.
  653. It’s important to note that, differently from what we’ve seen for the
  654. serial test harness (*note Serial Test Harness::), the
  655. ‘AM_TESTS_ENVIRONMENT’ and ‘TESTS_ENVIRONMENT’ variables _cannot_ be use
  656. to define a custom test runner; the ‘LOG_COMPILER’ and ‘LOG_FLAGS’ (or
  657. their extension-specific counterparts) should be used instead:
  658. ## This is WRONG!
  659. AM_TESTS_ENVIRONMENT = PERL5LIB='$(srcdir)/lib' $(PERL) -Mstrict -w
  660. ## Do this instead.
  661. AM_TESTS_ENVIRONMENT = PERL5LIB='$(srcdir)/lib'; export PERL5LIB;
  662. LOG_COMPILER = $(PERL)
  663. AM_LOG_FLAGS = -Mstrict -w
  664. By default, the test suite harness will run all tests, but there are
  665. several ways to limit the set of tests that are run:
  666. • You can set the ‘TESTS’ variable. For example, you can use a
  667. command like this to run only a subset of the tests:
  668. env TESTS="foo.test bar.test" make -e check
  669. Note however that the command above will unconditionally overwrite
  670. the ‘test-suite.log’ file, thus clobbering the recorded results of
  671. any previous testsuite run. This might be undesirable for packages
  672. whose testsuite takes long time to execute. Luckily, this problem
  673. can easily be avoided by overriding also ‘TEST_SUITE_LOG’ at
  674. runtime; for example,
  675. env TEST_SUITE_LOG=partial.log TESTS="..." make -e check
  676. will write the result of the partial testsuite runs to the
  677. ‘partial.log’, without touching ‘test-suite.log’.
  678. • You can set the ‘TEST_LOGS’ variable. By default, this variable is
  679. computed at ‘make’ run time from the value of ‘TESTS’ as described
  680. above. For example, you can use the following:
  681. set x subset*.log; shift
  682. env TEST_LOGS="foo.log $*" make -e check
  683. The comments made above about ‘TEST_SUITE_LOG’ overriding applies
  684. here too.
  685. • By default, the test harness removes all old per-test ‘.log’ and
  686. ‘.trs’ files before it starts running tests to regenerate them.
  687. The variable ‘RECHECK_LOGS’ contains the set of ‘.log’ (and, by
  688. implication, ‘.trs’) files which are removed. ‘RECHECK_LOGS’
  689. defaults to ‘TEST_LOGS’, which means all tests need to be
  690. rechecked. By overriding this variable, you can choose which tests
  691. need to be reconsidered. For example, you can lazily rerun only
  692. those tests which are outdated, i.e., older than their prerequisite
  693. test files, by setting this variable to the empty value:
  694. env RECHECK_LOGS= make -e check
  695. • You can ensure that all tests are rerun which have failed or passed
  696. unexpectedly, by running ‘make recheck’ in the test directory.
  697. This convenience target will set ‘RECHECK_LOGS’ appropriately
  698. before invoking the main test harness.
  699. In order to guarantee an ordering between tests even with ‘make -jN’,
  700. dependencies between the corresponding ‘.log’ files may be specified
  701. through usual ‘make’ dependencies. For example, the following snippet
  702. lets the test named ‘foo-execute.test’ depend upon completion of the
  703. test ‘foo-compile.test’:
  704. TESTS = foo-compile.test foo-execute.test
  705. foo-execute.log: foo-compile.log
  706. Please note that this ordering ignores the _results_ of required tests,
  707. thus the test ‘foo-execute.test’ is run even if the test
  708. ‘foo-compile.test’ failed or was skipped beforehand. Further, please
  709. note that specifying such dependencies currently works only for tests
  710. that end in one of the suffixes listed in ‘TEST_EXTENSIONS’.
  711. Tests without such specified dependencies may be run concurrently
  712. with parallel ‘make -jN’, so be sure they are prepared for concurrent
  713. execution.
  714. The combination of lazy test execution and correct dependencies
  715. between tests and their sources may be exploited for efficient unit
  716. testing during development. To further speed up the edit-compile-test
  717. cycle, it may even be useful to specify compiled programs in
  718. ‘EXTRA_PROGRAMS’ instead of with ‘check_PROGRAMS’, as the former allows
  719. intertwined compilation and test execution (but note that
  720. ‘EXTRA_PROGRAMS’ are not cleaned automatically, *note Uniform::).
  721. The variables ‘TESTS’ and ‘XFAIL_TESTS’ may contain conditional parts
  722. as well as configure substitutions. In the latter case, however,
  723. certain restrictions apply: substituted test names must end with a
  724. nonempty test suffix like ‘.test’, so that one of the inference rules
  725. generated by ‘automake’ can apply. For literal test names, ‘automake’
  726. can generate per-target rules to avoid this limitation.
  727. Please note that it is currently not possible to use ‘$(srcdir)/’ or
  728. ‘$(top_srcdir)/’ in the ‘TESTS’ variable. This technical limitation is
  729. necessary to avoid generating test logs in the source tree and has the
  730. unfortunate consequence that it is not possible to specify distributed
  731. tests that are themselves generated by means of explicit rules, in a way
  732. that is portable to all ‘make’ implementations (*note (autoconf)Make
  733. Target Lookup::, the semantics of FreeBSD and OpenBSD ‘make’ conflict
  734. with this). In case of doubt you may want to require to use GNU ‘make’,
  735. or work around the issue with inference rules to generate the tests.
  736. 
  737. File: automake.info, Node: Custom Test Drivers, Next: Using the TAP test protocol, Prev: Simple Tests, Up: Tests
  738. 15.3 Custom Test Drivers
  739. ========================
  740. * Menu:
  741. * Overview of Custom Test Drivers Support::
  742. * Declaring Custom Test Drivers::
  743. * API for Custom Test Drivers::
  744. 
  745. File: automake.info, Node: Overview of Custom Test Drivers Support, Next: Declaring Custom Test Drivers, Up: Custom Test Drivers
  746. 15.3.1 Overview of Custom Test Drivers Support
  747. ----------------------------------------------
  748. Starting from Automake version 1.12, the parallel test harness allows
  749. the package authors to use third-party custom test drivers, in case the
  750. default ones are inadequate for their purposes, or do not support their
  751. testing protocol of choice.
  752. A custom test driver is expected to properly run the test programs
  753. passed to it (including the command-line arguments passed to those
  754. programs, if any), to analyze their execution and outcome, to create the
  755. ‘.log’ and ‘.trs’ files associated to these test runs, and to display
  756. the test results on the console. It is responsibility of the author of
  757. the test driver to ensure that it implements all the above steps
  758. meaningfully and correctly; Automake isn’t and can’t be of any help
  759. here. On the other hand, the Automake-provided code for testsuite
  760. summary generation offers support for test drivers allowing several test
  761. results per test script, if they take care to register such results
  762. properly (*note Log files generation and test results recording::).
  763. The exact details of how test scripts’ results are to be determined
  764. and analyzed is left to the individual drivers. Some drivers might only
  765. consider the test script exit status (this is done for example by the
  766. default test driver used by the parallel test harness, described in the
  767. previous section). Other drivers might implement more complex and
  768. advanced test protocols, which might require them to parse and
  769. interpreter the output emitted by the test script they’re running
  770. (examples of such protocols are TAP and SubUnit).
  771. It’s very important to note that, even when using custom test
  772. drivers, most of the infrastructure described in the previous section
  773. about the parallel harness remains in place; this includes:
  774. • list of test scripts defined in ‘TESTS’, and overridable at runtime
  775. through the redefinition of ‘TESTS’ or ‘TEST_LOGS’;
  776. • concurrency through the use of ‘make’’s option ‘-j’;
  777. • per-test ‘.log’ and ‘.trs’ files, and generation of a summary
  778. ‘.log’ file from them;
  779. • ‘recheck’ target, ‘RECHECK_LOGS’ variable, and lazy reruns of
  780. tests;
  781. • inter-test dependencies;
  782. • support for ‘check_*’ variables (‘check_PROGRAMS’,
  783. ‘check_LIBRARIES’, ...);
  784. • use of ‘VERBOSE’ environment variable to get verbose output on
  785. testsuite failures;
  786. • definition and honoring of ‘TESTS_ENVIRONMENT’,
  787. ‘AM_TESTS_ENVIRONMENT’ and ‘AM_TESTS_FD_REDIRECT’ variables;
  788. • definition of generic and extension-specific ‘LOG_COMPILER’ and
  789. ‘LOG_FLAGS’ variables.
  790. On the other hand, the exact semantics of how (and if) testsuite output
  791. colorization, ‘XFAIL_TESTS’, and hard errors are supported and handled
  792. is left to the individual test drivers.
  793. 
  794. File: automake.info, Node: Declaring Custom Test Drivers, Next: API for Custom Test Drivers, Prev: Overview of Custom Test Drivers Support, Up: Custom Test Drivers
  795. 15.3.2 Declaring Custom Test Drivers
  796. ------------------------------------
  797. Custom testsuite drivers are declared by defining the make variables
  798. ‘LOG_DRIVER’ or ‘EXT_LOG_DRIVER’ (where EXT must be declared in
  799. ‘TEST_EXTENSIONS’). They must be defined to programs or scripts that
  800. will be used to drive the execution, logging, and outcome report of the
  801. tests with corresponding extensions (or of those with no registered
  802. extension in the case of ‘LOG_DRIVER’). Clearly, multiple distinct test
  803. drivers can be declared in the same ‘Makefile.am’. Note moreover that
  804. the ‘LOG_DRIVER’ variables are _not_ a substitute for the ‘LOG_COMPILER’
  805. variables: the two sets of variables can, and often do, usefully and
  806. legitimately coexist.
  807. The developer-reserved variable ‘AM_LOG_DRIVER_FLAGS’ and the
  808. user-reserved variable ‘LOG_DRIVER_FLAGS’ can be used to define flags
  809. that will be passed to each invocation of ‘LOG_DRIVER’, with the
  810. user-defined flags obviously taking precedence over the
  811. developer-reserved ones. Similarly, for each extension EXT declared in
  812. ‘TEST_EXTENSIONS’, flags listed in ‘AM_EXT_LOG_DRIVER_FLAGS’ and
  813. ‘EXT_LOG_DRIVER_FLAGS’ will be passed to invocations of
  814. ‘EXT_LOG_DRIVER’.
  815. 
  816. File: automake.info, Node: API for Custom Test Drivers, Prev: Declaring Custom Test Drivers, Up: Custom Test Drivers
  817. 15.3.3 API for Custom Test Drivers
  818. ----------------------------------
  819. Note that _the APIs described here are still highly experimental_, and
  820. will very likely undergo tightenings and likely also extensive changes
  821. in the future, to accommodate for new features or to satisfy additional
  822. portability requirements.
  823. The main characteristic of these APIs is that they are designed to
  824. share as much infrastructure, semantics, and implementation details as
  825. possible with the parallel test harness and its default driver.
  826. * Menu:
  827. * Command-line arguments for test drivers::
  828. * Log files generation and test results recording::
  829. * Testsuite progress output::
  830. 
  831. File: automake.info, Node: Command-line arguments for test drivers, Next: Log files generation and test results recording, Up: API for Custom Test Drivers
  832. 15.3.3.1 Command-line arguments for test drivers
  833. ................................................
  834. A custom driver can rely on various command-line options and arguments
  835. being passed to it automatically by the Automake-generated test harness.
  836. It is _mandatory_ that it understands all of them (even if the exact
  837. interpretation of the associated semantics can legitimately change
  838. between a test driver and another, and even be a no-op in some drivers).
  839. Here is the list of options:
  840. ‘--test-name=NAME’
  841. The name of the test, with VPATH prefix (if any) removed. This can
  842. have a suffix and a directory component (as in e.g.,
  843. ‘sub/foo.test’), and is mostly meant to be used in console reports
  844. about testsuite advancements and results (*note Testsuite progress
  845. output::).
  846. ‘--log-file=PATH.log’
  847. The ‘.log’ file the test driver must create (*note Basics of test
  848. metadata::). If it has a directory component (as in e.g.,
  849. ‘sub/foo.log’), the test harness will ensure that such directory
  850. exists _before_ the test driver is called.
  851. ‘--trs-file=PATH.trs’
  852. The ‘.trs’ file the test driver must create (*note Basics of test
  853. metadata::). If it has a directory component (as in e.g.,
  854. ‘sub/foo.trs’), the test harness will ensure that such directory
  855. exists _before_ the test driver is called.
  856. ‘--color-tests={yes|no}’
  857. Whether the console output should be colorized or not (*note Simple
  858. tests and color-tests::, to learn when this option gets activated
  859. and when it doesn’t).
  860. ‘--expect-failure={yes|no}’
  861. Whether the tested program is expected to fail.
  862. ‘--enable-hard-errors={yes|no}’
  863. Whether “hard errors” in the tested program should be treated
  864. differently from normal failures or not (the default should be
  865. ‘yes’). The exact meaning of “hard error” is highly dependent from
  866. the test protocols or conventions in use.
  867. ‘--’
  868. Explicitly terminate the list of options.
  869. The first non-option argument passed to the test driver is the program
  870. to be run, and all the following ones are command-line options and
  871. arguments for this program.
  872. Note that the exact semantics attached to the ‘--color-tests’,
  873. ‘--expect-failure’ and ‘--enable-hard-errors’ options are left up to the
  874. individual test drivers. Still, having a behaviour compatible or at
  875. least similar to that provided by the default driver is advised, as that
  876. would offer a better consistency and a more pleasant user experience.
  877. 
  878. File: automake.info, Node: Log files generation and test results recording, Next: Testsuite progress output, Prev: Command-line arguments for test drivers, Up: API for Custom Test Drivers
  879. 15.3.3.2 Log files generation and test results recording
  880. ........................................................
  881. The test driver must correctly generate the files specified by the
  882. ‘--log-file’ and ‘--trs-file’ option (even when the tested program fails
  883. or crashes).
  884. The ‘.log’ file should ideally contain all the output produced by the
  885. tested program, plus optionally other information that might facilitate
  886. debugging or analysis of bug reports. Apart from that, its format is
  887. basically free.
  888. The ‘.trs’ file is used to register some metadata through the use of
  889. custom reStructuredText fields. This metadata is expected to be
  890. employed in various ways by the parallel test harness; for example, to
  891. count the test results when printing the testsuite summary, or to decide
  892. which tests to re-run upon ‘make recheck’. Unrecognized metadata in a
  893. ‘.trs’ file is currently ignored by the harness, but this might change
  894. in the future. The list of currently recognized metadata follows.
  895. ‘:test-result:’
  896. The test driver must use this field to register the results of
  897. _each_ test case run by a test script file. Several
  898. ‘:test-result:’ fields can be present in the same ‘.trs’ file; this
  899. is done in order to support test protocols that allow a single test
  900. script to run more test cases.
  901. The only recognized test results are currently ‘PASS’, ‘XFAIL’,
  902. ‘SKIP’, ‘FAIL’, ‘XPASS’ and ‘ERROR’. These results, when declared
  903. with ‘:test-result:’, can be optionally followed by text holding
  904. the name and/or a brief description of the corresponding test; the
  905. harness will ignore such extra text when generating
  906. ‘test-suite.log’ and preparing the testsuite summary.
  907. ‘:recheck:’
  908. If this field is present and defined to ‘no’, then the
  909. corresponding test script will _not_ be run upon a ‘make recheck’.
  910. What happens when two or more ‘:recheck:’ fields are present in the
  911. same ‘.trs’ file is undefined behaviour.
  912. ‘:copy-in-global-log:’
  913. If this field is present and defined to ‘no’, then the content of
  914. the ‘.log’ file will _not_ be copied into the global
  915. ‘test-suite.log’. We allow to forsake such copying because, while
  916. it can be useful in debugging and analysis of bug report, it can
  917. also be just a waste of space in normal situations, e.g., when a
  918. test script is successful. What happens when two or more
  919. ‘:copy-in-global-log:’ fields are present in the same ‘.trs’ file
  920. is undefined behaviour.
  921. ‘:test-global-result:’
  922. This is used to declare the "global result" of the script.
  923. Currently, the value of this field is needed only to be reported
  924. (more or less verbatim) in the generated global log file
  925. ‘$(TEST_SUITE_LOG)’, so it’s quite free-form. For example, a test
  926. script which run 10 test cases, 6 of which pass and 4 of which are
  927. skipped, could reasonably have a ‘PASS/SKIP’ value for this field,
  928. while a test script which run 19 successful tests and one failed
  929. test could have an ‘ALMOST PASSED’ value. What happens when two or
  930. more ‘:test-global-result:’ fields are present in the same ‘.trs’
  931. file is undefined behaviour.
  932. Let’s see a small example. Assume a ‘.trs’ file contains the following
  933. lines:
  934. :test-result: PASS server starts
  935. :global-log-copy: no
  936. :test-result: PASS HTTP/1.1 request
  937. :test-result: FAIL HTTP/1.0 request
  938. :recheck: yes
  939. :test-result: SKIP HTTPS request (TLS library wasn't available)
  940. :test-result: PASS server stops
  941. Then the corresponding test script will be re-run by ‘make check’, will
  942. contribute with _five_ test results to the testsuite summary (three of
  943. these tests being successful, one failed, and one skipped), and the
  944. content of the corresponding ‘.log’ file will _not_ be copied in the
  945. global log file ‘test-suite.log’.
  946. 
  947. File: automake.info, Node: Testsuite progress output, Prev: Log files generation and test results recording, Up: API for Custom Test Drivers
  948. 15.3.3.3 Testsuite progress output
  949. ..................................
  950. A custom test driver also has the task of displaying, on the standard
  951. output, the test results as soon as they become available. Depending on
  952. the protocol in use, it can also display the reasons for failures and
  953. skips, and, more generally, any useful diagnostic output (but remember
  954. that each line on the screen is precious, so that cluttering the screen
  955. with overly verbose information is bad idea). The exact format of this
  956. progress output is left up to the test driver; in fact, a custom test
  957. driver might _theoretically_ even decide not to do any such report,
  958. leaving it all to the testsuite summary (that would be a very lousy
  959. idea, of course, and serves only to illustrate the flexibility that is
  960. granted here).
  961. Remember that consistency is good; so, if possible, try to be
  962. consistent with the output of the built-in Automake test drivers,
  963. providing a similar “look & feel”. In particular, the testsuite
  964. progress output should be colorized when the ‘--color-tests’ is passed
  965. to the driver. On the other end, if you are using a known and
  966. widespread test protocol with well-established implementations, being
  967. consistent with those implementations’ output might be a good idea too.
  968. 
  969. File: automake.info, Node: Using the TAP test protocol, Next: DejaGnu Tests, Prev: Custom Test Drivers, Up: Tests
  970. 15.4 Using the TAP test protocol
  971. ================================
  972. * Menu:
  973. * Introduction to TAP::
  974. * Use TAP with the Automake test harness::
  975. * Incompatibilities with other TAP parsers and drivers::
  976. * Links and external resources on TAP::
  977. 
  978. File: automake.info, Node: Introduction to TAP, Next: Use TAP with the Automake test harness, Up: Using the TAP test protocol
  979. 15.4.1 Introduction to TAP
  980. --------------------------
  981. TAP, the Test Anything Protocol, is a simple text-based interface
  982. between testing modules or programs and a test harness. The tests (also
  983. called “TAP producers” in this context) write test results in a simple
  984. format on standard output; a test harness (also called “TAP consumer”)
  985. will parse and interpret these results, and properly present them to the
  986. user, and/or register them for later analysis. The exact details of how
  987. this is accomplished can vary among different test harnesses. The
  988. Automake harness will present the results on the console in the usual
  989. fashion (*note Testsuite progress on console::), and will use the ‘.trs’
  990. files (*note Basics of test metadata::) to store the test results and
  991. related metadata. Apart from that, it will try to remain as much
  992. compatible as possible with pre-existing and widespread utilities, such
  993. as the ‘prove’ utility
  994. (http://search.cpan.org/~andya/Test-Harness/bin/prove), at least for the
  995. simpler usages.
  996. TAP started its life as part of the test harness for Perl, but today
  997. it has been (mostly) standardized, and has various independent
  998. implementations in different languages; among them, C, C++, Perl,
  999. Python, PHP, and Java. For a semi-official specification of the TAP
  1000. protocol, please refer to the documentation of ‘Test::Harness::TAP’
  1001. (http://search.cpan.org/~petdance/Test-Harness/lib/Test/Harness/TAP.pod).
  1002. The most relevant real-world usages of TAP are obviously in the
  1003. testsuites of ‘perl’ and of many perl modules. Still, also other
  1004. important third-party packages, such as ‘git’ (http://git-scm.com/), use
  1005. TAP in their testsuite.
  1006. 
  1007. File: automake.info, Node: Use TAP with the Automake test harness, Next: Incompatibilities with other TAP parsers and drivers, Prev: Introduction to TAP, Up: Using the TAP test protocol
  1008. 15.4.2 Use TAP with the Automake test harness
  1009. ---------------------------------------------
  1010. Currently, the TAP driver that comes with Automake requires some by-hand
  1011. steps on the developer’s part (this situation should hopefully be
  1012. improved in future Automake versions). You’ll have to grab the
  1013. ‘tap-driver.sh’ script from the Automake distribution by hand, copy it
  1014. in your source tree, and use the Automake support for third-party test
  1015. drivers to instruct the harness to use the ‘tap-driver.sh’ script and
  1016. the awk program found by ‘AM_INIT_AUTOMAKE’ to run your TAP-producing
  1017. tests. See the example below for clarification.
  1018. Apart from the options common to all the Automake test drivers (*note
  1019. Command-line arguments for test drivers::), the ‘tap-driver.sh’ supports
  1020. the following options, whose names are chosen for enhanced compatibility
  1021. with the ‘prove’ utility.
  1022. ‘--ignore-exit’
  1023. Causes the test driver to ignore the exit status of the test
  1024. scripts; by default, the driver will report an error if the script
  1025. exits with a non-zero status. This option has effect also on
  1026. non-zero exit statuses due to termination by a signal.
  1027. ‘--comments’
  1028. Instruct the test driver to display TAP diagnostic (i.e., lines
  1029. beginning with the ‘#’ character) in the testsuite progress output
  1030. too; by default, TAP diagnostic is only copied to the ‘.log’ file.
  1031. ‘--no-comments’
  1032. Revert the effects of ‘--comments’.
  1033. ‘--merge’
  1034. Instruct the test driver to merge the test scripts’ standard error
  1035. into their standard output. This is necessary if you want to
  1036. ensure that diagnostics from the test scripts are displayed in the
  1037. correct order relative to test results; this can be of great help
  1038. in debugging (especially if your test scripts are shell scripts run
  1039. with shell tracing active). As a downside, this option might cause
  1040. the test harness to get confused if anything that appears on
  1041. standard error looks like a test result.
  1042. ‘--no-merge’
  1043. Revert the effects of ‘--merge’.
  1044. ‘--diagnostic-string=STRING’
  1045. Change the string that introduces TAP diagnostic from the default
  1046. value of “‘#’” to ‘STRING’. This can be useful if your TAP-based
  1047. test scripts produce verbose output on which they have limited
  1048. control (because, say, the output comes from other tools invoked in
  1049. the scripts), and it might contain text that gets spuriously
  1050. interpreted as TAP diagnostic: such an issue can be solved by
  1051. redefining the string that activates TAP diagnostic to a value you
  1052. know won’t appear by chance in the tests’ output. Note however
  1053. that this feature is non-standard, as the “official” TAP protocol
  1054. does not allow for such a customization; so don’t use it if you can
  1055. avoid it.
  1056. Here is an example of how the TAP driver can be set up and used.
  1057. % cat configure.ac
  1058. AC_INIT([GNU Try Tap], [1.0], [bug-automake@gnu.org])
  1059. AC_CONFIG_AUX_DIR([build-aux])
  1060. AM_INIT_AUTOMAKE([foreign -Wall -Werror])
  1061. AC_CONFIG_FILES([Makefile])
  1062. AC_REQUIRE_AUX_FILE([tap-driver.sh])
  1063. AC_OUTPUT
  1064. % cat Makefile.am
  1065. TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
  1066. $(top_srcdir)/build-aux/tap-driver.sh
  1067. TESTS = foo.test bar.test baz.test
  1068. EXTRA_DIST = $(TESTS)
  1069. % cat foo.test
  1070. #!/bin/sh
  1071. echo 1..4 # Number of tests to be executed.
  1072. echo 'ok 1 - Swallows fly'
  1073. echo 'not ok 2 - Caterpillars fly # TODO metamorphosis in progress'
  1074. echo 'ok 3 - Pigs fly # SKIP not enough acid'
  1075. echo '# I just love word plays ...'
  1076. echo 'ok 4 - Flies fly too :-)'
  1077. % cat bar.test
  1078. #!/bin/sh
  1079. echo 1..3
  1080. echo 'not ok 1 - Bummer, this test has failed.'
  1081. echo 'ok 2 - This passed though.'
  1082. echo 'Bail out! Ennui kicking in, sorry...'
  1083. echo 'ok 3 - This will not be seen.'
  1084. % cat baz.test
  1085. #!/bin/sh
  1086. echo 1..1
  1087. echo ok 1
  1088. # Exit with error, even if all the tests have been successful.
  1089. exit 7
  1090. % cp PREFIX/share/automake-APIVERSION/tap-driver.sh .
  1091. % autoreconf -vi && ./configure && make check
  1092. ...
  1093. PASS: foo.test 1 - Swallows fly
  1094. XFAIL: foo.test 2 - Caterpillars fly # TODO metamorphosis in progress
  1095. SKIP: foo.test 3 - Pigs fly # SKIP not enough acid
  1096. PASS: foo.test 4 - Flies fly too :-)
  1097. FAIL: bar.test 1 - Bummer, this test has failed.
  1098. PASS: bar.test 2 - This passed though.
  1099. ERROR: bar.test - Bail out! Ennui kicking in, sorry...
  1100. PASS: baz.test 1
  1101. ERROR: baz.test - exited with status 7
  1102. ...
  1103. Please report to bug-automake@gnu.org
  1104. ...
  1105. % echo exit status: $?
  1106. exit status: 1
  1107. % env TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit' \
  1108. TESTS='foo.test baz.test' make -e check
  1109. ...
  1110. PASS: foo.test 1 - Swallows fly
  1111. XFAIL: foo.test 2 - Caterpillars fly # TODO metamorphosis in progress
  1112. SKIP: foo.test 3 - Pigs fly # SKIP not enough acid
  1113. # foo.test: I just love word plays...
  1114. PASS: foo.test 4 - Flies fly too :-)
  1115. PASS: baz.test 1
  1116. ...
  1117. % echo exit status: $?
  1118. exit status: 0
  1119. 
  1120. File: automake.info, Node: Incompatibilities with other TAP parsers and drivers, Next: Links and external resources on TAP, Prev: Use TAP with the Automake test harness, Up: Using the TAP test protocol
  1121. 15.4.3 Incompatibilities with other TAP parsers and drivers
  1122. -----------------------------------------------------------
  1123. For implementation or historical reasons, the TAP driver and harness as
  1124. implemented by Automake have some minors incompatibilities with the
  1125. mainstream versions, which you should be aware of.
  1126. • A ‘Bail out!’ directive doesn’t stop the whole testsuite, but only
  1127. the test script it occurs in. This doesn’t follow TAP
  1128. specifications, but on the other hand it maximizes compatibility
  1129. (and code sharing) with the “hard error” concept of the default
  1130. testsuite driver.
  1131. • The ‘version’ and ‘pragma’ directives are not supported.
  1132. • The ‘--diagnostic-string’ option of our driver allows to modify the
  1133. string that introduces TAP diagnostic from the default value of
  1134. “‘#’”. The standard TAP protocol has currently no way to allow
  1135. this, so if you use it your diagnostic will be lost to more
  1136. compliant tools like ‘prove’ and ‘Test::Harness’
  1137. • And there are probably some other small and yet undiscovered
  1138. incompatibilities, especially in corner cases or with rare usages.
  1139. 
  1140. File: automake.info, Node: Links and external resources on TAP, Prev: Incompatibilities with other TAP parsers and drivers, Up: Using the TAP test protocol
  1141. 15.4.4 Links and external resources on TAP
  1142. ------------------------------------------
  1143. Here are some links to more extensive official or third-party
  1144. documentation and resources about the TAP protocol and related tools and
  1145. libraries.
  1146. • ‘Test::Harness::TAP’
  1147. (http://search.cpan.org/~petdance/Test-Harness/lib/Test/Harness/TAP.pod),
  1148. the (mostly) official documentation about the TAP format and
  1149. protocol.
  1150. • ‘prove’ (http://search.cpan.org/~andya/Test-Harness/bin/prove),
  1151. the most famous command-line TAP test driver, included in the
  1152. distribution of ‘perl’ and ‘Test::Harness’
  1153. (http://search.cpan.org/~andya/Test-Harness/lib/Test/Harness.pm).
  1154. • The TAP wiki (http://testanything.org/wiki/index.php/Main_Page).
  1155. • A “gentle introduction” to testing for perl coders:
  1156. ‘Test::Tutorial’
  1157. (http://search.cpan.org/dist/Test-Simple/lib/Test/Tutorial.pod).
  1158. • ‘Test::Simple’
  1159. (http://search.cpan.org/~mschwern/Test-Simple/lib/Test/Simple.pm)
  1160. and ‘Test::More’
  1161. (http://search.cpan.org/~mschwern/Test-Simple/lib/Test/More.pm),
  1162. the standard perl testing libraries, which are based on TAP.
  1163. • C TAP Harness
  1164. (http://www.eyrie.org/~eagle/software/c-tap-harness/), a C-based
  1165. project implementing both a TAP producer and a TAP consumer.
  1166. • tap4j (http://www.tap4j.org/), a Java-based project implementing
  1167. both a TAP producer and a TAP consumer.
  1168. 
  1169. File: automake.info, Node: DejaGnu Tests, Next: Install Tests, Prev: Using the TAP test protocol, Up: Tests
  1170. 15.5 DejaGnu Tests
  1171. ==================
  1172. If ‘dejagnu’ (ftp://ftp.gnu.org/gnu/dejagnu/) appears in
  1173. ‘AUTOMAKE_OPTIONS’, then a ‘dejagnu’-based test suite is assumed. The
  1174. variable ‘DEJATOOL’ is a list of names that are passed, one at a time,
  1175. as the ‘--tool’ argument to ‘runtest’ invocations; it defaults to the
  1176. name of the package.
  1177. The variable ‘RUNTESTDEFAULTFLAGS’ holds the ‘--tool’ and ‘--srcdir’
  1178. flags that are passed to dejagnu by default; this can be overridden if
  1179. necessary.
  1180. The variables ‘EXPECT’ and ‘RUNTEST’ can also be overridden to
  1181. provide project-specific values. For instance, you will need to do this
  1182. if you are testing a compiler toolchain, because the default values do
  1183. not take into account host and target names.
  1184. The contents of the variable ‘RUNTESTFLAGS’ are passed to the
  1185. ‘runtest’ invocation. This is considered a “user variable” (*note User
  1186. Variables::). If you need to set ‘runtest’ flags in ‘Makefile.am’, you
  1187. can use ‘AM_RUNTESTFLAGS’ instead.
  1188. Automake will generate rules to create a local ‘site.exp’ file,
  1189. defining various variables detected by ‘configure’. This file is
  1190. automatically read by DejaGnu. It is OK for the user of a package to
  1191. edit this file in order to tune the test suite. However this is not the
  1192. place where the test suite author should define new variables: this
  1193. should be done elsewhere in the real test suite code. Especially,
  1194. ‘site.exp’ should not be distributed.
  1195. Still, if the package author has legitimate reasons to extend
  1196. ‘site.exp’ at ‘make’ time, he can do so by defining the variable
  1197. ‘EXTRA_DEJAGNU_SITE_CONFIG’; the files listed there will be considered
  1198. ‘site.exp’ prerequisites, and their content will be appended to it (in
  1199. the same order in which they appear in ‘EXTRA_DEJAGNU_SITE_CONFIG’).
  1200. Note that files are _not_ distributed by default.
  1201. For more information regarding DejaGnu test suites, see *note
  1202. (dejagnu)Top::.
  1203. 
  1204. File: automake.info, Node: Install Tests, Prev: DejaGnu Tests, Up: Tests
  1205. 15.6 Install Tests
  1206. ==================
  1207. The ‘installcheck’ target is available to the user as a way to run any
  1208. tests after the package has been installed. You can add tests to this
  1209. by writing an ‘installcheck-local’ rule.
  1210. 
  1211. File: automake.info, Node: Rebuilding, Next: Options, Prev: Tests, Up: Top
  1212. 16 Rebuilding Makefiles
  1213. ***********************
  1214. Automake generates rules to automatically rebuild ‘Makefile’s,
  1215. ‘configure’, and other derived files like ‘Makefile.in’.
  1216. If you are using ‘AM_MAINTAINER_MODE’ in ‘configure.ac’, then these
  1217. automatic rebuilding rules are only enabled in maintainer mode.
  1218. Sometimes it is convenient to supplement the rebuild rules for
  1219. ‘configure’ or ‘config.status’ with additional dependencies. The
  1220. variables ‘CONFIGURE_DEPENDENCIES’ and ‘CONFIG_STATUS_DEPENDENCIES’ can
  1221. be used to list these extra dependencies. These variables should be
  1222. defined in all ‘Makefile’s of the tree (because these two rebuild rules
  1223. are output in all them), so it is safer and easier to ‘AC_SUBST’ them
  1224. from ‘configure.ac’. For instance, the following statement will cause
  1225. ‘configure’ to be rerun each time ‘version.sh’ is changed.
  1226. AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh'])
  1227. Note the ‘$(top_srcdir)/’ in the file name. Since this variable is to
  1228. be used in all ‘Makefile’s, its value must be sensible at any level in
  1229. the build hierarchy.
  1230. Beware not to mistake ‘CONFIGURE_DEPENDENCIES’ for
  1231. ‘CONFIG_STATUS_DEPENDENCIES’.
  1232. ‘CONFIGURE_DEPENDENCIES’ adds dependencies to the ‘configure’ rule,
  1233. whose effect is to run ‘autoconf’. This variable should be seldom used,
  1234. because ‘automake’ already tracks ‘m4_include’d files. However it can
  1235. be useful when playing tricky games with ‘m4_esyscmd’ or similar
  1236. non-recommendable macros with side effects. Be also aware that
  1237. interactions of this variable with the *note autom4te cache:
  1238. (autoconf)Autom4te Cache. are quite problematic and can cause subtle
  1239. breakage, so you might want to disable the cache if you want to use
  1240. ‘CONFIGURE_DEPENDENCIES’.
  1241. ‘CONFIG_STATUS_DEPENDENCIES’ adds dependencies to the ‘config.status’
  1242. rule, whose effect is to run ‘configure’. This variable should
  1243. therefore carry any non-standard source that may be read as a side
  1244. effect of running ‘configure’, like ‘version.sh’ in the example above.
  1245. Speaking of ‘version.sh’ scripts, we recommend against them today.
  1246. They are mainly used when the version of a package is updated
  1247. automatically by a script (e.g., in daily builds). Here is what some
  1248. old-style ‘configure.ac’s may look like:
  1249. AC_INIT
  1250. . $srcdir/version.sh
  1251. AM_INIT_AUTOMAKE([name], $VERSION_NUMBER)
  1252. ...
  1253. Here, ‘version.sh’ is a shell fragment that sets ‘VERSION_NUMBER’. The
  1254. problem with this example is that ‘automake’ cannot track dependencies
  1255. (listing ‘version.sh’ in ‘CONFIG_STATUS_DEPENDENCIES’, and distributing
  1256. this file is up to the user), and that it uses the obsolete form of
  1257. ‘AC_INIT’ and ‘AM_INIT_AUTOMAKE’. Upgrading to the new syntax is not
  1258. straightforward, because shell variables are not allowed in ‘AC_INIT’’s
  1259. arguments. We recommend that ‘version.sh’ be replaced by an M4 file
  1260. that is included by ‘configure.ac’:
  1261. m4_include([version.m4])
  1262. AC_INIT([name], VERSION_NUMBER)
  1263. AM_INIT_AUTOMAKE
  1264. ...
  1265. Here ‘version.m4’ could contain something like
  1266. ‘m4_define([VERSION_NUMBER], [1.2])’. The advantage of this second form
  1267. is that ‘automake’ will take care of the dependencies when defining the
  1268. rebuild rule, and will also distribute the file automatically. An
  1269. inconvenience is that ‘autoconf’ will now be rerun each time the version
  1270. number is bumped, when only ‘configure’ had to be rerun in the previous
  1271. setup.
  1272. 
  1273. File: automake.info, Node: Options, Next: Miscellaneous, Prev: Rebuilding, Up: Top
  1274. 17 Changing Automake’s Behavior
  1275. *******************************
  1276. * Menu:
  1277. * Options generalities:: Semantics of Automake option
  1278. * List of Automake options:: A comprehensive list of Automake options
  1279. 
  1280. File: automake.info, Node: Options generalities, Next: List of Automake options, Up: Options
  1281. 17.1 Options generalities
  1282. =========================
  1283. Various features of Automake can be controlled by options. Except where
  1284. noted otherwise, options can be specified in one of several ways. Most
  1285. options can be applied on a per-‘Makefile’ basis when listed in a
  1286. special ‘Makefile’ variable named ‘AUTOMAKE_OPTIONS’. Some of these
  1287. options only make sense when specified in the toplevel ‘Makefile.am’
  1288. file. Options are applied globally to all processed ‘Makefile’ files
  1289. when listed in the first argument of ‘AM_INIT_AUTOMAKE’ in
  1290. ‘configure.ac’, and some options which require changes to the
  1291. ‘configure’ script can only be specified there. These are annotated
  1292. below.
  1293. As a general rule, options specified in ‘AUTOMAKE_OPTIONS’ take
  1294. precedence over those specified in ‘AM_INIT_AUTOMAKE’, which in turn
  1295. take precedence over those specified on the command line.
  1296. Also, some care must be taken about the interactions among strictness
  1297. level and warning categories. As a general rule, strictness-implied
  1298. warnings are overridden by those specified by explicit options. For
  1299. example, even if ‘portability’ warnings are disabled by default in
  1300. ‘foreign’ strictness, an usage like this will end up enabling them:
  1301. AUTOMAKE_OPTIONS = -Wportability foreign
  1302. However, a strictness level specified in a higher-priority context
  1303. will override all the explicit warnings specified in a lower-priority
  1304. context. For example, if ‘configure.ac’ contains:
  1305. AM_INIT_AUTOMAKE([-Wportability])
  1306. and ‘Makefile.am’ contains:
  1307. AUTOMAKE_OPTIONS = foreign
  1308. then ‘portability’ warnings will be _disabled_ in ‘Makefile.am’.
  1309. 
  1310. File: automake.info, Node: List of Automake options, Prev: Options generalities, Up: Options
  1311. 17.2 List of Automake options
  1312. =============================
  1313. ‘gnits’
  1314. ‘gnu’
  1315. ‘foreign’
  1316. Set the strictness as appropriate. The ‘gnits’ option also implies
  1317. options ‘readme-alpha’ and ‘check-news’.
  1318. ‘check-news’
  1319. Cause ‘make dist’ to fail unless the current version number appears
  1320. in the first few lines of the ‘NEWS’ file.
  1321. ‘dejagnu’
  1322. Cause ‘dejagnu’-specific rules to be generated. *Note DejaGnu
  1323. Tests::.
  1324. ‘dist-bzip2’
  1325. Hook ‘dist-bzip2’ to ‘dist’.
  1326. ‘dist-lzip’
  1327. Hook ‘dist-lzip’ to ‘dist’.
  1328. ‘dist-xz’
  1329. Hook ‘dist-xz’ to ‘dist’.
  1330. ‘dist-zip’
  1331. Hook ‘dist-zip’ to ‘dist’.
  1332. ‘dist-shar’
  1333. Hook ‘dist-shar’ to ‘dist’. Use of this option is deprecated, as
  1334. the ‘shar’ format is obsolescent and problematic. Support for it
  1335. will be removed altogether in Automake 2.0.
  1336. ‘dist-tarZ’
  1337. Hook ‘dist-tarZ’ to ‘dist’. Use of this option is deprecated, as
  1338. the ‘compress’ program is obsolete. Support for it will be removed
  1339. altogether in Automake 2.0.
  1340. ‘filename-length-max=99’
  1341. Abort if file names longer than 99 characters are found during
  1342. ‘make dist’. Such long file names are generally considered not to
  1343. be portable in tarballs. See the ‘tar-v7’ and ‘tar-ustar’ options
  1344. below. This option should be used in the top-level ‘Makefile.am’
  1345. or as an argument of ‘AM_INIT_AUTOMAKE’ in ‘configure.ac’, it will
  1346. be ignored otherwise. It will also be ignored in sub-packages of
  1347. nested packages (*note Subpackages::).
  1348. ‘info-in-builddir’
  1349. Instruct Automake to place the generated ‘.info’ files in the
  1350. ‘builddir’ rather than in the ‘srcdir’. Note that this might make
  1351. VPATH builds with some non-GNU make implementations more brittle.
  1352. ‘no-define’
  1353. This option is meaningful only when passed as an argument to
  1354. ‘AM_INIT_AUTOMAKE’. It will prevent the ‘PACKAGE’ and ‘VERSION’
  1355. variables from being ‘AC_DEFINE’d. But notice that they will
  1356. remain defined as shell variables in the generated ‘configure’, and
  1357. as make variables in the generated ‘Makefile’; this is deliberate,
  1358. and required for backward compatibility.
  1359. ‘no-dependencies’
  1360. This is similar to using ‘--ignore-deps’ on the command line, but
  1361. is useful for those situations where you don’t have the necessary
  1362. bits to make automatic dependency tracking work (*note
  1363. Dependencies::). In this case the effect is to effectively disable
  1364. automatic dependency tracking.
  1365. ‘no-dist’
  1366. Don’t emit any code related to ‘dist’ target. This is useful when
  1367. a package has its own method for making distributions.
  1368. ‘no-dist-gzip’
  1369. Do not hook ‘dist-gzip’ to ‘dist’.
  1370. ‘no-exeext’
  1371. If your ‘Makefile.am’ defines a rule for target ‘foo’, it will
  1372. override a rule for a target named ‘foo$(EXEEXT)’. This is
  1373. necessary when ‘EXEEXT’ is found to be empty. However, by default
  1374. ‘automake’ will generate an error for this use. The ‘no-exeext’
  1375. option will disable this error. This is intended for use only
  1376. where it is known in advance that the package will not be ported to
  1377. Windows, or any other operating system using extensions on
  1378. executables.
  1379. ‘no-installinfo’
  1380. The generated ‘Makefile.in’ will not cause info pages to be built
  1381. or installed by default. However, ‘info’ and ‘install-info’
  1382. targets will still be available. This option is disallowed at
  1383. ‘gnu’ strictness and above.
  1384. ‘no-installman’
  1385. The generated ‘Makefile.in’ will not cause man pages to be
  1386. installed by default. However, an ‘install-man’ target will still
  1387. be available for optional installation. This option is disallowed
  1388. at ‘gnu’ strictness and above.
  1389. ‘nostdinc’
  1390. This option can be used to disable the standard ‘-I’ options that
  1391. are ordinarily automatically provided by Automake.
  1392. ‘no-texinfo.tex’
  1393. Don’t require ‘texinfo.tex’, even if there are texinfo files in
  1394. this directory.
  1395. ‘serial-tests’
  1396. Enable the older serial test suite harness for ‘TESTS’ (*note
  1397. Serial Test Harness::, for more information).
  1398. ‘parallel-tests’
  1399. Enable test suite harness for ‘TESTS’ that can run tests in
  1400. parallel (*note Parallel Test Harness::, for more information).
  1401. This option is only kept for backward-compatibility, since the
  1402. parallel test harness is the default now.
  1403. ‘readme-alpha’
  1404. If this release is an alpha release, and the file ‘README-alpha’
  1405. exists, then it will be added to the distribution. If this option
  1406. is given, version numbers are expected to follow one of two forms.
  1407. The first form is ‘MAJOR.MINOR.ALPHA’, where each element is a
  1408. number; the final period and number should be left off for
  1409. non-alpha releases. The second form is ‘MAJOR.MINORALPHA’, where
  1410. ALPHA is a letter; it should be omitted for non-alpha releases.
  1411. ‘std-options’
  1412. Make the ‘installcheck’ rule check that installed scripts and
  1413. programs support the ‘--help’ and ‘--version’ options. This also
  1414. provides a basic check that the program’s run-time dependencies are
  1415. satisfied after installation.
  1416. In a few situations, programs (or scripts) have to be exempted from
  1417. this test. For instance, ‘false’ (from GNU coreutils) is never
  1418. successful, even for ‘--help’ or ‘--version’. You can list such
  1419. programs in the variable ‘AM_INSTALLCHECK_STD_OPTIONS_EXEMPT’.
  1420. Programs (not scripts) listed in this variable should be suffixed
  1421. by ‘$(EXEEXT)’ for the sake of Windows or OS/2. For instance,
  1422. suppose we build ‘false’ as a program but ‘true.sh’ as a script,
  1423. and that neither of them support ‘--help’ or ‘--version’:
  1424. AUTOMAKE_OPTIONS = std-options
  1425. bin_PROGRAMS = false ...
  1426. bin_SCRIPTS = true.sh ...
  1427. AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = false$(EXEEXT) true.sh
  1428. ‘subdir-objects’
  1429. If this option is specified, then objects are placed into the
  1430. subdirectory of the build directory corresponding to the
  1431. subdirectory of the source file. For instance, if the source file
  1432. is ‘subdir/file.cxx’, then the output file would be
  1433. ‘subdir/file.o’.
  1434. ‘tar-v7’
  1435. ‘tar-ustar’
  1436. ‘tar-pax’
  1437. These three mutually exclusive options select the tar format to use
  1438. when generating tarballs with ‘make dist’. (The tar file created
  1439. is then compressed according to the set of ‘no-dist-gzip’,
  1440. ‘dist-bzip2’, ‘dist-lzip’, ‘dist-xz’ and ‘dist-tarZ’ options in
  1441. use.)
  1442. These options must be passed as arguments to ‘AM_INIT_AUTOMAKE’
  1443. (*note Macros::) because they can require additional configure
  1444. checks. Automake will complain if it sees such options in an
  1445. ‘AUTOMAKE_OPTIONS’ variable.
  1446. ‘tar-v7’ selects the old V7 tar format. This is the historical
  1447. default. This antiquated format is understood by all tar
  1448. implementations and supports file names with up to 99 characters.
  1449. When given longer file names some tar implementations will diagnose
  1450. the problem while other will generate broken tarballs or use
  1451. non-portable extensions. Furthermore, the V7 format cannot store
  1452. empty directories. When using this format, consider using the
  1453. ‘filename-length-max=99’ option to catch file names too long.
  1454. ‘tar-ustar’ selects the ustar format defined by POSIX 1003.1-1988.
  1455. This format is believed to be old enough to be portable. It fully
  1456. supports empty directories. It can store file names with up to 256
  1457. characters, provided that the file name can be split at directory
  1458. separator in two parts, first of them being at most 155 bytes long.
  1459. So, in most cases the maximum file name length will be shorter than
  1460. 256 characters. However you may run against broken tar
  1461. implementations that incorrectly handle file names longer than 99
  1462. characters (please report them to <bug-automake@gnu.org> so we can
  1463. document this accurately).
  1464. ‘tar-pax’ selects the new pax interchange format defined by POSIX
  1465. 1003.1-2001. It does not limit the length of file names. However,
  1466. this format is very young and should probably be restricted to
  1467. packages that target only very modern platforms. There are moves
  1468. to change the pax format in an upward-compatible way, so this
  1469. option may refer to a more recent version in the future.
  1470. *Note Controlling the Archive Format: (tar)Formats, for further
  1471. discussion about tar formats.
  1472. ‘configure’ knows several ways to construct these formats. It will
  1473. not abort if it cannot find a tool up to the task (so that the
  1474. package can still be built), but ‘make dist’ will fail.
  1475. VERSION
  1476. A version number (e.g., ‘0.30’) can be specified. If Automake is
  1477. not newer than the version specified, creation of the ‘Makefile.in’
  1478. will be suppressed.
  1479. ‘-WCATEGORY’ or ‘--warnings=CATEGORY’
  1480. These options behave exactly like their command-line counterpart
  1481. (*note automake Invocation::). This allows you to enable or
  1482. disable some warning categories on a per-file basis. You can also
  1483. setup some warnings for your entire project; for instance, try
  1484. ‘AM_INIT_AUTOMAKE([-Wall])’ in your ‘configure.ac’.
  1485. Unrecognized options are diagnosed by ‘automake’.
  1486. If you want an option to apply to all the files in the tree, you can
  1487. use the ‘AM_INIT_AUTOMAKE’ macro in ‘configure.ac’. *Note Macros::.
  1488. 
  1489. File: automake.info, Node: Miscellaneous, Next: Include, Prev: Options, Up: Top
  1490. 18 Miscellaneous Rules
  1491. **********************
  1492. There are a few rules and variables that didn’t fit anywhere else.
  1493. * Menu:
  1494. * Tags:: Interfacing to cscope, etags and mkid
  1495. * Suffixes:: Handling new file extensions
  1496. 
  1497. File: automake.info, Node: Tags, Next: Suffixes, Up: Miscellaneous
  1498. 18.1 Interfacing to ‘etags’
  1499. ===========================
  1500. Automake will generate rules to generate ‘TAGS’ files for use with GNU
  1501. Emacs under some circumstances.
  1502. If any C, C++ or Fortran 77 source code or headers are present, then
  1503. ‘tags’ and ‘TAGS’ rules will be generated for the directory. All files
  1504. listed using the ‘_SOURCES’, ‘_HEADERS’, and ‘_LISP’ primaries will be
  1505. used to generate tags. Note that generated source files that are not
  1506. distributed must be declared in variables like ‘nodist_noinst_HEADERS’
  1507. or ‘nodist_PROG_SOURCES’ or they will be ignored.
  1508. A ‘tags’ rule will be output at the topmost directory of a
  1509. multi-directory package. When run from this topmost directory, ‘make
  1510. tags’ will generate a ‘TAGS’ file that includes by reference all ‘TAGS’
  1511. files from subdirectories.
  1512. The ‘tags’ rule will also be generated if the variable ‘ETAGS_ARGS’
  1513. is defined. This variable is intended for use in directories that
  1514. contain taggable source that ‘etags’ does not understand. The user can
  1515. use the ‘ETAGSFLAGS’ to pass additional flags to ‘etags’;
  1516. ‘AM_ETAGSFLAGS’ is also available for use in ‘Makefile.am’.
  1517. Here is how Automake generates tags for its source, and for nodes in
  1518. its Texinfo file:
  1519. ETAGS_ARGS = automake.in --lang=none \
  1520. --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
  1521. If you add file names to ‘ETAGS_ARGS’, you will probably also want to
  1522. define ‘TAGS_DEPENDENCIES’. The contents of this variable are added
  1523. directly to the dependencies for the ‘tags’ rule.
  1524. Automake also generates a ‘ctags’ rule that can be used to build
  1525. ‘vi’-style ‘tags’ files. The variable ‘CTAGS’ is the name of the
  1526. program to invoke (by default ‘ctags’); ‘CTAGSFLAGS’ can be used by the
  1527. user to pass additional flags, and ‘AM_CTAGSFLAGS’ can be used by the
  1528. ‘Makefile.am’.
  1529. Automake will also generate an ‘ID’ rule that will run ‘mkid’ on the
  1530. source. This is only supported on a directory-by-directory basis.
  1531. Similarly, the ‘cscope’ rule will create a list of all the source
  1532. files in the tree and run ‘cscope’ to build an inverted index database.
  1533. The variable ‘CSCOPE’ is the name of the program to invoke (by default
  1534. ‘cscope’); ‘CSCOPEFLAGS’ and ‘CSCOPE_ARGS’ can be used by the user to
  1535. pass additional flags and file names respectively, while
  1536. ‘AM_CSCOPEFLAGS’ can be used by the ‘Makefile.am’. Note that,
  1537. currently, the Automake-provided ‘cscope’ support, when used in a VPATH
  1538. build, might not work well with non-GNU make implementations (especially
  1539. with make implementations performing *note VPATH rewrites:
  1540. (autoconf)Automatic Rule Rewriting.).
  1541. Finally, Automake also emits rules to support the GNU Global Tags
  1542. program (http://www.gnu.org/software/global/). The ‘GTAGS’ rule runs
  1543. Global Tags and puts the result in the top build directory. The
  1544. variable ‘GTAGS_ARGS’ holds arguments that are passed to ‘gtags’.
  1545. 
  1546. File: automake.info, Node: Suffixes, Prev: Tags, Up: Miscellaneous
  1547. 18.2 Handling new file extensions
  1548. =================================
  1549. It is sometimes useful to introduce a new implicit rule to handle a file
  1550. type that Automake does not know about.
  1551. For instance, suppose you had a compiler that could compile ‘.foo’
  1552. files to ‘.o’ files. You would simply define a suffix rule for your
  1553. language:
  1554. .foo.o:
  1555. foocc -c -o $@ $<
  1556. Then you could directly use a ‘.foo’ file in a ‘_SOURCES’ variable
  1557. and expect the correct results:
  1558. bin_PROGRAMS = doit
  1559. doit_SOURCES = doit.foo
  1560. This was the simpler and more common case. In other cases, you will
  1561. have to help Automake to figure out which extensions you are defining
  1562. your suffix rule for. This usually happens when your extension does not
  1563. start with a dot. Then, all you have to do is to put a list of new
  1564. suffixes in the ‘SUFFIXES’ variable *before* you define your implicit
  1565. rule.
  1566. For instance, the following definition prevents Automake from
  1567. misinterpreting the ‘.idlC.cpp:’ rule as an attempt to transform ‘.idlC’
  1568. files into ‘.cpp’ files.
  1569. SUFFIXES = .idl C.cpp
  1570. .idlC.cpp:
  1571. # whatever
  1572. As you may have noted, the ‘SUFFIXES’ variable behaves like the
  1573. ‘.SUFFIXES’ special target of ‘make’. You should not touch ‘.SUFFIXES’
  1574. yourself, but use ‘SUFFIXES’ instead and let Automake generate the
  1575. suffix list for ‘.SUFFIXES’. Any given ‘SUFFIXES’ go at the start of
  1576. the generated suffixes list, followed by Automake generated suffixes not
  1577. already in the list.
  1578. 
  1579. File: automake.info, Node: Include, Next: Conditionals, Prev: Miscellaneous, Up: Top
  1580. 19 Include
  1581. **********
  1582. Automake supports an ‘include’ directive that can be used to include
  1583. other ‘Makefile’ fragments when ‘automake’ is run. Note that these
  1584. fragments are read and interpreted by ‘automake’, not by ‘make’. As
  1585. with conditionals, ‘make’ has no idea that ‘include’ is in use.
  1586. There are two forms of ‘include’:
  1587. ‘include $(srcdir)/file’
  1588. Include a fragment that is found relative to the current source
  1589. directory.
  1590. ‘include $(top_srcdir)/file’
  1591. Include a fragment that is found relative to the top source
  1592. directory.
  1593. Note that if a fragment is included inside a conditional, then the
  1594. condition applies to the entire contents of that fragment.
  1595. Makefile fragments included this way are always distributed because
  1596. they are needed to rebuild ‘Makefile.in’.
  1597. Inside a fragment, the construct ‘%reldir%’ is replaced with the
  1598. directory of the fragment relative to the base ‘Makefile.am’.
  1599. Similarly, ‘%canon_reldir%’ is replaced with the canonicalized (*note
  1600. Canonicalization::) form of ‘%reldir%’. As a convenience, ‘%D%’ is a
  1601. synonym for ‘%reldir%’, and ‘%C%’ is a synonym for ‘%canon_reldir%’.
  1602. A special feature is that if the fragment is in the same directory as
  1603. the base ‘Makefile.am’ (i.e., ‘%reldir%’ is ‘.’), then ‘%reldir%’ and
  1604. ‘%canon_reldir%’ will expand to the empty string as well as eat, if
  1605. present, a following slash or underscore respectively.
  1606. Thus, a makefile fragment might look like this:
  1607. bin_PROGRAMS += %reldir%/mumble
  1608. %canon_reldir%_mumble_SOURCES = %reldir%/one.c
  1609. 
  1610. File: automake.info, Node: Conditionals, Next: Silencing Make, Prev: Include, Up: Top
  1611. 20 Conditionals
  1612. ***************
  1613. Automake supports a simple type of conditionals.
  1614. These conditionals are not the same as conditionals in GNU Make.
  1615. Automake conditionals are checked at configure time by the ‘configure’
  1616. script, and affect the translation from ‘Makefile.in’ to ‘Makefile’.
  1617. They are based on options passed to ‘configure’ and on results that
  1618. ‘configure’ has discovered about the host system. GNU Make conditionals
  1619. are checked at ‘make’ time, and are based on variables passed to the
  1620. make program or defined in the ‘Makefile’.
  1621. Automake conditionals will work with any make program.
  1622. * Menu:
  1623. * Usage of Conditionals:: Declaring conditional content
  1624. * Limits of Conditionals:: Enclosing complete statements
  1625. 
  1626. File: automake.info, Node: Usage of Conditionals, Next: Limits of Conditionals, Up: Conditionals
  1627. 20.1 Usage of Conditionals
  1628. ==========================
  1629. Before using a conditional, you must define it by using ‘AM_CONDITIONAL’
  1630. in the ‘configure.ac’ file (*note Macros::).
  1631. -- Macro: AM_CONDITIONAL (CONDITIONAL, CONDITION)
  1632. The conditional name, CONDITIONAL, should be a simple string
  1633. starting with a letter and containing only letters, digits, and
  1634. underscores. It must be different from ‘TRUE’ and ‘FALSE’ that are
  1635. reserved by Automake.
  1636. The shell CONDITION (suitable for use in a shell ‘if’ statement) is
  1637. evaluated when ‘configure’ is run. Note that you must arrange for
  1638. _every_ ‘AM_CONDITIONAL’ to be invoked every time ‘configure’ is
  1639. run. If ‘AM_CONDITIONAL’ is run conditionally (e.g., in a shell
  1640. ‘if’ statement), then the result will confuse ‘automake’.
  1641. Conditionals typically depend upon options that the user provides to
  1642. the ‘configure’ script. Here is an example of how to write a
  1643. conditional that is true if the user uses the ‘--enable-debug’ option.
  1644. AC_ARG_ENABLE([debug],
  1645. [ --enable-debug Turn on debugging],
  1646. [case "${enableval}" in
  1647. yes) debug=true ;;
  1648. no) debug=false ;;
  1649. *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
  1650. esac],[debug=false])
  1651. AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
  1652. Here is an example of how to use that conditional in ‘Makefile.am’:
  1653. if DEBUG
  1654. DBG = debug
  1655. else
  1656. DBG =
  1657. endif
  1658. noinst_PROGRAMS = $(DBG)
  1659. This trivial example could also be handled using ‘EXTRA_PROGRAMS’
  1660. (*note Conditional Programs::).
  1661. You may only test a single variable in an ‘if’ statement, possibly
  1662. negated using ‘!’. The ‘else’ statement may be omitted. Conditionals
  1663. may be nested to any depth. You may specify an argument to ‘else’ in
  1664. which case it must be the negation of the condition used for the current
  1665. ‘if’. Similarly you may specify the condition that is closed on the
  1666. ‘endif’ line:
  1667. if DEBUG
  1668. DBG = debug
  1669. else !DEBUG
  1670. DBG =
  1671. endif !DEBUG
  1672. Unbalanced conditions are errors. The ‘if’, ‘else’, and ‘endif’
  1673. statements should not be indented, i.e., start on column one.
  1674. The ‘else’ branch of the above two examples could be omitted, since
  1675. assigning the empty string to an otherwise undefined variable makes no
  1676. difference.
  1677. In order to allow access to the condition registered by
  1678. ‘AM_CONDITIONAL’ inside ‘configure.ac’, and to allow conditional
  1679. ‘AC_CONFIG_FILES’, ‘AM_COND_IF’ may be used:
  1680. -- Macro: AM_COND_IF (CONDITIONAL, [IF-TRUE], [IF-FALSE])
  1681. If CONDITIONAL is fulfilled, execute IF-TRUE, otherwise execute
  1682. IF-FALSE. If either branch contains ‘AC_CONFIG_FILES’, it will
  1683. cause ‘automake’ to output the rules for the respective files only
  1684. for the given condition.
  1685. ‘AM_COND_IF’ macros may be nested when m4 quotation is used properly
  1686. (*note (autoconf)M4 Quotation::).
  1687. Here is an example of how to define a conditional config file:
  1688. AM_CONDITIONAL([SHELL_WRAPPER], [test "x$with_wrapper" = xtrue])
  1689. AM_COND_IF([SHELL_WRAPPER],
  1690. [AC_CONFIG_FILES([wrapper:wrapper.in])])
  1691. 
  1692. File: automake.info, Node: Limits of Conditionals, Prev: Usage of Conditionals, Up: Conditionals
  1693. 20.2 Limits of Conditionals
  1694. ===========================
  1695. Conditionals should enclose complete statements like variables or rules
  1696. definitions. Automake cannot deal with conditionals used inside a
  1697. variable definition, for instance, and is not even able to diagnose this
  1698. situation. The following example would not work:
  1699. # This syntax is not understood by Automake
  1700. AM_CPPFLAGS = \
  1701. -DFEATURE_A \
  1702. if WANT_DEBUG
  1703. -DDEBUG \
  1704. endif
  1705. -DFEATURE_B
  1706. However the intended definition of ‘AM_CPPFLAGS’ can be achieved with
  1707. if WANT_DEBUG
  1708. DEBUGFLAGS = -DDEBUG
  1709. endif
  1710. AM_CPPFLAGS = -DFEATURE_A $(DEBUGFLAGS) -DFEATURE_B
  1711. or
  1712. AM_CPPFLAGS = -DFEATURE_A
  1713. if WANT_DEBUG
  1714. AM_CPPFLAGS += -DDEBUG
  1715. endif
  1716. AM_CPPFLAGS += -DFEATURE_B
  1717. More details and examples of conditionals are described alongside
  1718. various Automake features in this manual (*note Conditional
  1719. Subdirectories::, *note Conditional Sources::, *note Conditional
  1720. Programs::, *note Conditional Libtool Libraries::, *note Conditional
  1721. Libtool Sources::).
  1722. 
  1723. File: automake.info, Node: Silencing Make, Next: Gnits, Prev: Conditionals, Up: Top
  1724. 21 Silencing ‘make’
  1725. *******************
  1726. * Menu:
  1727. * Make verbosity:: Make is verbose by default
  1728. * Tricks For Silencing Make:: Standard and generic ways to silence make
  1729. * Automake Silent Rules:: How Automake can help in silencing make
  1730. 
  1731. File: automake.info, Node: Make verbosity, Next: Tricks For Silencing Make, Up: Silencing Make
  1732. 21.1 Make is verbose by default
  1733. ===============================
  1734. Normally, when executing the set of rules associated with a target,
  1735. ‘make’ prints each rule before it is executed. This behaviour, while
  1736. having been in place for a long time, and being even mandated by the
  1737. POSIX standard, starkly violates the “silence is golden” UNIX
  1738. principle(1):
  1739. When a program has nothing interesting or surprising to say, it
  1740. should say nothing. Well-behaved Unix programs do their jobs
  1741. unobtrusively, with a minimum of fuss and bother. Silence is
  1742. golden.
  1743. In fact, while such verbosity of ‘make’ can theoretically be useful
  1744. to track bugs and understand reasons of failures right away, it can also
  1745. hide warning and error messages from ‘make’-invoked tools, drowning them
  1746. in a flood of uninteresting and seldom useful messages, and thus
  1747. allowing them to go easily undetected.
  1748. This problem can be very annoying, especially for developers, who
  1749. usually know quite well what’s going on behind the scenes, and for whom
  1750. the verbose output from ‘make’ ends up being mostly noise that hampers
  1751. the easy detection of potentially important warning messages.
  1752. ---------- Footnotes ----------
  1753. (1) See also <http://catb.org/~esr/writings/taoup/html/ch11s09.html>.
  1754. 
  1755. File: automake.info, Node: Tricks For Silencing Make, Next: Automake Silent Rules, Prev: Make verbosity, Up: Silencing Make
  1756. 21.2 Standard and generic ways to silence make
  1757. ==============================================
  1758. Here we describe some common idioms/tricks to obtain a quieter make
  1759. output, with their relative advantages and drawbacks. In the next
  1760. section (*note Automake Silent Rules::) we’ll see how Automake can help
  1761. in this respect, providing more elaborate and flexible idioms.
  1762. • ‘make -s’
  1763. This simply causes ‘make’ not to print _any_ rule before executing
  1764. it.
  1765. The ‘-s’ flag is mandated by POSIX, universally supported, and its
  1766. purpose and function are easy to understand.
  1767. But it also has its serious limitations too. First of all, it
  1768. embodies an “all or nothing” strategy, i.e., either everything is
  1769. silenced, or nothing is; this lack of granularity can sometimes be
  1770. a fatal flaw. Moreover, when the ‘-s’ flag is used, the ‘make’
  1771. output might turn out to be too much terse; in case of errors, the
  1772. user won’t be able to easily see what rule or command have caused
  1773. them, or even, in case of tools with poor error reporting, what the
  1774. errors were!
  1775. • ‘make >/dev/null || make’
  1776. Apparently, this perfectly obeys the “silence is golden” rule:
  1777. warnings from stderr are passed through, output reporting is done
  1778. only in case of error, and in that case it should provide a
  1779. verbose-enough report to allow an easy determination of the error
  1780. location and causes.
  1781. However, calling ‘make’ two times in a row might hide errors
  1782. (especially intermittent ones), or subtly change the expected
  1783. semantic of the ‘make’ calls — things these which can clearly make
  1784. debugging and error assessment very difficult.
  1785. • ‘make --no-print-directory’
  1786. This is GNU ‘make’ specific. When called with the
  1787. ‘--no-print-directory’ option, GNU ‘make’ will disable printing of
  1788. the working directory by invoked sub-‘make’s (the well-known
  1789. “Entering/Leaving directory ...” messages). This helps to decrease
  1790. the verbosity of the output, but experience has shown that it can
  1791. also often render debugging considerably harder in projects using
  1792. deeply-nested ‘make’ recursion.
  1793. As an aside, notice that the ‘--no-print-directory’ option is
  1794. automatically activated if the ‘-s’ flag is used.
  1795. 
  1796. File: automake.info, Node: Automake Silent Rules, Prev: Tricks For Silencing Make, Up: Silencing Make
  1797. 21.3 How Automake can help in silencing make
  1798. ============================================
  1799. The tricks and idioms for silencing ‘make’ described in the previous
  1800. section can be useful from time to time, but we’ve seen that they all
  1801. have their serious drawbacks and limitations. That’s why automake
  1802. provides support for a more advanced and flexible way of obtaining
  1803. quieter output from ‘make’ (for most rules at least).
  1804. To give the gist of what Automake can do in this respect, here is a
  1805. simple comparison between a typical ‘make’ output (where silent rules
  1806. are disabled) and one with silent rules enabled:
  1807. % cat Makefile.am
  1808. bin_PROGRAMS = foo
  1809. foo_SOURCES = main.c func.c
  1810. % cat main.c
  1811. int main (void) { return func (); } /* func used undeclared */
  1812. % cat func.c
  1813. int func (void) { int i; return i; } /* i used uninitialized */
  1814. The make output is by default very verbose. This causes warnings
  1815. from the compiler to be somewhat hidden, and not immediate to spot.
  1816. % make CFLAGS=-Wall
  1817. gcc -DPACKAGE_NAME=\"foo\" -DPACKAGE_TARNAME=\"foo\" ...
  1818. -DPACKAGE_STRING=\"foo\ 1.0\" -DPACKAGE_BUGREPORT=\"\" ...
  1819. -DPACKAGE=\"foo\" -DVERSION=\"1.0\" -I. -Wall -MT main.o
  1820. -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
  1821. main.c: In function ‘main’:
  1822. main.c:3:3: warning: implicit declaration of function ‘func’
  1823. mv -f .deps/main.Tpo .deps/main.Po
  1824. gcc -DPACKAGE_NAME=\"foo\" -DPACKAGE_TARNAME=\"foo\" ...
  1825. -DPACKAGE_STRING=\"foo\ 1.0\" -DPACKAGE_BUGREPORT=\"\" ...
  1826. -DPACKAGE=\"foo\" -DVERSION=\"1.0\" -I. -Wall -MT func.o
  1827. -MD -MP -MF .deps/func.Tpo -c -o func.o func.c
  1828. func.c: In function ‘func’:
  1829. func.c:4:3: warning: ‘i’ used uninitialized in this function
  1830. mv -f .deps/func.Tpo .deps/func.Po
  1831. gcc -Wall -o foo main.o func.o
  1832. Clean up, so that we we can rebuild everything from scratch.
  1833. % make clean
  1834. test -z "foo" || rm -f foo
  1835. rm -f *.o
  1836. Silent rules enabled: the output is minimal but informative. In
  1837. particular, the warnings from the compiler stick out very clearly.
  1838. % make V=0 CFLAGS=-Wall
  1839. CC main.o
  1840. main.c: In function ‘main’:
  1841. main.c:3:3: warning: implicit declaration of function ‘func’
  1842. CC func.o
  1843. func.c: In function ‘func’:
  1844. func.c:4:3: warning: ‘i’ used uninitialized in this function
  1845. CCLD foo
  1846. Also, in projects using ‘libtool’, the use of silent rules can
  1847. automatically enable the ‘libtool’’s ‘--silent’ option:
  1848. % cat Makefile.am
  1849. lib_LTLIBRARIES = libx.la
  1850. % make # Both make and libtool are verbose by default.
  1851. ...
  1852. libtool: compile: gcc -DPACKAGE_NAME=\"foo\" ... -DLT_OBJDIR=\".libs/\"
  1853. -I. -g -O2 -MT libx.lo -MD -MP -MF .deps/libx.Tpo -c libx.c -fPIC
  1854. -DPIC -o .libs/libx.o
  1855. mv -f .deps/libx.Tpo .deps/libx.Plo
  1856. /bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -o libx.la -rpath
  1857. /usr/local/lib libx.lo
  1858. libtool: link: gcc -shared .libs/libx.o -Wl,-soname -Wl,libx.so.0
  1859. -o .libs/libx.so.0.0.0
  1860. libtool: link: cd .libs && rm -f libx.so && ln -s libx.so.0.0.0 libx.so
  1861. ...
  1862. % make V=0
  1863. CC libx.lo
  1864. CCLD libx.la
  1865. For Automake-generated ‘Makefile’s, the user may influence the
  1866. verbosity at ‘configure’ run time as well as at ‘make’ run time:
  1867. • Passing ‘--enable-silent-rules’ to ‘configure’ will cause build
  1868. rules to be less verbose; the option ‘--disable-silent-rules’ will
  1869. cause normal verbose output.
  1870. • At ‘make’ run time, the default chosen at ‘configure’ time may be
  1871. overridden: ‘make V=1’ will produce verbose output, ‘make V=0’ less
  1872. verbose output.
  1873. Note that silent rules are _disabled_ by default; the user must
  1874. enable them explicitly at either ‘configure’ run time or at ‘make’ run
  1875. time. We think that this is a good policy, since it provides the casual
  1876. user with enough information to prepare a good bug report in case
  1877. anything breaks.
  1878. Still, notwithstanding the rationales above, a developer who really
  1879. wants to make silent rules enabled by default in his own package can do
  1880. so by calling ‘AM_SILENT_RULES([yes])’ in ‘configure.ac’.
  1881. Users who prefer to have silent rules enabled by default can edit
  1882. their ‘config.site’ file to make the variable ‘enable_silent_rules’
  1883. default to ‘yes’. This should still allow disabling silent rules at
  1884. ‘configure’ time and at ‘make’ time.
  1885. For portability to different ‘make’ implementations, package authors
  1886. are advised to not set the variable ‘V’ inside the ‘Makefile.am’ file,
  1887. to allow the user to override the value for subdirectories as well.
  1888. To work at its best, the current implementation of this feature
  1889. normally uses nested variable expansion ‘$(VAR1$(V))’, a ‘Makefile’
  1890. feature that is not required by POSIX 2008 but is widely supported in
  1891. practice. On the rare ‘make’ implementations that do not support nested
  1892. variable expansion, whether rules are silent is always determined at
  1893. configure time, and cannot be overridden at make time. Future versions
  1894. of POSIX are likely to require nested variable expansion, so this minor
  1895. limitation should go away with time.
  1896. To extend the silent mode to your own rules, you have few choices:
  1897. • You can use the predefined variable ‘AM_V_GEN’ as a prefix to
  1898. commands that should output a status line in silent mode, and
  1899. ‘AM_V_at’ as a prefix to commands that should not output anything
  1900. in silent mode. When output is to be verbose, both of these
  1901. variables will expand to the empty string.
  1902. • You can silence a recipe unconditionally with ‘@’, and then use the
  1903. predefined variable ‘AM_V_P’ to know whether make is being run in
  1904. silent or verbose mode, adjust the verbose information your recipe
  1905. displays accordingly:
  1906. generate-headers:
  1907. ... [commands defining a shell variable '$headers'] ...; \
  1908. if $(AM_V_P); then set -x; else echo " GEN [headers]"; fi; \
  1909. rm -f $$headers && generate-header --flags $$headers
  1910. • You can add your own variables, so strings of your own choice are
  1911. shown. The following snippet shows how you would define your own
  1912. equivalent of ‘AM_V_GEN’:
  1913. pkg_verbose = $(pkg_verbose_@AM_V@)
  1914. pkg_verbose_ = $(pkg_verbose_@AM_DEFAULT_V@)
  1915. pkg_verbose_0 = @echo PKG-GEN $@;
  1916. foo: foo.in
  1917. $(pkg_verbose)cp $(srcdir)/foo.in $@
  1918. As a final note, observe that, even when silent rules are enabled,
  1919. the ‘--no-print-directory’ option is still required with GNU ‘make’ if
  1920. the “Entering/Leaving directory ...” messages are to be disabled.
  1921. 
  1922. File: automake.info, Node: Gnits, Next: Not Enough, Prev: Silencing Make, Up: Top
  1923. 22 The effect of ‘--gnu’ and ‘--gnits’
  1924. **************************************
  1925. The ‘--gnu’ option (or ‘gnu’ in the ‘AUTOMAKE_OPTIONS’ variable) causes
  1926. ‘automake’ to check the following:
  1927. • The files ‘INSTALL’, ‘NEWS’, ‘README’, ‘AUTHORS’, and ‘ChangeLog’,
  1928. plus one of ‘COPYING.LIB’, ‘COPYING.LESSER’ or ‘COPYING’, are
  1929. required at the topmost directory of the package.
  1930. If the ‘--add-missing’ option is given, ‘automake’ will add a
  1931. generic version of the ‘INSTALL’ file as well as the ‘COPYING’ file
  1932. containing the text of the current version of the GNU General
  1933. Public License existing at the time of this Automake release
  1934. (version 3 as this is written,
  1935. <http://www.gnu.org/copyleft/gpl.html>). However, an existing
  1936. ‘COPYING’ file will never be overwritten by ‘automake’.
  1937. • The options ‘no-installman’ and ‘no-installinfo’ are prohibited.
  1938. Note that this option will be extended in the future to do even more
  1939. checking; it is advisable to be familiar with the precise requirements
  1940. of the GNU standards. Also, ‘--gnu’ can require certain non-standard
  1941. GNU programs to exist for use by various maintainer-only rules; for
  1942. instance, in the future ‘pathchk’ might be required for ‘make dist’.
  1943. The ‘--gnits’ option does everything that ‘--gnu’ does, and checks
  1944. the following as well:
  1945. • ‘make installcheck’ will check to make sure that the ‘--help’ and
  1946. ‘--version’ really print a usage message and a version string,
  1947. respectively. This is the ‘std-options’ option (*note Options::).
  1948. • ‘make dist’ will check to make sure the ‘NEWS’ file has been
  1949. updated to the current version.
  1950. • ‘VERSION’ is checked to make sure its format complies with Gnits
  1951. standards.
  1952. • If ‘VERSION’ indicates that this is an alpha release, and the file
  1953. ‘README-alpha’ appears in the topmost directory of a package, then
  1954. it is included in the distribution. This is done in ‘--gnits’
  1955. mode, and no other, because this mode is the only one where version
  1956. number formats are constrained, and hence the only mode where
  1957. Automake can automatically determine whether ‘README-alpha’ should
  1958. be included.
  1959. • The file ‘THANKS’ is required.
  1960. 
  1961. File: automake.info, Node: Not Enough, Next: Distributing, Prev: Gnits, Up: Top
  1962. 23 When Automake Isn’t Enough
  1963. *****************************
  1964. In some situations, where Automake is not up to one task, one has to
  1965. resort to handwritten rules or even handwritten ‘Makefile’s.
  1966. * Menu:
  1967. * Extending:: Adding new rules or overriding existing ones.
  1968. * Third-Party Makefiles:: Integrating Non-Automake ‘Makefile’s.
  1969. 
  1970. File: automake.info, Node: Extending, Next: Third-Party Makefiles, Up: Not Enough
  1971. 23.1 Extending Automake Rules
  1972. =============================
  1973. With some minor exceptions (for example ‘_PROGRAMS’ variables, ‘TESTS’,
  1974. or ‘XFAIL_TESTS’) being rewritten to append ‘$(EXEEXT)’), the contents
  1975. of a ‘Makefile.am’ is copied to ‘Makefile.in’ verbatim.
  1976. These copying semantics mean that many problems can be worked around
  1977. by simply adding some ‘make’ variables and rules to ‘Makefile.am’.
  1978. Automake will ignore these additions.
  1979. Since a ‘Makefile.in’ is built from data gathered from three
  1980. different places (‘Makefile.am’, ‘configure.ac’, and ‘automake’ itself),
  1981. it is possible to have conflicting definitions of rules or variables.
  1982. When building ‘Makefile.in’ the following priorities are respected by
  1983. ‘automake’ to ensure the user always has the last word:
  1984. • User defined variables in ‘Makefile.am’ have priority over
  1985. variables ‘AC_SUBST’ed from ‘configure.ac’, and ‘AC_SUBST’ed
  1986. variables have priority over ‘automake’-defined variables.
  1987. • As far as rules are concerned, a user-defined rule overrides any
  1988. ‘automake’-defined rule for the same target.
  1989. These overriding semantics make it possible to fine tune some default
  1990. settings of Automake, or replace some of its rules. Overriding Automake
  1991. rules is often inadvisable, particularly in the topmost directory of a
  1992. package with subdirectories. The ‘-Woverride’ option (*note automake
  1993. Invocation::) comes in handy to catch overridden definitions.
  1994. Note that Automake does not make any distinction between rules with
  1995. commands and rules that only specify dependencies. So it is not
  1996. possible to append new dependencies to an ‘automake’-defined target
  1997. without redefining the entire rule.
  1998. However, various useful targets have a ‘-local’ version you can
  1999. specify in your ‘Makefile.am’. Automake will supplement the standard
  2000. target with these user-supplied targets.
  2001. The targets that support a local version are ‘all’, ‘info’, ‘dvi’,
  2002. ‘ps’, ‘pdf’, ‘html’, ‘check’, ‘install-data’, ‘install-dvi’,
  2003. ‘install-exec’, ‘install-html’, ‘install-info’, ‘install-pdf’,
  2004. ‘install-ps’, ‘uninstall’, ‘installdirs’, ‘installcheck’ and the various
  2005. ‘clean’ targets (‘mostlyclean’, ‘clean’, ‘distclean’, and
  2006. ‘maintainer-clean’).
  2007. Note that there are no ‘uninstall-exec-local’ or
  2008. ‘uninstall-data-local’ targets; just use ‘uninstall-local’. It doesn’t
  2009. make sense to uninstall just data or just executables.
  2010. For instance, here is one way to erase a subdirectory during ‘make
  2011. clean’ (*note Clean::).
  2012. clean-local:
  2013. -rm -rf testSubDir
  2014. You may be tempted to use ‘install-data-local’ to install a file to
  2015. some hard-coded location, but you should avoid this (*note Hard-Coded
  2016. Install Paths::).
  2017. With the ‘-local’ targets, there is no particular guarantee of
  2018. execution order; typically, they are run early, but with parallel make,
  2019. there is no way to be sure of that.
  2020. In contrast, some rules also have a way to run another rule, called a
  2021. “hook”; hooks are always executed after the main rule’s work is done.
  2022. The hook is named after the principal target, with ‘-hook’ appended.
  2023. The targets allowing hooks are ‘install-data’, ‘install-exec’,
  2024. ‘uninstall’, ‘dist’, and ‘distcheck’.
  2025. For instance, here is how to create a hard link to an installed
  2026. program:
  2027. install-exec-hook:
  2028. ln $(DESTDIR)$(bindir)/program$(EXEEXT) \
  2029. $(DESTDIR)$(bindir)/proglink$(EXEEXT)
  2030. Although cheaper and more portable than symbolic links, hard links
  2031. will not work everywhere (for instance, OS/2 does not have ‘ln’).
  2032. Ideally you should fall back to ‘cp -p’ when ‘ln’ does not work. An
  2033. easy way, if symbolic links are acceptable to you, is to add
  2034. ‘AC_PROG_LN_S’ to ‘configure.ac’ (*note Particular Program Checks:
  2035. (autoconf)Particular Programs.) and use ‘$(LN_S)’ in ‘Makefile.am’.
  2036. For instance, here is how you could install a versioned copy of a
  2037. program using ‘$(LN_S)’:
  2038. install-exec-hook:
  2039. cd $(DESTDIR)$(bindir) && \
  2040. mv -f prog$(EXEEXT) prog-$(VERSION)$(EXEEXT) && \
  2041. $(LN_S) prog-$(VERSION)$(EXEEXT) prog$(EXEEXT)
  2042. Note that we rename the program so that a new version will erase the
  2043. symbolic link, not the real binary. Also we ‘cd’ into the destination
  2044. directory in order to create relative links.
  2045. When writing ‘install-exec-hook’ or ‘install-data-hook’, please bear
  2046. in mind that the exec/data distinction is based on the installation
  2047. directory, not on the primary used (*note The Two Parts of Install::).
  2048. So a ‘foo_SCRIPTS’ will be installed by ‘install-data’, and a
  2049. ‘barexec_SCRIPTS’ will be installed by ‘install-exec’. You should
  2050. define your hooks consequently.
  2051. 
  2052. File: automake.info, Node: Third-Party Makefiles, Prev: Extending, Up: Not Enough
  2053. 23.2 Third-Party ‘Makefile’s
  2054. ============================
  2055. In most projects all ‘Makefile’s are generated by Automake. In some
  2056. cases, however, projects need to embed subdirectories with handwritten
  2057. ‘Makefile’s. For instance, one subdirectory could be a third-party
  2058. project with its own build system, not using Automake.
  2059. It is possible to list arbitrary directories in ‘SUBDIRS’ or
  2060. ‘DIST_SUBDIRS’ provided each of these directories has a ‘Makefile’ that
  2061. recognizes all the following recursive targets.
  2062. When a user runs one of these targets, that target is run recursively
  2063. in all subdirectories. This is why it is important that even
  2064. third-party ‘Makefile’s support them.
  2065. ‘all’
  2066. Compile the entire package. This is the default target in
  2067. Automake-generated ‘Makefile’s, but it does not need to be the
  2068. default in third-party ‘Makefile’s.
  2069. ‘distdir’
  2070. Copy files to distribute into ‘$(distdir)’, before a tarball is
  2071. constructed. Of course this target is not required if the
  2072. ‘no-dist’ option (*note Options::) is used.
  2073. The variables ‘$(top_distdir)’ and ‘$(distdir)’ (*note The dist
  2074. Hook::) will be passed from the outer package to the subpackage
  2075. when the ‘distdir’ target is invoked. These two variables have
  2076. been adjusted for the directory that is being recursed into, so
  2077. they are ready to use.
  2078. ‘install’
  2079. ‘install-data’
  2080. ‘install-exec’
  2081. ‘uninstall’
  2082. Install or uninstall files (*note Install::).
  2083. ‘install-dvi’
  2084. ‘install-html’
  2085. ‘install-info’
  2086. ‘install-ps’
  2087. ‘install-pdf’
  2088. Install only some specific documentation format (*note Texinfo::).
  2089. ‘installdirs’
  2090. Create install directories, but do not install any files.
  2091. ‘check’
  2092. ‘installcheck’
  2093. Check the package (*note Tests::).
  2094. ‘mostlyclean’
  2095. ‘clean’
  2096. ‘distclean’
  2097. ‘maintainer-clean’
  2098. Cleaning rules (*note Clean::).
  2099. ‘dvi’
  2100. ‘pdf’
  2101. ‘ps’
  2102. ‘info’
  2103. ‘html’
  2104. Build the documentation in various formats (*note Texinfo::).
  2105. ‘tags’
  2106. ‘ctags’
  2107. Build ‘TAGS’ and ‘CTAGS’ (*note Tags::).
  2108. If you have ever used Gettext in a project, this is a good example of
  2109. how third-party ‘Makefile’s can be used with Automake. The ‘Makefile’s
  2110. ‘gettextize’ puts in the ‘po/’ and ‘intl/’ directories are handwritten
  2111. ‘Makefile’s that implement all of these targets. That way they can be
  2112. added to ‘SUBDIRS’ in Automake packages.
  2113. Directories that are only listed in ‘DIST_SUBDIRS’ but not in
  2114. ‘SUBDIRS’ need only the ‘distclean’, ‘maintainer-clean’, and ‘distdir’
  2115. rules (*note Conditional Subdirectories::).
  2116. Usually, many of these rules are irrelevant to the third-party
  2117. subproject, but they are required for the whole package to work. It’s
  2118. OK to have a rule that does nothing, so if you are integrating a
  2119. third-party project with no documentation or tag support, you could
  2120. simply augment its ‘Makefile’ as follows:
  2121. EMPTY_AUTOMAKE_TARGETS = dvi pdf ps info html tags ctags
  2122. .PHONY: $(EMPTY_AUTOMAKE_TARGETS)
  2123. $(EMPTY_AUTOMAKE_TARGETS):
  2124. Another aspect of integrating third-party build systems is whether
  2125. they support VPATH builds (*note VPATH Builds::). Obviously if the
  2126. subpackage does not support VPATH builds the whole package will not
  2127. support VPATH builds. This in turns means that ‘make distcheck’ will
  2128. not work, because it relies on VPATH builds. Some people can live
  2129. without this (actually, many Automake users have never heard of ‘make
  2130. distcheck’). Other people may prefer to revamp the existing ‘Makefile’s
  2131. to support VPATH. Doing so does not necessarily require Automake, only
  2132. Autoconf is needed (*note Build Directories: (autoconf)Build
  2133. Directories.). The necessary substitutions: ‘@srcdir@’, ‘@top_srcdir@’,
  2134. and ‘@top_builddir@’ are defined by ‘configure’ when it processes a
  2135. ‘Makefile’ (*note Preset Output Variables: (autoconf)Preset Output
  2136. Variables.), they are not computed by the Makefile like the
  2137. aforementioned ‘$(distdir)’ and ‘$(top_distdir)’ variables.
  2138. It is sometimes inconvenient to modify a third-party ‘Makefile’ to
  2139. introduce the above required targets. For instance, one may want to
  2140. keep the third-party sources untouched to ease upgrades to new versions.
  2141. Here are two other ideas. If GNU make is assumed, one possibility is
  2142. to add to that subdirectory a ‘GNUmakefile’ that defines the required
  2143. targets and includes the third-party ‘Makefile’. For this to work in
  2144. VPATH builds, ‘GNUmakefile’ must lie in the build directory; the easiest
  2145. way to do this is to write a ‘GNUmakefile.in’ instead, and have it
  2146. processed with ‘AC_CONFIG_FILES’ from the outer package. For example if
  2147. we assume ‘Makefile’ defines all targets except the documentation
  2148. targets, and that the ‘check’ target is actually called ‘test’, we could
  2149. write ‘GNUmakefile’ (or ‘GNUmakefile.in’) like this:
  2150. # First, include the real Makefile
  2151. include Makefile
  2152. # Then, define the other targets needed by Automake Makefiles.
  2153. .PHONY: dvi pdf ps info html check
  2154. dvi pdf ps info html:
  2155. check: test
  2156. A similar idea that does not use ‘include’ is to write a proxy
  2157. ‘Makefile’ that dispatches rules to the real ‘Makefile’, either with
  2158. ‘$(MAKE) -f Makefile.real $(AM_MAKEFLAGS) target’ (if it’s OK to rename
  2159. the original ‘Makefile’) or with ‘cd subdir && $(MAKE) $(AM_MAKEFLAGS)
  2160. target’ (if it’s OK to store the subdirectory project one directory
  2161. deeper). The good news is that this proxy ‘Makefile’ can be generated
  2162. with Automake. All we need are ‘-local’ targets (*note Extending::)
  2163. that perform the dispatch. Of course the other Automake features are
  2164. available, so you could decide to let Automake perform distribution or
  2165. installation. Here is a possible ‘Makefile.am’:
  2166. all-local:
  2167. cd subdir && $(MAKE) $(AM_MAKEFLAGS) all
  2168. check-local:
  2169. cd subdir && $(MAKE) $(AM_MAKEFLAGS) test
  2170. clean-local:
  2171. cd subdir && $(MAKE) $(AM_MAKEFLAGS) clean
  2172. # Assuming the package knows how to install itself
  2173. install-data-local:
  2174. cd subdir && $(MAKE) $(AM_MAKEFLAGS) install-data
  2175. install-exec-local:
  2176. cd subdir && $(MAKE) $(AM_MAKEFLAGS) install-exec
  2177. uninstall-local:
  2178. cd subdir && $(MAKE) $(AM_MAKEFLAGS) uninstall
  2179. # Distribute files from here.
  2180. EXTRA_DIST = subdir/Makefile subdir/program.c ...
  2181. Pushing this idea to the extreme, it is also possible to ignore the
  2182. subproject build system and build everything from this proxy
  2183. ‘Makefile.am’. This might sound very sensible if you need VPATH builds
  2184. but the subproject does not support them.
  2185. 
  2186. File: automake.info, Node: Distributing, Next: API Versioning, Prev: Not Enough, Up: Top
  2187. 24 Distributing ‘Makefile.in’s
  2188. ******************************
  2189. Automake places no restrictions on the distribution of the resulting
  2190. ‘Makefile.in’s. We still encourage software authors to distribute their
  2191. work under terms like those of the GPL, but doing so is not required to
  2192. use Automake.
  2193. Some of the files that can be automatically installed via the
  2194. ‘--add-missing’ switch do fall under the GPL. However, these also have
  2195. a special exception allowing you to distribute them with your package,
  2196. regardless of the licensing you choose.
  2197. 
  2198. File: automake.info, Node: API Versioning, Next: Upgrading, Prev: Distributing, Up: Top
  2199. 25 Automake API Versioning
  2200. **************************
  2201. New Automake releases usually include bug fixes and new features.
  2202. Unfortunately they may also introduce new bugs and incompatibilities.
  2203. This makes four reasons why a package may require a particular Automake
  2204. version.
  2205. Things get worse when maintaining a large tree of packages, each one
  2206. requiring a different version of Automake. In the past, this meant that
  2207. any developer (and sometimes users) had to install several versions of
  2208. Automake in different places, and switch ‘$PATH’ appropriately for each
  2209. package.
  2210. Starting with version 1.6, Automake installs versioned binaries.
  2211. This means you can install several versions of Automake in the same
  2212. ‘$prefix’, and can select an arbitrary Automake version by running
  2213. ‘automake-1.6’ or ‘automake-1.7’ without juggling with ‘$PATH’.
  2214. Furthermore, ‘Makefile’’s generated by Automake 1.6 will use
  2215. ‘automake-1.6’ explicitly in their rebuild rules.
  2216. The number ‘1.6’ in ‘automake-1.6’ is Automake’s API version, not
  2217. Automake’s version. If a bug fix release is made, for instance Automake
  2218. 1.6.1, the API version will remain 1.6. This means that a package that
  2219. works with Automake 1.6 should also work with 1.6.1; after all, this is
  2220. what people expect from bug fix releases.
  2221. If your package relies on a feature or a bug fix introduced in a
  2222. release, you can pass this version as an option to Automake to ensure
  2223. older releases will not be used. For instance, use this in your
  2224. ‘configure.ac’:
  2225. AM_INIT_AUTOMAKE([1.6.1]) dnl Require Automake 1.6.1 or better.
  2226. or, in a particular ‘Makefile.am’:
  2227. AUTOMAKE_OPTIONS = 1.6.1 # Require Automake 1.6.1 or better.
  2228. Automake will print an error message if its version is older than the
  2229. requested version.
  2230. What is in the API
  2231. ==================
  2232. Automake’s programming interface is not easy to define. Basically it
  2233. should include at least all *documented* variables and targets that a
  2234. ‘Makefile.am’ author can use, any behavior associated with them (e.g.,
  2235. the places where ‘-hook’’s are run), the command line interface of
  2236. ‘automake’ and ‘aclocal’, ...
  2237. What is not in the API
  2238. ======================
  2239. Every undocumented variable, target, or command line option, is not part
  2240. of the API. You should avoid using them, as they could change from one
  2241. version to the other (even in bug fix releases, if this helps to fix a
  2242. bug).
  2243. If it turns out you need to use such an undocumented feature, contact
  2244. <automake@gnu.org> and try to get it documented and exercised by the
  2245. test-suite.
  2246. 
  2247. File: automake.info, Node: Upgrading, Next: FAQ, Prev: API Versioning, Up: Top
  2248. 26 Upgrading a Package to a Newer Automake Version
  2249. **************************************************
  2250. Automake maintains three kind of files in a package.
  2251. • ‘aclocal.m4’
  2252. • ‘Makefile.in’s
  2253. • auxiliary tools like ‘install-sh’ or ‘py-compile’
  2254. ‘aclocal.m4’ is generated by ‘aclocal’ and contains some
  2255. Automake-supplied M4 macros. Auxiliary tools are installed by ‘automake
  2256. --add-missing’ when needed. ‘Makefile.in’s are built from ‘Makefile.am’
  2257. by ‘automake’, and rely on the definitions of the M4 macros put in
  2258. ‘aclocal.m4’ as well as the behavior of the auxiliary tools installed.
  2259. Because all of these files are closely related, it is important to
  2260. regenerate all of them when upgrading to a newer Automake release. The
  2261. usual way to do that is
  2262. aclocal # with any option needed (such a -I m4)
  2263. autoconf
  2264. automake --add-missing --force-missing
  2265. or more conveniently:
  2266. autoreconf -vfi
  2267. The use of ‘--force-missing’ ensures that auxiliary tools will be
  2268. overridden by new versions (*note automake Invocation::).
  2269. It is important to regenerate all of these files each time Automake
  2270. is upgraded, even between bug fixes releases. For instance, it is not
  2271. unusual for a bug fix to involve changes to both the rules generated in
  2272. ‘Makefile.in’ and the supporting M4 macros copied to ‘aclocal.m4’.
  2273. Presently ‘automake’ is able to diagnose situations where
  2274. ‘aclocal.m4’ has been generated with another version of ‘aclocal’.
  2275. However it never checks whether auxiliary scripts are up-to-date. In
  2276. other words, ‘automake’ will tell you when ‘aclocal’ needs to be rerun,
  2277. but it will never diagnose a missing ‘--force-missing’.
  2278. Before upgrading to a new major release, it is a good idea to read
  2279. the file ‘NEWS’. This file lists all changes between releases: new
  2280. features, obsolete constructs, known incompatibilities, and workarounds.
  2281. 
  2282. File: automake.info, Node: FAQ, Next: Copying This Manual, Prev: Upgrading, Up: Top
  2283. 27 Frequently Asked Questions about Automake
  2284. ********************************************
  2285. This chapter covers some questions that often come up on the mailing
  2286. lists.
  2287. * Menu:
  2288. * CVS:: CVS and generated files
  2289. * maintainer-mode:: missing and AM_MAINTAINER_MODE
  2290. * Wildcards:: Why doesn’t Automake support wildcards?
  2291. * Limitations on File Names:: Limitations on source and installed file names
  2292. * Errors with distclean:: Files left in build directory after distclean
  2293. * Flag Variables Ordering:: CFLAGS vs. AM_CFLAGS vs. mumble_CFLAGS
  2294. * Renamed Objects:: Why are object files sometimes renamed?
  2295. * Per-Object Flags:: How to simulate per-object flags?
  2296. * Multiple Outputs:: Writing rules for tools with many output files
  2297. * Hard-Coded Install Paths:: Installing to hard-coded locations
  2298. * Debugging Make Rules:: Strategies when things don’t work as expected
  2299. * Reporting Bugs:: Feedback on bugs and feature requests
  2300. 
  2301. File: automake.info, Node: CVS, Next: maintainer-mode, Up: FAQ
  2302. 27.1 CVS and generated files
  2303. ============================
  2304. Background: distributed generated Files
  2305. ---------------------------------------
  2306. Packages made with Autoconf and Automake ship with some generated files
  2307. like ‘configure’ or ‘Makefile.in’. These files were generated on the
  2308. developer’s machine and are distributed so that end-users do not have to
  2309. install the maintainer tools required to rebuild them. Other generated
  2310. files like Lex scanners, Yacc parsers, or Info documentation, are
  2311. usually distributed on similar grounds.
  2312. Automake output rules in ‘Makefile’s to rebuild these files. For
  2313. instance, ‘make’ will run ‘autoconf’ to rebuild ‘configure’ whenever
  2314. ‘configure.ac’ is changed. This makes development safer by ensuring a
  2315. ‘configure’ is never out-of-date with respect to ‘configure.ac’.
  2316. As generated files shipped in packages are up-to-date, and because
  2317. ‘tar’ preserves times-tamps, these rebuild rules are not triggered when
  2318. a user unpacks and builds a package.
  2319. Background: CVS and Timestamps
  2320. ------------------------------
  2321. Unless you use CVS keywords (in which case files must be updated at
  2322. commit time), CVS preserves timestamp during ‘cvs commit’ and ‘cvs
  2323. import -d’ operations.
  2324. When you check out a file using ‘cvs checkout’ its timestamp is set
  2325. to that of the revision that is being checked out.
  2326. However, during ‘cvs update’, files will have the date of the update,
  2327. not the original timestamp of this revision. This is meant to make sure
  2328. that ‘make’ notices sources files have been updated.
  2329. This timestamp shift is troublesome when both sources and generated
  2330. files are kept under CVS. Because CVS processes files in lexical order,
  2331. ‘configure.ac’ will appear newer than ‘configure’ after a ‘cvs update’
  2332. that updates both files, even if ‘configure’ was newer than
  2333. ‘configure.ac’ when it was checked in. Calling ‘make’ will then trigger
  2334. a spurious rebuild of ‘configure’.
  2335. Living with CVS in Autoconfiscated Projects
  2336. -------------------------------------------
  2337. There are basically two clans amongst maintainers: those who keep all
  2338. distributed files under CVS, including generated files, and those who
  2339. keep generated files _out_ of CVS.
  2340. All Files in CVS
  2341. ................
  2342. • The CVS repository contains all distributed files so you know
  2343. exactly what is distributed, and you can checkout any prior version
  2344. entirely.
  2345. • Maintainers can see how generated files evolve (for instance, you
  2346. can see what happens to your ‘Makefile.in’s when you upgrade
  2347. Automake and make sure they look OK).
  2348. • Users do not need the autotools to build a checkout of the project,
  2349. it works just like a released tarball.
  2350. • If users use ‘cvs update’ to update their copy, instead of ‘cvs
  2351. checkout’ to fetch a fresh one, timestamps will be inaccurate.
  2352. Some rebuild rules will be triggered and attempt to run developer
  2353. tools such as ‘autoconf’ or ‘automake’.
  2354. Calls to such tools are all wrapped into a call to the ‘missing’
  2355. script discussed later (*note maintainer-mode::), so that the user
  2356. will see more descriptive warnings about missing or out-of-date
  2357. tools, and possible suggestions about how to obtain them, rather
  2358. than just some “command not found” error, or (worse) some obscure
  2359. message from some older version of the required tool they happen to
  2360. have installed.
  2361. Maintainers interested in keeping their package buildable from a
  2362. CVS checkout even for those users that lack maintainer-specific
  2363. tools might want to provide an helper script (or to enhance their
  2364. existing bootstrap script) to fix the timestamps after a ‘cvs
  2365. update’ or a ‘git checkout’, to prevent spurious rebuilds. In case
  2366. of a project committing the Autotools-generated files, as well as
  2367. the generated ‘.info’ files, such script might look something like
  2368. this:
  2369. #!/bin/sh
  2370. # fix-timestamp.sh: prevents useless rebuilds after "cvs update"
  2371. sleep 1
  2372. # aclocal-generated aclocal.m4 depends on locally-installed
  2373. # '.m4' macro files, as well as on 'configure.ac'
  2374. touch aclocal.m4
  2375. sleep 1
  2376. # autoconf-generated configure depends on aclocal.m4 and on
  2377. # configure.ac
  2378. touch configure
  2379. # so does autoheader-generated config.h.in
  2380. touch config.h.in
  2381. # and all the automake-generated Makefile.in files
  2382. touch `find . -name Makefile.in -print`
  2383. # finally, the makeinfo-generated '.info' files depend on the
  2384. # corresponding '.texi' files
  2385. touch doc/*.info
  2386. • In distributed development, developers are likely to have different
  2387. version of the maintainer tools installed. In this case rebuilds
  2388. triggered by timestamp lossage will lead to spurious changes to
  2389. generated files. There are several solutions to this:
  2390. • All developers should use the same versions, so that the
  2391. rebuilt files are identical to files in CVS. (This starts to
  2392. be difficult when each project you work on uses different
  2393. versions.)
  2394. • Or people use a script to fix the timestamp after a checkout
  2395. (the GCC folks have such a script).
  2396. • Or ‘configure.ac’ uses ‘AM_MAINTAINER_MODE’, which will
  2397. disable all of these rebuild rules by default. This is
  2398. further discussed in *note maintainer-mode::.
  2399. • Although we focused on spurious rebuilds, the converse can also
  2400. happen. CVS’s timestamp handling can also let you think an
  2401. out-of-date file is up-to-date.
  2402. For instance, suppose a developer has modified ‘Makefile.am’ and
  2403. has rebuilt ‘Makefile.in’, and then decides to do a last-minute
  2404. change to ‘Makefile.am’ right before checking in both files
  2405. (without rebuilding ‘Makefile.in’ to account for the change).
  2406. This last change to ‘Makefile.am’ makes the copy of ‘Makefile.in’
  2407. out-of-date. Since CVS processes files alphabetically, when
  2408. another developer ‘cvs update’s his or her tree, ‘Makefile.in’ will
  2409. happen to be newer than ‘Makefile.am’. This other developer will
  2410. not see that ‘Makefile.in’ is out-of-date.
  2411. Generated Files out of CVS
  2412. ..........................
  2413. One way to get CVS and ‘make’ working peacefully is to never store
  2414. generated files in CVS, i.e., do not CVS-control files that are
  2415. ‘Makefile’ targets (also called _derived_ files).
  2416. This way developers are not annoyed by changes to generated files.
  2417. It does not matter if they all have different versions (assuming they
  2418. are compatible, of course). And finally, timestamps are not lost,
  2419. changes to sources files can’t be missed as in the
  2420. ‘Makefile.am’/‘Makefile.in’ example discussed earlier.
  2421. The drawback is that the CVS repository is not an exact copy of what
  2422. is distributed and that users now need to install various development
  2423. tools (maybe even specific versions) before they can build a checkout.
  2424. But, after all, CVS’s job is versioning, not distribution.
  2425. Allowing developers to use different versions of their tools can also
  2426. hide bugs during distributed development. Indeed, developers will be
  2427. using (hence testing) their own generated files, instead of the
  2428. generated files that will be released actually. The developer who
  2429. prepares the tarball might be using a version of the tool that produces
  2430. bogus output (for instance a non-portable C file), something other
  2431. developers could have noticed if they weren’t using their own versions
  2432. of this tool.
  2433. Third-party Files
  2434. -----------------
  2435. Another class of files not discussed here (because they do not cause
  2436. timestamp issues) are files that are shipped with a package, but
  2437. maintained elsewhere. For instance, tools like ‘gettextize’ and
  2438. ‘autopoint’ (from Gettext) or ‘libtoolize’ (from Libtool), will install
  2439. or update files in your package.
  2440. These files, whether they are kept under CVS or not, raise similar
  2441. concerns about version mismatch between developers’ tools. The Gettext
  2442. manual has a section about this, see *note CVS Issues: (gettext)CVS
  2443. Issues.
  2444. 
  2445. File: automake.info, Node: maintainer-mode, Next: Wildcards, Prev: CVS, Up: FAQ
  2446. 27.2 ‘missing’ and ‘AM_MAINTAINER_MODE’
  2447. =======================================
  2448. ‘missing’
  2449. ---------
  2450. The ‘missing’ script is a wrapper around several maintainer tools,
  2451. designed to warn users if a maintainer tool is required but missing.
  2452. Typical maintainer tools are ‘autoconf’, ‘automake’, ‘bison’, etc.
  2453. Because file generated by these tools are shipped with the other sources
  2454. of a package, these tools shouldn’t be required during a user build and
  2455. they are not checked for in ‘configure’.
  2456. However, if for some reason a rebuild rule is triggered and involves
  2457. a missing tool, ‘missing’ will notice it and warn the user, even
  2458. suggesting how to obtain such a tool (at least in case it is a
  2459. well-known one, like ‘makeinfo’ or ‘bison’). This is more helpful and
  2460. user-friendly than just having the rebuild rules spewing out a terse
  2461. error message like ‘sh: TOOL: command not found’. Similarly, ‘missing’
  2462. will warn the user if it detects that a maintainer tool it attempted to
  2463. use seems too old (be warned that diagnosing this correctly is typically
  2464. more difficult that detecting missing tools, and requires cooperation
  2465. from the tool itself, so it won’t always work).
  2466. If the required tool is installed, ‘missing’ will run it and won’t
  2467. attempt to continue after failures. This is correct during development:
  2468. developers love fixing failures. However, users with missing or too old
  2469. maintainer tools may get an error when the rebuild rule is spuriously
  2470. triggered, halting the build. This failure to let the build continue is
  2471. one of the arguments of the ‘AM_MAINTAINER_MODE’ advocates.
  2472. ‘AM_MAINTAINER_MODE’
  2473. --------------------
  2474. ‘AM_MAINTAINER_MODE’ allows you to choose whether the so called "rebuild
  2475. rules" should be enabled or disabled. With
  2476. ‘AM_MAINTAINER_MODE([enable])’, they are enabled by default, otherwise
  2477. they are disabled by default. In the latter case, if you have
  2478. ‘AM_MAINTAINER_MODE’ in ‘configure.ac’, and run ‘./configure && make’,
  2479. then ‘make’ will *never* attempt to rebuild ‘configure’, ‘Makefile.in’s,
  2480. Lex or Yacc outputs, etc. I.e., this disables build rules for files
  2481. that are usually distributed and that users should normally not have to
  2482. update.
  2483. The user can override the default setting by passing either
  2484. ‘--enable-maintainer-mode’ or ‘--disable-maintainer-mode’ to
  2485. ‘configure’.
  2486. People use ‘AM_MAINTAINER_MODE’ either because they do not want their
  2487. users (or themselves) annoyed by timestamps lossage (*note CVS::), or
  2488. because they simply can’t stand the rebuild rules and prefer running
  2489. maintainer tools explicitly.
  2490. ‘AM_MAINTAINER_MODE’ also allows you to disable some custom build
  2491. rules conditionally. Some developers use this feature to disable rules
  2492. that need exotic tools that users may not have available.
  2493. Several years ago François Pinard pointed out several arguments
  2494. against this ‘AM_MAINTAINER_MODE’ macro. Most of them relate to
  2495. insecurity. By removing dependencies you get non-dependable builds:
  2496. changes to sources files can have no effect on generated files and this
  2497. can be very confusing when unnoticed. He adds that security shouldn’t
  2498. be reserved to maintainers (what ‘--enable-maintainer-mode’ suggests),
  2499. on the contrary. If one user has to modify a ‘Makefile.am’, then either
  2500. ‘Makefile.in’ should be updated or a warning should be output (this is
  2501. what Automake uses ‘missing’ for) but the last thing you want is that
  2502. nothing happens and the user doesn’t notice it (this is what happens
  2503. when rebuild rules are disabled by ‘AM_MAINTAINER_MODE’).
  2504. Jim Meyering, the inventor of the ‘AM_MAINTAINER_MODE’ macro was
  2505. swayed by François’s arguments, and got rid of ‘AM_MAINTAINER_MODE’ in
  2506. all of his packages.
  2507. Still many people continue to use ‘AM_MAINTAINER_MODE’, because it
  2508. helps them working on projects where all files are kept under version
  2509. control, and because ‘missing’ isn’t enough if you have the wrong
  2510. version of the tools.
  2511. 
  2512. File: automake.info, Node: Wildcards, Next: Limitations on File Names, Prev: maintainer-mode, Up: FAQ
  2513. 27.3 Why doesn’t Automake support wildcards?
  2514. ============================================
  2515. Developers are lazy. They would often like to use wildcards in
  2516. ‘Makefile.am’s, so that they would not need to remember to update
  2517. ‘Makefile.am’s every time they add, delete, or rename a file.
  2518. There are several objections to this:
  2519. • When using CVS (or similar) developers need to remember they have
  2520. to run ‘cvs add’ or ‘cvs rm’ anyway. Updating ‘Makefile.am’
  2521. accordingly quickly becomes a reflex.
  2522. Conversely, if your application doesn’t compile because you forgot
  2523. to add a file in ‘Makefile.am’, it will help you remember to ‘cvs
  2524. add’ it.
  2525. • Using wildcards makes it easy to distribute files by mistake. For
  2526. instance, some code a developer is experimenting with (a test case,
  2527. say) that should not be part of the distribution.
  2528. • Using wildcards it’s easy to omit some files by mistake. For
  2529. instance, one developer creates a new file, uses it in many places,
  2530. but forgets to commit it. Another developer then checks out the
  2531. incomplete project and is able to run ‘make dist’ successfully,
  2532. even though a file is missing. By listing files, ‘make dist’
  2533. _will_ complain.
  2534. • Wildcards are not portable to some non-GNU ‘make’ implementations,
  2535. e.g., NetBSD ‘make’ will not expand globs such as ‘*’ in
  2536. prerequisites of a target.
  2537. • Finally, it’s really hard to _forget_ to add a file to
  2538. ‘Makefile.am’: files that are not listed in ‘Makefile.am’ are not
  2539. compiled or installed, so you can’t even test them.
  2540. Still, these are philosophical objections, and as such you may
  2541. disagree, or find enough value in wildcards to dismiss all of them.
  2542. Before you start writing a patch against Automake to teach it about
  2543. wildcards, let’s see the main technical issue: portability.
  2544. Although ‘$(wildcard ...)’ works with GNU ‘make’, it is not portable
  2545. to other ‘make’ implementations.
  2546. The only way Automake could support ‘$(wildcard ...)’ is by expanding
  2547. ‘$(wildcard ...)’ when ‘automake’ is run. The resulting ‘Makefile.in’s
  2548. would be portable since they would list all files and not use
  2549. ‘$(wildcard ...)’. However that means developers would need to remember
  2550. to run ‘automake’ each time they add, delete, or rename files.
  2551. Compared to editing ‘Makefile.am’, this is a very small gain. Sure,
  2552. it’s easier and faster to type ‘automake; make’ than to type ‘emacs
  2553. Makefile.am; make’. But nobody bothered enough to write a patch to add
  2554. support for this syntax. Some people use scripts to generate file lists
  2555. in ‘Makefile.am’ or in separate ‘Makefile’ fragments.
  2556. Even if you don’t care about portability, and are tempted to use
  2557. ‘$(wildcard ...)’ anyway because you target only GNU Make, you should
  2558. know there are many places where Automake needs to know exactly which
  2559. files should be processed. As Automake doesn’t know how to expand
  2560. ‘$(wildcard ...)’, you cannot use it in these places. ‘$(wildcard ...)’
  2561. is a black box comparable to ‘AC_SUBST’ed variables as far Automake is
  2562. concerned.
  2563. You can get warnings about ‘$(wildcard ...’) constructs using the
  2564. ‘-Wportability’ flag.
  2565. 
  2566. File: automake.info, Node: Limitations on File Names, Next: Errors with distclean, Prev: Wildcards, Up: FAQ
  2567. 27.4 Limitations on File Names
  2568. ==============================
  2569. Automake attempts to support all kinds of file names, even those that
  2570. contain unusual characters or are unusually long. However, some
  2571. limitations are imposed by the underlying operating system and tools.
  2572. Most operating systems prohibit the use of the null byte in file
  2573. names, and reserve ‘/’ as a directory separator. Also, they require
  2574. that file names are properly encoded for the user’s locale. Automake is
  2575. subject to these limits.
  2576. Portable packages should limit themselves to POSIX file names. These
  2577. can contain ASCII letters and digits, ‘_’, ‘.’, and ‘-’. File names
  2578. consist of components separated by ‘/’. File name components cannot
  2579. begin with ‘-’.
  2580. Portable POSIX file names cannot contain components that exceed a
  2581. 14-byte limit, but nowadays it’s normally safe to assume the
  2582. more-generous XOPEN limit of 255 bytes. POSIX limits file names to 255
  2583. bytes (XOPEN allows 1023 bytes), but you may want to limit a source
  2584. tarball to file names of 99 bytes to avoid interoperability problems
  2585. with old versions of ‘tar’.
  2586. If you depart from these rules (e.g., by using non-ASCII characters
  2587. in file names, or by using lengthy file names), your installers may have
  2588. problems for reasons unrelated to Automake. However, if this does not
  2589. concern you, you should know about the limitations imposed by Automake
  2590. itself. These limitations are undesirable, but some of them seem to be
  2591. inherent to underlying tools like Autoconf, Make, M4, and the shell.
  2592. They fall into three categories: install directories, build directories,
  2593. and file names.
  2594. The following characters:
  2595. newline " # $ ' `
  2596. should not appear in the names of install directories. For example,
  2597. the operand of ‘configure’’s ‘--prefix’ option should not contain these
  2598. characters.
  2599. Build directories suffer the same limitations as install directories,
  2600. and in addition should not contain the following characters:
  2601. & @ \
  2602. For example, the full name of the directory containing the source
  2603. files should not contain these characters.
  2604. Source and installation file names like ‘main.c’ are limited even
  2605. further: they should conform to the POSIX/XOPEN rules described above.
  2606. In addition, if you plan to port to non-POSIX environments, you should
  2607. avoid file names that differ only in case (e.g., ‘makefile’ and
  2608. ‘Makefile’). Nowadays it is no longer worth worrying about the 8.3
  2609. limits of DOS file systems.
  2610. 
  2611. File: automake.info, Node: Errors with distclean, Next: Flag Variables Ordering, Prev: Limitations on File Names, Up: FAQ
  2612. 27.5 Errors with distclean
  2613. ==========================
  2614. This is a diagnostic you might encounter while running ‘make distcheck’.
  2615. As explained in *note Checking the Distribution::, ‘make distcheck’
  2616. attempts to build and check your package for errors like this one.
  2617. ‘make distcheck’ will perform a ‘VPATH’ build of your package (*note
  2618. VPATH Builds::), and then call ‘make distclean’. Files left in the
  2619. build directory after ‘make distclean’ has run are listed after this
  2620. error.
  2621. This diagnostic really covers two kinds of errors:
  2622. • files that are forgotten by distclean;
  2623. • distributed files that are erroneously rebuilt.
  2624. The former left-over files are not distributed, so the fix is to mark
  2625. them for cleaning (*note Clean::), this is obvious and doesn’t deserve
  2626. more explanations.
  2627. The latter bug is not always easy to understand and fix, so let’s
  2628. proceed with an example. Suppose our package contains a program for
  2629. which we want to build a man page using ‘help2man’. GNU ‘help2man’
  2630. produces simple manual pages from the ‘--help’ and ‘--version’ output of
  2631. other commands (*note Overview: (help2man)Top.). Because we don’t want
  2632. to force our users to install ‘help2man’, we decide to distribute the
  2633. generated man page using the following setup.
  2634. # This Makefile.am is bogus.
  2635. bin_PROGRAMS = foo
  2636. foo_SOURCES = foo.c
  2637. dist_man_MANS = foo.1
  2638. foo.1: foo$(EXEEXT)
  2639. help2man --output=foo.1 ./foo$(EXEEXT)
  2640. This will effectively distribute the man page. However, ‘make
  2641. distcheck’ will fail with:
  2642. ERROR: files left in build directory after distclean:
  2643. ./foo.1
  2644. Why was ‘foo.1’ rebuilt? Because although distributed, ‘foo.1’
  2645. depends on a non-distributed built file: ‘foo$(EXEEXT)’. ‘foo$(EXEEXT)’
  2646. is built by the user, so it will always appear to be newer than the
  2647. distributed ‘foo.1’.
  2648. ‘make distcheck’ caught an inconsistency in our package. Our intent
  2649. was to distribute ‘foo.1’ so users do not need to install ‘help2man’,
  2650. however since this rule causes this file to be always rebuilt, users
  2651. _do_ need ‘help2man’. Either we should ensure that ‘foo.1’ is not
  2652. rebuilt by users, or there is no point in distributing ‘foo.1’.
  2653. More generally, the rule is that distributed files should never
  2654. depend on non-distributed built files. If you distribute something
  2655. generated, distribute its sources.
  2656. One way to fix the above example, while still distributing ‘foo.1’ is
  2657. to not depend on ‘foo$(EXEEXT)’. For instance, assuming ‘foo --version’
  2658. and ‘foo --help’ do not change unless ‘foo.c’ or ‘configure.ac’ change,
  2659. we could write the following ‘Makefile.am’:
  2660. bin_PROGRAMS = foo
  2661. foo_SOURCES = foo.c
  2662. dist_man_MANS = foo.1
  2663. foo.1: foo.c $(top_srcdir)/configure.ac
  2664. $(MAKE) $(AM_MAKEFLAGS) foo$(EXEEXT)
  2665. help2man --output=foo.1 ./foo$(EXEEXT)
  2666. This way, ‘foo.1’ will not get rebuilt every time ‘foo$(EXEEXT)’
  2667. changes. The ‘make’ call makes sure ‘foo$(EXEEXT)’ is up-to-date before
  2668. ‘help2man’. Another way to ensure this would be to use separate
  2669. directories for binaries and man pages, and set ‘SUBDIRS’ so that
  2670. binaries are built before man pages.
  2671. We could also decide not to distribute ‘foo.1’. In this case it’s
  2672. fine to have ‘foo.1’ dependent upon ‘foo$(EXEEXT)’, since both will have
  2673. to be rebuilt. However it would be impossible to build the package in a
  2674. cross-compilation, because building ‘foo.1’ involves an _execution_ of
  2675. ‘foo$(EXEEXT)’.
  2676. Another context where such errors are common is when distributed
  2677. files are built by tools that are built by the package. The pattern is
  2678. similar:
  2679. distributed-file: built-tools distributed-sources
  2680. build-command
  2681. should be changed to
  2682. distributed-file: distributed-sources
  2683. $(MAKE) $(AM_MAKEFLAGS) built-tools
  2684. build-command
  2685. or you could choose not to distribute ‘distributed-file’, if
  2686. cross-compilation does not matter.
  2687. The points made through these examples are worth a summary:
  2688. • Distributed files should never depend upon non-distributed built
  2689. files.
  2690. • Distributed files should be distributed with all their
  2691. dependencies.
  2692. • If a file is _intended_ to be rebuilt by users, then there is no
  2693. point in distributing it.
  2694. For desperate cases, it’s always possible to disable this check by
  2695. setting ‘distcleancheck_listfiles’ as documented in *note Checking the
  2696. Distribution::. Make sure you do understand the reason why ‘make
  2697. distcheck’ complains before you do this. ‘distcleancheck_listfiles’ is
  2698. a way to _hide_ errors, not to fix them. You can always do better.
  2699. 
  2700. File: automake.info, Node: Flag Variables Ordering, Next: Renamed Objects, Prev: Errors with distclean, Up: FAQ
  2701. 27.6 Flag Variables Ordering
  2702. ============================
  2703. What is the difference between ‘AM_CFLAGS’, ‘CFLAGS’, and
  2704. ‘mumble_CFLAGS’?
  2705. Why does ‘automake’ output ‘CPPFLAGS’ after
  2706. ‘AM_CPPFLAGS’ on compile lines? Shouldn’t it be the converse?
  2707. My ‘configure’ adds some warning flags into ‘CXXFLAGS’. In
  2708. one ‘Makefile.am’ I would like to append a new flag, however if I
  2709. put the flag into ‘AM_CXXFLAGS’ it is prepended to the other
  2710. flags, not appended.
  2711. Compile Flag Variables
  2712. ----------------------
  2713. This section attempts to answer all the above questions. We will mostly
  2714. discuss ‘CPPFLAGS’ in our examples, but actually the answer holds for
  2715. all the compile flags used in Automake: ‘CCASFLAGS’, ‘CFLAGS’,
  2716. ‘CPPFLAGS’, ‘CXXFLAGS’, ‘FCFLAGS’, ‘FFLAGS’, ‘GCJFLAGS’, ‘LDFLAGS’,
  2717. ‘LFLAGS’, ‘LIBTOOLFLAGS’, ‘OBJCFLAGS’, ‘OBJCXXFLAGS’, ‘RFLAGS’,
  2718. ‘UPCFLAGS’, and ‘YFLAGS’.
  2719. ‘CPPFLAGS’, ‘AM_CPPFLAGS’, and ‘mumble_CPPFLAGS’ are three variables
  2720. that can be used to pass flags to the C preprocessor (actually these
  2721. variables are also used for other languages like C++ or preprocessed
  2722. Fortran). ‘CPPFLAGS’ is the user variable (*note User Variables::),
  2723. ‘AM_CPPFLAGS’ is the Automake variable, and ‘mumble_CPPFLAGS’ is the
  2724. variable specific to the ‘mumble’ target (we call this a per-target
  2725. variable, *note Program and Library Variables::).
  2726. Automake always uses two of these variables when compiling C sources
  2727. files. When compiling an object file for the ‘mumble’ target, the first
  2728. variable will be ‘mumble_CPPFLAGS’ if it is defined, or ‘AM_CPPFLAGS’
  2729. otherwise. The second variable is always ‘CPPFLAGS’.
  2730. In the following example,
  2731. bin_PROGRAMS = foo bar
  2732. foo_SOURCES = xyz.c
  2733. bar_SOURCES = main.c
  2734. foo_CPPFLAGS = -DFOO
  2735. AM_CPPFLAGS = -DBAZ
  2736. ‘xyz.o’ will be compiled with ‘$(foo_CPPFLAGS) $(CPPFLAGS)’, (because
  2737. ‘xyz.o’ is part of the ‘foo’ target), while ‘main.o’ will be compiled
  2738. with ‘$(AM_CPPFLAGS) $(CPPFLAGS)’ (because there is no per-target
  2739. variable for target ‘bar’).
  2740. The difference between ‘mumble_CPPFLAGS’ and ‘AM_CPPFLAGS’ being
  2741. clear enough, let’s focus on ‘CPPFLAGS’. ‘CPPFLAGS’ is a user variable,
  2742. i.e., a variable that users are entitled to modify in order to compile
  2743. the package. This variable, like many others, is documented at the end
  2744. of the output of ‘configure --help’.
  2745. For instance, someone who needs to add ‘/home/my/usr/include’ to the
  2746. C compiler’s search path would configure a package with
  2747. ./configure CPPFLAGS='-I /home/my/usr/include'
  2748. and this flag would be propagated to the compile rules of all
  2749. ‘Makefile’s.
  2750. It is also not uncommon to override a user variable at ‘make’-time.
  2751. Many installers do this with ‘prefix’, but this can be useful with
  2752. compiler flags too. For instance, if, while debugging a C++ project,
  2753. you need to disable optimization in one specific object file, you can
  2754. run something like
  2755. rm file.o
  2756. make CXXFLAGS=-O0 file.o
  2757. make
  2758. The reason ‘$(CPPFLAGS)’ appears after ‘$(AM_CPPFLAGS)’ or
  2759. ‘$(mumble_CPPFLAGS)’ in the compile command is that users should always
  2760. have the last say. It probably makes more sense if you think about it
  2761. while looking at the ‘CXXFLAGS=-O0’ above, which should supersede any
  2762. other switch from ‘AM_CXXFLAGS’ or ‘mumble_CXXFLAGS’ (and this of course
  2763. replaces the previous value of ‘CXXFLAGS’).
  2764. You should never redefine a user variable such as ‘CPPFLAGS’ in
  2765. ‘Makefile.am’. Use ‘automake -Woverride’ to diagnose such mistakes.
  2766. Even something like
  2767. CPPFLAGS = -DDATADIR=\"$(datadir)\" @CPPFLAGS@
  2768. is erroneous. Although this preserves ‘configure’’s value of
  2769. ‘CPPFLAGS’, the definition of ‘DATADIR’ will disappear if a user
  2770. attempts to override ‘CPPFLAGS’ from the ‘make’ command line.
  2771. AM_CPPFLAGS = -DDATADIR=\"$(datadir)\"
  2772. is all that is needed here if no per-target flags are used.
  2773. You should not add options to these user variables within ‘configure’
  2774. either, for the same reason. Occasionally you need to modify these
  2775. variables to perform a test, but you should reset their values
  2776. afterwards. In contrast, it is OK to modify the ‘AM_’ variables within
  2777. ‘configure’ if you ‘AC_SUBST’ them, but it is rather rare that you need
  2778. to do this, unless you really want to change the default definitions of
  2779. the ‘AM_’ variables in all ‘Makefile’s.
  2780. What we recommend is that you define extra flags in separate
  2781. variables. For instance, you may write an Autoconf macro that computes
  2782. a set of warning options for the C compiler, and ‘AC_SUBST’ them in
  2783. ‘WARNINGCFLAGS’; you may also have an Autoconf macro that determines
  2784. which compiler and which linker flags should be used to link with
  2785. library ‘libfoo’, and ‘AC_SUBST’ these in ‘LIBFOOCFLAGS’ and
  2786. ‘LIBFOOLDFLAGS’. Then, a ‘Makefile.am’ could use these variables as
  2787. follows:
  2788. AM_CFLAGS = $(WARNINGCFLAGS)
  2789. bin_PROGRAMS = prog1 prog2
  2790. prog1_SOURCES = ...
  2791. prog2_SOURCES = ...
  2792. prog2_CFLAGS = $(LIBFOOCFLAGS) $(AM_CFLAGS)
  2793. prog2_LDFLAGS = $(LIBFOOLDFLAGS)
  2794. In this example both programs will be compiled with the flags
  2795. substituted into ‘$(WARNINGCFLAGS)’, and ‘prog2’ will additionally be
  2796. compiled with the flags required to link with ‘libfoo’.
  2797. Note that listing ‘AM_CFLAGS’ in a per-target ‘CFLAGS’ variable is a
  2798. common idiom to ensure that ‘AM_CFLAGS’ applies to every target in a
  2799. ‘Makefile.in’.
  2800. Using variables like this gives you full control over the ordering of
  2801. the flags. For instance, if there is a flag in $(WARNINGCFLAGS) that
  2802. you want to negate for a particular target, you can use something like
  2803. ‘prog1_CFLAGS = $(AM_CFLAGS) -no-flag’. If all of these flags had been
  2804. forcefully appended to ‘CFLAGS’, there would be no way to disable one
  2805. flag. Yet another reason to leave user variables to users.
  2806. Finally, we have avoided naming the variable of the example
  2807. ‘LIBFOO_LDFLAGS’ (with an underscore) because that would cause Automake
  2808. to think that this is actually a per-target variable (like
  2809. ‘mumble_LDFLAGS’) for some non-declared ‘LIBFOO’ target.
  2810. Other Variables
  2811. ---------------
  2812. There are other variables in Automake that follow similar principles to
  2813. allow user options. For instance, Texinfo rules (*note Texinfo::) use
  2814. ‘MAKEINFOFLAGS’ and ‘AM_MAKEINFOFLAGS’. Similarly, DejaGnu tests (*note
  2815. DejaGnu Tests::) use ‘RUNTESTDEFAULTFLAGS’ and ‘AM_RUNTESTDEFAULTFLAGS’.
  2816. The tags and ctags rules (*note Tags::) use ‘ETAGSFLAGS’,
  2817. ‘AM_ETAGSFLAGS’, ‘CTAGSFLAGS’, and ‘AM_CTAGSFLAGS’. Java rules (*note
  2818. Java::) use ‘JAVACFLAGS’ and ‘AM_JAVACFLAGS’. None of these rules
  2819. support per-target flags (yet).
  2820. To some extent, even ‘AM_MAKEFLAGS’ (*note Subdirectories::) obeys
  2821. this naming scheme. The slight difference is that ‘MAKEFLAGS’ is passed
  2822. to sub-‘make’s implicitly by ‘make’ itself.
  2823. ‘ARFLAGS’ (*note A Library::) is usually defined by Automake and has
  2824. neither ‘AM_’ nor per-target cousin.
  2825. Finally you should not think that the existence of a per-target
  2826. variable implies the existence of an ‘AM_’ variable or of a user
  2827. variable. For instance, the ‘mumble_LDADD’ per-target variable
  2828. overrides the makefile-wide ‘LDADD’ variable (which is not a user
  2829. variable), and ‘mumble_LIBADD’ exists only as a per-target variable.
  2830. *Note Program and Library Variables::.
  2831. 
  2832. File: automake.info, Node: Renamed Objects, Next: Per-Object Flags, Prev: Flag Variables Ordering, Up: FAQ
  2833. 27.7 Why are object files sometimes renamed?
  2834. ============================================
  2835. This happens when per-target compilation flags are used. Object files
  2836. need to be renamed just in case they would clash with object files
  2837. compiled from the same sources, but with different flags. Consider the
  2838. following example.
  2839. bin_PROGRAMS = true false
  2840. true_SOURCES = generic.c
  2841. true_CPPFLAGS = -DEXIT_CODE=0
  2842. false_SOURCES = generic.c
  2843. false_CPPFLAGS = -DEXIT_CODE=1
  2844. Obviously the two programs are built from the same source, but it would
  2845. be bad if they shared the same object, because ‘generic.o’ cannot be
  2846. built with both ‘-DEXIT_CODE=0’ _and_ ‘-DEXIT_CODE=1’. Therefore
  2847. ‘automake’ outputs rules to build two different objects:
  2848. ‘true-generic.o’ and ‘false-generic.o’.
  2849. ‘automake’ doesn’t actually look whether source files are shared to
  2850. decide if it must rename objects. It will just rename all objects of a
  2851. target as soon as it sees per-target compilation flags used.
  2852. It’s OK to share object files when per-target compilation flags are
  2853. not used. For instance, ‘true’ and ‘false’ will both use ‘version.o’ in
  2854. the following example.
  2855. AM_CPPFLAGS = -DVERSION=1.0
  2856. bin_PROGRAMS = true false
  2857. true_SOURCES = true.c version.c
  2858. false_SOURCES = false.c version.c
  2859. Note that the renaming of objects is also affected by the
  2860. ‘_SHORTNAME’ variable (*note Program and Library Variables::).
  2861. 
  2862. File: automake.info, Node: Per-Object Flags, Next: Multiple Outputs, Prev: Renamed Objects, Up: FAQ
  2863. 27.8 Per-Object Flags Emulation
  2864. ===============================
  2865. One of my source files needs to be compiled with different flags. How
  2866. do I do?
  2867. Automake supports per-program and per-library compilation flags (see
  2868. *note Program and Library Variables:: and *note Flag Variables
  2869. Ordering::). With this you can define compilation flags that apply to
  2870. all files compiled for a target. For instance, in
  2871. bin_PROGRAMS = foo
  2872. foo_SOURCES = foo.c foo.h bar.c bar.h main.c
  2873. foo_CFLAGS = -some -flags
  2874. ‘foo-foo.o’, ‘foo-bar.o’, and ‘foo-main.o’ will all be compiled with
  2875. ‘-some -flags’. (If you wonder about the names of these object files,
  2876. see *note Renamed Objects::.) Note that ‘foo_CFLAGS’ gives the flags to
  2877. use when compiling all the C sources of the _program_ ‘foo’, it has
  2878. nothing to do with ‘foo.c’ or ‘foo-foo.o’ specifically.
  2879. What if ‘foo.c’ needs to be compiled into ‘foo.o’ using some specific
  2880. flags, that none of the other files requires? Obviously per-program
  2881. flags are not directly applicable here. Something like per-object flags
  2882. are expected, i.e., flags that would be used only when creating
  2883. ‘foo-foo.o’. Automake does not support that, however this is easy to
  2884. simulate using a library that contains only that object, and compiling
  2885. this library with per-library flags.
  2886. bin_PROGRAMS = foo
  2887. foo_SOURCES = bar.c bar.h main.c
  2888. foo_CFLAGS = -some -flags
  2889. foo_LDADD = libfoo.a
  2890. noinst_LIBRARIES = libfoo.a
  2891. libfoo_a_SOURCES = foo.c foo.h
  2892. libfoo_a_CFLAGS = -some -other -flags
  2893. Here ‘foo-bar.o’ and ‘foo-main.o’ will all be compiled with ‘-some
  2894. -flags’, while ‘libfoo_a-foo.o’ will be compiled using ‘-some -other
  2895. -flags’. Eventually, all three objects will be linked to form ‘foo’.
  2896. This trick can also be achieved using Libtool convenience libraries,
  2897. for instance ‘noinst_LTLIBRARIES = libfoo.la’ (*note Libtool Convenience
  2898. Libraries::).
  2899. Another tempting idea to implement per-object flags is to override
  2900. the compile rules ‘automake’ would output for these files. Automake
  2901. will not define a rule for a target you have defined, so you could think
  2902. about defining the ‘foo-foo.o: foo.c’ rule yourself. We recommend
  2903. against this, because this is error prone. For instance, if you add
  2904. such a rule to the first example, it will break the day you decide to
  2905. remove ‘foo_CFLAGS’ (because ‘foo.c’ will then be compiled as ‘foo.o’
  2906. instead of ‘foo-foo.o’, *note Renamed Objects::). Also in order to
  2907. support dependency tracking, the two ‘.o’/‘.obj’ extensions, and all the
  2908. other flags variables involved in a compilation, you will end up
  2909. modifying a copy of the rule previously output by ‘automake’ for this
  2910. file. If a new release of Automake generates a different rule, your
  2911. copy will need to be updated by hand.
  2912. 
  2913. File: automake.info, Node: Multiple Outputs, Next: Hard-Coded Install Paths, Prev: Per-Object Flags, Up: FAQ
  2914. 27.9 Handling Tools that Produce Many Outputs
  2915. =============================================
  2916. This section describes a ‘make’ idiom that can be used when a tool
  2917. produces multiple output files. It is not specific to Automake and can
  2918. be used in ordinary ‘Makefile’s.
  2919. Suppose we have a program called ‘foo’ that will read one file called
  2920. ‘data.foo’ and produce two files named ‘data.c’ and ‘data.h’. We want
  2921. to write a ‘Makefile’ rule that captures this one-to-two dependency.
  2922. The naive rule is incorrect:
  2923. # This is incorrect.
  2924. data.c data.h: data.foo
  2925. foo data.foo
  2926. What the above rule really says is that ‘data.c’ and ‘data.h’ each
  2927. depend on ‘data.foo’, and can each be built by running ‘foo data.foo’.
  2928. In other words it is equivalent to:
  2929. # We do not want this.
  2930. data.c: data.foo
  2931. foo data.foo
  2932. data.h: data.foo
  2933. foo data.foo
  2934. which means that ‘foo’ can be run twice. Usually it will not be run
  2935. twice, because ‘make’ implementations are smart enough to check for the
  2936. existence of the second file after the first one has been built; they
  2937. will therefore detect that it already exists. However there are a few
  2938. situations where it can run twice anyway:
  2939. • The most worrying case is when running a parallel ‘make’. If
  2940. ‘data.c’ and ‘data.h’ are built in parallel, two ‘foo data.foo’
  2941. commands will run concurrently. This is harmful.
  2942. • Another case is when the dependency (here ‘data.foo’) is (or
  2943. depends upon) a phony target.
  2944. A solution that works with parallel ‘make’ but not with phony
  2945. dependencies is the following:
  2946. data.c data.h: data.foo
  2947. foo data.foo
  2948. data.h: data.c
  2949. The above rules are equivalent to
  2950. data.c: data.foo
  2951. foo data.foo
  2952. data.h: data.foo data.c
  2953. foo data.foo
  2954. therefore a parallel ‘make’ will have to serialize the builds of
  2955. ‘data.c’ and ‘data.h’, and will detect that the second is no longer
  2956. needed once the first is over.
  2957. Using this pattern is probably enough for most cases. However it
  2958. does not scale easily to more output files (in this scheme all output
  2959. files must be totally ordered by the dependency relation), so we will
  2960. explore a more complicated solution.
  2961. Another idea is to write the following:
  2962. # There is still a problem with this one.
  2963. data.c: data.foo
  2964. foo data.foo
  2965. data.h: data.c
  2966. The idea is that ‘foo data.foo’ is run only when ‘data.c’ needs to be
  2967. updated, but we further state that ‘data.h’ depends upon ‘data.c’. That
  2968. way, if ‘data.h’ is required and ‘data.foo’ is out of date, the
  2969. dependency on ‘data.c’ will trigger the build.
  2970. This is almost perfect, but suppose we have built ‘data.h’ and
  2971. ‘data.c’, and then we erase ‘data.h’. Then, running ‘make data.h’ will
  2972. not rebuild ‘data.h’. The above rules just state that ‘data.c’ must be
  2973. up-to-date with respect to ‘data.foo’, and this is already the case.
  2974. What we need is a rule that forces a rebuild when ‘data.h’ is
  2975. missing. Here it is:
  2976. data.c: data.foo
  2977. foo data.foo
  2978. data.h: data.c
  2979. ## Recover from the removal of $@
  2980. @if test -f $@; then :; else \
  2981. rm -f data.c; \
  2982. $(MAKE) $(AM_MAKEFLAGS) data.c; \
  2983. fi
  2984. The above scheme can be extended to handle more outputs and more
  2985. inputs. One of the outputs is selected to serve as a witness to the
  2986. successful completion of the command, it depends upon all inputs, and
  2987. all other outputs depend upon it. For instance, if ‘foo’ should
  2988. additionally read ‘data.bar’ and also produce ‘data.w’ and ‘data.x’, we
  2989. would write:
  2990. data.c: data.foo data.bar
  2991. foo data.foo data.bar
  2992. data.h data.w data.x: data.c
  2993. ## Recover from the removal of $@
  2994. @if test -f $@; then :; else \
  2995. rm -f data.c; \
  2996. $(MAKE) $(AM_MAKEFLAGS) data.c; \
  2997. fi
  2998. However there are now three minor problems in this setup. One is
  2999. related to the timestamp ordering of ‘data.h’, ‘data.w’, ‘data.x’, and
  3000. ‘data.c’. Another one is a race condition if a parallel ‘make’ attempts
  3001. to run multiple instances of the recover block at once. Finally, the
  3002. recursive rule breaks ‘make -n’ when run with GNU ‘make’ (as well as
  3003. some other ‘make’ implementations), as it may remove ‘data.h’ even when
  3004. it should not (*note How the ‘MAKE’ Variable Works: (make)MAKE
  3005. Variable.).
  3006. Let us deal with the first problem. ‘foo’ outputs four files, but we
  3007. do not know in which order these files are created. Suppose that
  3008. ‘data.h’ is created before ‘data.c’. Then we have a weird situation.
  3009. The next time ‘make’ is run, ‘data.h’ will appear older than ‘data.c’,
  3010. the second rule will be triggered, a shell will be started to execute
  3011. the ‘if...fi’ command, but actually it will just execute the ‘then’
  3012. branch, that is: nothing. In other words, because the witness we
  3013. selected is not the first file created by ‘foo’, ‘make’ will start a
  3014. shell to do nothing each time it is run.
  3015. A simple riposte is to fix the timestamps when this happens.
  3016. data.c: data.foo data.bar
  3017. foo data.foo data.bar
  3018. data.h data.w data.x: data.c
  3019. @if test -f $@; then \
  3020. touch $@; \
  3021. else \
  3022. ## Recover from the removal of $@
  3023. rm -f data.c; \
  3024. $(MAKE) $(AM_MAKEFLAGS) data.c; \
  3025. fi
  3026. Another solution is to use a different and dedicated file as witness,
  3027. rather than using any of ‘foo’’s outputs.
  3028. data.stamp: data.foo data.bar
  3029. @rm -f data.tmp
  3030. @touch data.tmp
  3031. foo data.foo data.bar
  3032. @mv -f data.tmp $@
  3033. data.c data.h data.w data.x: data.stamp
  3034. ## Recover from the removal of $@
  3035. @if test -f $@; then :; else \
  3036. rm -f data.stamp; \
  3037. $(MAKE) $(AM_MAKEFLAGS) data.stamp; \
  3038. fi
  3039. ‘data.tmp’ is created before ‘foo’ is run, so it has a timestamp
  3040. older than output files output by ‘foo’. It is then renamed to
  3041. ‘data.stamp’ after ‘foo’ has run, because we do not want to update
  3042. ‘data.stamp’ if ‘foo’ fails.
  3043. This solution still suffers from the second problem: the race
  3044. condition in the recover rule. If, after a successful build, a user
  3045. erases ‘data.c’ and ‘data.h’, and runs ‘make -j’, then ‘make’ may start
  3046. both recover rules in parallel. If the two instances of the rule
  3047. execute ‘$(MAKE) $(AM_MAKEFLAGS) data.stamp’ concurrently the build is
  3048. likely to fail (for instance, the two rules will create ‘data.tmp’, but
  3049. only one can rename it).
  3050. Admittedly, such a weird situation does not arise during ordinary
  3051. builds. It occurs only when the build tree is mutilated. Here ‘data.c’
  3052. and ‘data.h’ have been explicitly removed without also removing
  3053. ‘data.stamp’ and the other output files. ‘make clean; make’ will always
  3054. recover from these situations even with parallel makes, so you may
  3055. decide that the recover rule is solely to help non-parallel make users
  3056. and leave things as-is. Fixing this requires some locking mechanism to
  3057. ensure only one instance of the recover rule rebuilds ‘data.stamp’. One
  3058. could imagine something along the following lines.
  3059. data.c data.h data.w data.x: data.stamp
  3060. ## Recover from the removal of $@
  3061. @if test -f $@; then :; else \
  3062. trap 'rm -rf data.lock data.stamp' 1 2 13 15; \
  3063. ## mkdir is a portable test-and-set
  3064. if mkdir data.lock 2>/dev/null; then \
  3065. ## This code is being executed by the first process.
  3066. rm -f data.stamp; \
  3067. $(MAKE) $(AM_MAKEFLAGS) data.stamp; \
  3068. result=$$?; rm -rf data.lock; exit $$result; \
  3069. else \
  3070. ## This code is being executed by the follower processes.
  3071. ## Wait until the first process is done.
  3072. while test -d data.lock; do sleep 1; done; \
  3073. ## Succeed if and only if the first process succeeded.
  3074. test -f data.stamp; \
  3075. fi; \
  3076. fi
  3077. Using a dedicated witness, like ‘data.stamp’, is very handy when the
  3078. list of output files is not known beforehand. As an illustration,
  3079. consider the following rules to compile many ‘*.el’ files into ‘*.elc’
  3080. files in a single command. It does not matter how ‘ELFILES’ is defined
  3081. (as long as it is not empty: empty targets are not accepted by POSIX).
  3082. ELFILES = one.el two.el three.el ...
  3083. ELCFILES = $(ELFILES:=c)
  3084. elc-stamp: $(ELFILES)
  3085. @rm -f elc-temp
  3086. @touch elc-temp
  3087. $(elisp_comp) $(ELFILES)
  3088. @mv -f elc-temp $@
  3089. $(ELCFILES): elc-stamp
  3090. @if test -f $@; then :; else \
  3091. ## Recover from the removal of $@
  3092. trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
  3093. if mkdir elc-lock 2>/dev/null; then \
  3094. ## This code is being executed by the first process.
  3095. rm -f elc-stamp; \
  3096. $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
  3097. rmdir elc-lock; \
  3098. else \
  3099. ## This code is being executed by the follower processes.
  3100. ## Wait until the first process is done.
  3101. while test -d elc-lock; do sleep 1; done; \
  3102. ## Succeed if and only if the first process succeeded.
  3103. test -f elc-stamp; exit $$?; \
  3104. fi; \
  3105. fi
  3106. These solutions all still suffer from the third problem, namely that
  3107. they break the promise that ‘make -n’ should not cause any actual
  3108. changes to the tree. For those solutions that do not create lock files,
  3109. it is possible to split the recover rules into two separate recipe
  3110. commands, one of which does all work but the recursion, and the other
  3111. invokes the recursive ‘$(MAKE)’. The solutions involving locking could
  3112. act upon the contents of the ‘MAKEFLAGS’ variable, but parsing that
  3113. portably is not easy (*note (autoconf)The Make Macro MAKEFLAGS::). Here
  3114. is an example:
  3115. ELFILES = one.el two.el three.el ...
  3116. ELCFILES = $(ELFILES:=c)
  3117. elc-stamp: $(ELFILES)
  3118. @rm -f elc-temp
  3119. @touch elc-temp
  3120. $(elisp_comp) $(ELFILES)
  3121. @mv -f elc-temp $@
  3122. $(ELCFILES): elc-stamp
  3123. ## Recover from the removal of $@
  3124. @dry=; for f in x $$MAKEFLAGS; do \
  3125. case $$f in \
  3126. *=*|--*);; \
  3127. *n*) dry=:;; \
  3128. esac; \
  3129. done; \
  3130. if test -f $@; then :; else \
  3131. $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
  3132. if $$dry mkdir elc-lock 2>/dev/null; then \
  3133. ## This code is being executed by the first process.
  3134. $$dry rm -f elc-stamp; \
  3135. $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
  3136. $$dry rmdir elc-lock; \
  3137. else \
  3138. ## This code is being executed by the follower processes.
  3139. ## Wait until the first process is done.
  3140. while test -d elc-lock && test -z "$$dry"; do \
  3141. sleep 1; \
  3142. done; \
  3143. ## Succeed if and only if the first process succeeded.
  3144. $$dry test -f elc-stamp; exit $$?; \
  3145. fi; \
  3146. fi
  3147. For completeness it should be noted that GNU ‘make’ is able to
  3148. express rules with multiple output files using pattern rules (*note
  3149. Pattern Rule Examples: (make)Pattern Examples.). We do not discuss
  3150. pattern rules here because they are not portable, but they can be
  3151. convenient in packages that assume GNU ‘make’.
  3152. 
  3153. File: automake.info, Node: Hard-Coded Install Paths, Next: Debugging Make Rules, Prev: Multiple Outputs, Up: FAQ
  3154. 27.10 Installing to Hard-Coded Locations
  3155. ========================================
  3156. My package needs to install some configuration file. I tried to use
  3157. the following rule, but ‘make distcheck’ fails. Why?
  3158. # Do not do this.
  3159. install-data-local:
  3160. $(INSTALL_DATA) $(srcdir)/afile $(DESTDIR)/etc/afile
  3161. My package needs to populate the installation directory of another
  3162. package at install-time. I can easily compute that installation
  3163. directory in ‘configure’, but if I install files therein,
  3164. ‘make distcheck’ fails. How else should I do?
  3165. These two setups share their symptoms: ‘make distcheck’ fails because
  3166. they are installing files to hard-coded paths. In the later case the
  3167. path is not really hard-coded in the package, but we can consider it to
  3168. be hard-coded in the system (or in whichever tool that supplies the
  3169. path). As long as the path does not use any of the standard directory
  3170. variables (‘$(prefix)’, ‘$(bindir)’, ‘$(datadir)’, etc.), the effect
  3171. will be the same: user-installations are impossible.
  3172. As a (non-root) user who wants to install a package, you usually have
  3173. no right to install anything in ‘/usr’ or ‘/usr/local’. So you do
  3174. something like ‘./configure --prefix ~/usr’ to install a package in your
  3175. own ‘~/usr’ tree.
  3176. If a package attempts to install something to some hard-coded path
  3177. (e.g., ‘/etc/afile’), regardless of this ‘--prefix’ setting, then the
  3178. installation will fail. ‘make distcheck’ performs such a ‘--prefix’
  3179. installation, hence it will fail too.
  3180. Now, there are some easy solutions.
  3181. The above ‘install-data-local’ example for installing ‘/etc/afile’
  3182. would be better replaced by
  3183. sysconf_DATA = afile
  3184. by default ‘sysconfdir’ will be ‘$(prefix)/etc’, because this is what
  3185. the GNU Standards require. When such a package is installed on an FHS
  3186. compliant system, the installer will have to set ‘--sysconfdir=/etc’.
  3187. As the maintainer of the package you should not be concerned by such
  3188. site policies: use the appropriate standard directory variable to
  3189. install your files so that the installer can easily redefine these
  3190. variables to match their site conventions.
  3191. Installing files that should be used by another package is slightly
  3192. more involved. Let’s take an example and assume you want to install a
  3193. shared library that is a Python extension module. If you ask Python
  3194. where to install the library, it will answer something like this:
  3195. % python -c 'from distutils import sysconfig;
  3196. print sysconfig.get_python_lib(1,0)'
  3197. /usr/lib/python2.5/site-packages
  3198. If you indeed use this absolute path to install your shared library,
  3199. non-root users will not be able to install the package, hence distcheck
  3200. fails.
  3201. Let’s do better. The ‘sysconfig.get_python_lib()’ function actually
  3202. accepts a third argument that will replace Python’s installation prefix.
  3203. % python -c 'from distutils import sysconfig;
  3204. print sysconfig.get_python_lib(1,0,"${exec_prefix}")'
  3205. ${exec_prefix}/lib/python2.5/site-packages
  3206. You can also use this new path. If you do
  3207. • root users can install your package with the same ‘--prefix’ as
  3208. Python (you get the behavior of the previous attempt)
  3209. • non-root users can install your package too, they will have the
  3210. extension module in a place that is not searched by Python but they
  3211. can work around this using environment variables (and if you
  3212. installed scripts that use this shared library, it’s easy to tell
  3213. Python were to look in the beginning of your script, so the script
  3214. works in both cases).
  3215. The ‘AM_PATH_PYTHON’ macro uses similar commands to define
  3216. ‘$(pythondir)’ and ‘$(pyexecdir)’ (*note Python::).
  3217. Of course not all tools are as advanced as Python regarding that
  3218. substitution of PREFIX. So another strategy is to figure the part of
  3219. the installation directory that must be preserved. For instance, here
  3220. is how ‘AM_PATH_LISPDIR’ (*note Emacs Lisp::) computes ‘$(lispdir)’:
  3221. $EMACS -batch -Q -eval '(while load-path
  3222. (princ (concat (car load-path) "\n"))
  3223. (setq load-path (cdr load-path)))' >conftest.out
  3224. lispdir=`sed -n
  3225. -e 's,/$,,'
  3226. -e '/.*\/lib\/x*emacs\/site-lisp$/{
  3227. s,.*/lib/\(x*emacs/site-lisp\)$,${libdir}/\1,;p;q;
  3228. }'
  3229. -e '/.*\/share\/x*emacs\/site-lisp$/{
  3230. s,.*/share/\(x*emacs/site-lisp\),${datarootdir}/\1,;p;q;
  3231. }'
  3232. conftest.out`
  3233. I.e., it just picks the first directory that looks like
  3234. ‘*/lib/*emacs/site-lisp’ or ‘*/share/*emacs/site-lisp’ in the search
  3235. path of emacs, and then substitutes ‘${libdir}’ or ‘${datadir}’
  3236. appropriately.
  3237. The emacs case looks complicated because it processes a list and
  3238. expects two possible layouts, otherwise it’s easy, and the benefits for
  3239. non-root users are really worth the extra ‘sed’ invocation.
  3240. 
  3241. File: automake.info, Node: Debugging Make Rules, Next: Reporting Bugs, Prev: Hard-Coded Install Paths, Up: FAQ
  3242. 27.11 Debugging Make Rules
  3243. ==========================
  3244. The rules and dependency trees generated by ‘automake’ can get rather
  3245. complex, and leave the developer head-scratching when things don’t work
  3246. as expected. Besides the debug options provided by the ‘make’ command
  3247. (*note (make)Options Summary::), here’s a couple of further hints for
  3248. debugging makefiles generated by ‘automake’ effectively:
  3249. • If less verbose output has been enabled in the package with the use
  3250. of silent rules (*note Automake Silent Rules::), you can use ‘make
  3251. V=1’ to see the commands being executed.
  3252. • ‘make -n’ can help show what would be done without actually doing
  3253. it. Note however, that this will _still execute_ commands prefixed
  3254. with ‘+’, and, when using GNU ‘make’, commands that contain the
  3255. strings ‘$(MAKE)’ or ‘${MAKE}’ (*note (make)Instead of
  3256. Execution::). Typically, this is helpful to show what recursive
  3257. rules would do, but it means that, in your own rules, you should
  3258. not mix such recursion with actions that change any files.(1)
  3259. Furthermore, note that GNU ‘make’ will update prerequisites for the
  3260. ‘Makefile’ file itself even with ‘-n’ (*note (make)Remaking
  3261. Makefiles::).
  3262. • ‘make SHELL="/bin/bash -vx"’ can help debug complex rules. *Note
  3263. (autoconf)The Make Macro SHELL::, for some portability quirks
  3264. associated with this construct.
  3265. • ‘echo 'print: ; @echo "$(VAR)"' | make -f Makefile -f - print’ can
  3266. be handy to examine the expanded value of variables. You may need
  3267. to use a target other than ‘print’ if that is already used or a
  3268. file with that name exists.
  3269. • <http://bashdb.sourceforge.net/remake/> provides a modified GNU
  3270. ‘make’ command called ‘remake’ that copes with complex GNU
  3271. ‘make’-specific Makefiles and allows to trace execution, examine
  3272. variables, and call rules interactively, much like a debugger.
  3273. ---------- Footnotes ----------
  3274. (1) Automake’s ‘dist’ and ‘distcheck’ rules had a bug in this regard
  3275. in that they created directories even with ‘-n’, but this has been fixed
  3276. in Automake 1.11.
  3277. 
  3278. File: automake.info, Node: Reporting Bugs, Prev: Debugging Make Rules, Up: FAQ
  3279. 27.12 Reporting Bugs
  3280. ====================
  3281. Most nontrivial software has bugs. Automake is no exception. Although
  3282. we cannot promise we can or will fix a bug, and we might not even agree
  3283. that it is a bug, we want to hear about problems you encounter. Often
  3284. we agree they are bugs and want to fix them.
  3285. To make it possible for us to fix a bug, please report it. In order
  3286. to do so effectively, it helps to know when and how to do it.
  3287. Before reporting a bug, it is a good idea to see if it is already
  3288. known. You can look at the GNU Bug Tracker (http://debbugs.gnu.org/)
  3289. and the bug-automake mailing list archives
  3290. (http://lists.gnu.org/archive/html/bug-automake/) for previous bug
  3291. reports. We previously used a Gnats database
  3292. (http://sourceware.org/cgi-bin/gnatsweb.pl?database=automake) for bug
  3293. tracking, so some bugs might have been reported there already. Please
  3294. do not use it for new bug reports, however.
  3295. If the bug is not already known, it should be reported. It is very
  3296. important to report bugs in a way that is useful and efficient. For
  3297. this, please familiarize yourself with How to Report Bugs Effectively
  3298. (http://www.chiark.greenend.org.uk/~sgtatham/bugs.html) and How to Ask
  3299. Questions the Smart Way
  3300. (http://catb.org/~esr/faqs/smart-questions.html). This helps you and
  3301. developers to save time which can then be spent on fixing more bugs and
  3302. implementing more features.
  3303. For a bug report, a feature request or other suggestions, please send
  3304. email to <bug-automake@gnu.org>. This will then open a new bug in the
  3305. bug tracker (http://debbugs.gnu.org/automake). Be sure to include the
  3306. versions of Autoconf and Automake that you use. Ideally, post a minimal
  3307. ‘Makefile.am’ and ‘configure.ac’ that reproduces the problem you
  3308. encounter. If you have encountered test suite failures, please attach
  3309. the ‘test-suite.log’ file.
  3310. 
  3311. File: automake.info, Node: Copying This Manual, Next: Indices, Prev: FAQ, Up: Top
  3312. Appendix A Copying This Manual
  3313. ******************************
  3314. * Menu:
  3315. * GNU Free Documentation License:: License for copying this manual
  3316. 
  3317. File: automake.info, Node: GNU Free Documentation License, Up: Copying This Manual
  3318. A.1 GNU Free Documentation License
  3319. ==================================
  3320. Version 1.3, 3 November 2008
  3321. Copyright © 2000-2017 Free Software Foundation, Inc.
  3322. <http://fsf.org/>
  3323. Everyone is permitted to copy and distribute verbatim copies
  3324. of this license document, but changing it is not allowed.
  3325. 0. PREAMBLE
  3326. The purpose of this License is to make a manual, textbook, or other
  3327. functional and useful document “free” in the sense of freedom: to
  3328. assure everyone the effective freedom to copy and redistribute it,
  3329. with or without modifying it, either commercially or
  3330. noncommercially. Secondarily, this License preserves for the
  3331. author and publisher a way to get credit for their work, while not
  3332. being considered responsible for modifications made by others.
  3333. This License is a kind of “copyleft”, which means that derivative
  3334. works of the document must themselves be free in the same sense.
  3335. It complements the GNU General Public License, which is a copyleft
  3336. license designed for free software.
  3337. We have designed this License in order to use it for manuals for
  3338. free software, because free software needs free documentation: a
  3339. free program should come with manuals providing the same freedoms
  3340. that the software does. But this License is not limited to
  3341. software manuals; it can be used for any textual work, regardless
  3342. of subject matter or whether it is published as a printed book. We
  3343. recommend this License principally for works whose purpose is
  3344. instruction or reference.
  3345. 1. APPLICABILITY AND DEFINITIONS
  3346. This License applies to any manual or other work, in any medium,
  3347. that contains a notice placed by the copyright holder saying it can
  3348. be distributed under the terms of this License. Such a notice
  3349. grants a world-wide, royalty-free license, unlimited in duration,
  3350. to use that work under the conditions stated herein. The
  3351. “Document”, below, refers to any such manual or work. Any member
  3352. of the public is a licensee, and is addressed as “you”. You accept
  3353. the license if you copy, modify or distribute the work in a way
  3354. requiring permission under copyright law.
  3355. A “Modified Version” of the Document means any work containing the
  3356. Document or a portion of it, either copied verbatim, or with
  3357. modifications and/or translated into another language.
  3358. A “Secondary Section” is a named appendix or a front-matter section
  3359. of the Document that deals exclusively with the relationship of the
  3360. publishers or authors of the Document to the Document’s overall
  3361. subject (or to related matters) and contains nothing that could
  3362. fall directly within that overall subject. (Thus, if the Document
  3363. is in part a textbook of mathematics, a Secondary Section may not
  3364. explain any mathematics.) The relationship could be a matter of
  3365. historical connection with the subject or with related matters, or
  3366. of legal, commercial, philosophical, ethical or political position
  3367. regarding them.
  3368. The “Invariant Sections” are certain Secondary Sections whose
  3369. titles are designated, as being those of Invariant Sections, in the
  3370. notice that says that the Document is released under this License.
  3371. If a section does not fit the above definition of Secondary then it
  3372. is not allowed to be designated as Invariant. The Document may
  3373. contain zero Invariant Sections. If the Document does not identify
  3374. any Invariant Sections then there are none.
  3375. The “Cover Texts” are certain short passages of text that are
  3376. listed, as Front-Cover Texts or Back-Cover Texts, in the notice
  3377. that says that the Document is released under this License. A
  3378. Front-Cover Text may be at most 5 words, and a Back-Cover Text may
  3379. be at most 25 words.
  3380. A “Transparent” copy of the Document means a machine-readable copy,
  3381. represented in a format whose specification is available to the
  3382. general public, that is suitable for revising the document
  3383. straightforwardly with generic text editors or (for images composed
  3384. of pixels) generic paint programs or (for drawings) some widely
  3385. available drawing editor, and that is suitable for input to text
  3386. formatters or for automatic translation to a variety of formats
  3387. suitable for input to text formatters. A copy made in an otherwise
  3388. Transparent file format whose markup, or absence of markup, has
  3389. been arranged to thwart or discourage subsequent modification by
  3390. readers is not Transparent. An image format is not Transparent if
  3391. used for any substantial amount of text. A copy that is not
  3392. “Transparent” is called “Opaque”.
  3393. Examples of suitable formats for Transparent copies include plain
  3394. ASCII without markup, Texinfo input format, LaTeX input format,
  3395. SGML or XML using a publicly available DTD, and standard-conforming
  3396. simple HTML, PostScript or PDF designed for human modification.
  3397. Examples of transparent image formats include PNG, XCF and JPG.
  3398. Opaque formats include proprietary formats that can be read and
  3399. edited only by proprietary word processors, SGML or XML for which
  3400. the DTD and/or processing tools are not generally available, and
  3401. the machine-generated HTML, PostScript or PDF produced by some word
  3402. processors for output purposes only.
  3403. The “Title Page” means, for a printed book, the title page itself,
  3404. plus such following pages as are needed to hold, legibly, the
  3405. material this License requires to appear in the title page. For
  3406. works in formats which do not have any title page as such, “Title
  3407. Page” means the text near the most prominent appearance of the
  3408. work’s title, preceding the beginning of the body of the text.
  3409. The “publisher” means any person or entity that distributes copies
  3410. of the Document to the public.
  3411. A section “Entitled XYZ” means a named subunit of the Document
  3412. whose title either is precisely XYZ or contains XYZ in parentheses
  3413. following text that translates XYZ in another language. (Here XYZ
  3414. stands for a specific section name mentioned below, such as
  3415. “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.)
  3416. To “Preserve the Title” of such a section when you modify the
  3417. Document means that it remains a section “Entitled XYZ” according
  3418. to this definition.
  3419. The Document may include Warranty Disclaimers next to the notice
  3420. which states that this License applies to the Document. These
  3421. Warranty Disclaimers are considered to be included by reference in
  3422. this License, but only as regards disclaiming warranties: any other
  3423. implication that these Warranty Disclaimers may have is void and
  3424. has no effect on the meaning of this License.
  3425. 2. VERBATIM COPYING
  3426. You may copy and distribute the Document in any medium, either
  3427. commercially or noncommercially, provided that this License, the
  3428. copyright notices, and the license notice saying this License
  3429. applies to the Document are reproduced in all copies, and that you
  3430. add no other conditions whatsoever to those of this License. You
  3431. may not use technical measures to obstruct or control the reading
  3432. or further copying of the copies you make or distribute. However,
  3433. you may accept compensation in exchange for copies. If you
  3434. distribute a large enough number of copies you must also follow the
  3435. conditions in section 3.
  3436. You may also lend copies, under the same conditions stated above,
  3437. and you may publicly display copies.
  3438. 3. COPYING IN QUANTITY
  3439. If you publish printed copies (or copies in media that commonly
  3440. have printed covers) of the Document, numbering more than 100, and
  3441. the Document’s license notice requires Cover Texts, you must
  3442. enclose the copies in covers that carry, clearly and legibly, all
  3443. of these Cover Texts: Front-Cover Texts on the front cover, and
  3444. Back-Cover Texts on the back cover. Both covers must also clearly
  3445. and legibly identify you as the publisher of these copies. The
  3446. front cover must present the full title with all words of the title
  3447. equally prominent and visible. You may add other material on the
  3448. covers in addition. Copying with changes limited to the covers, as
  3449. long as they preserve the title of the Document and satisfy these
  3450. conditions, can be treated as verbatim copying in other respects.
  3451. If the required texts for either cover are too voluminous to fit
  3452. legibly, you should put the first ones listed (as many as fit
  3453. reasonably) on the actual cover, and continue the rest onto
  3454. adjacent pages.
  3455. If you publish or distribute Opaque copies of the Document
  3456. numbering more than 100, you must either include a machine-readable
  3457. Transparent copy along with each Opaque copy, or state in or with
  3458. each Opaque copy a computer-network location from which the general
  3459. network-using public has access to download using public-standard
  3460. network protocols a complete Transparent copy of the Document, free
  3461. of added material. If you use the latter option, you must take
  3462. reasonably prudent steps, when you begin distribution of Opaque
  3463. copies in quantity, to ensure that this Transparent copy will
  3464. remain thus accessible at the stated location until at least one
  3465. year after the last time you distribute an Opaque copy (directly or
  3466. through your agents or retailers) of that edition to the public.
  3467. It is requested, but not required, that you contact the authors of
  3468. the Document well before redistributing any large number of copies,
  3469. to give them a chance to provide you with an updated version of the
  3470. Document.
  3471. 4. MODIFICATIONS
  3472. You may copy and distribute a Modified Version of the Document
  3473. under the conditions of sections 2 and 3 above, provided that you
  3474. release the Modified Version under precisely this License, with the
  3475. Modified Version filling the role of the Document, thus licensing
  3476. distribution and modification of the Modified Version to whoever
  3477. possesses a copy of it. In addition, you must do these things in
  3478. the Modified Version:
  3479. A. Use in the Title Page (and on the covers, if any) a title
  3480. distinct from that of the Document, and from those of previous
  3481. versions (which should, if there were any, be listed in the
  3482. History section of the Document). You may use the same title
  3483. as a previous version if the original publisher of that
  3484. version gives permission.
  3485. B. List on the Title Page, as authors, one or more persons or
  3486. entities responsible for authorship of the modifications in
  3487. the Modified Version, together with at least five of the
  3488. principal authors of the Document (all of its principal
  3489. authors, if it has fewer than five), unless they release you
  3490. from this requirement.
  3491. C. State on the Title page the name of the publisher of the
  3492. Modified Version, as the publisher.
  3493. D. Preserve all the copyright notices of the Document.
  3494. E. Add an appropriate copyright notice for your modifications
  3495. adjacent to the other copyright notices.
  3496. F. Include, immediately after the copyright notices, a license
  3497. notice giving the public permission to use the Modified
  3498. Version under the terms of this License, in the form shown in
  3499. the Addendum below.
  3500. G. Preserve in that license notice the full lists of Invariant
  3501. Sections and required Cover Texts given in the Document’s
  3502. license notice.
  3503. H. Include an unaltered copy of this License.
  3504. I. Preserve the section Entitled “History”, Preserve its Title,
  3505. and add to it an item stating at least the title, year, new
  3506. authors, and publisher of the Modified Version as given on the
  3507. Title Page. If there is no section Entitled “History” in the
  3508. Document, create one stating the title, year, authors, and
  3509. publisher of the Document as given on its Title Page, then add
  3510. an item describing the Modified Version as stated in the
  3511. previous sentence.
  3512. J. Preserve the network location, if any, given in the Document
  3513. for public access to a Transparent copy of the Document, and
  3514. likewise the network locations given in the Document for
  3515. previous versions it was based on. These may be placed in the
  3516. “History” section. You may omit a network location for a work
  3517. that was published at least four years before the Document
  3518. itself, or if the original publisher of the version it refers
  3519. to gives permission.
  3520. K. For any section Entitled “Acknowledgements” or “Dedications”,
  3521. Preserve the Title of the section, and preserve in the section
  3522. all the substance and tone of each of the contributor
  3523. acknowledgements and/or dedications given therein.
  3524. L. Preserve all the Invariant Sections of the Document, unaltered
  3525. in their text and in their titles. Section numbers or the
  3526. equivalent are not considered part of the section titles.
  3527. M. Delete any section Entitled “Endorsements”. Such a section
  3528. may not be included in the Modified Version.
  3529. N. Do not retitle any existing section to be Entitled
  3530. “Endorsements” or to conflict in title with any Invariant
  3531. Section.
  3532. O. Preserve any Warranty Disclaimers.
  3533. If the Modified Version includes new front-matter sections or
  3534. appendices that qualify as Secondary Sections and contain no
  3535. material copied from the Document, you may at your option designate
  3536. some or all of these sections as invariant. To do this, add their
  3537. titles to the list of Invariant Sections in the Modified Version’s
  3538. license notice. These titles must be distinct from any other
  3539. section titles.
  3540. You may add a section Entitled “Endorsements”, provided it contains
  3541. nothing but endorsements of your Modified Version by various
  3542. parties—for example, statements of peer review or that the text has
  3543. been approved by an organization as the authoritative definition of
  3544. a standard.
  3545. You may add a passage of up to five words as a Front-Cover Text,
  3546. and a passage of up to 25 words as a Back-Cover Text, to the end of
  3547. the list of Cover Texts in the Modified Version. Only one passage
  3548. of Front-Cover Text and one of Back-Cover Text may be added by (or
  3549. through arrangements made by) any one entity. If the Document
  3550. already includes a cover text for the same cover, previously added
  3551. by you or by arrangement made by the same entity you are acting on
  3552. behalf of, you may not add another; but you may replace the old
  3553. one, on explicit permission from the previous publisher that added
  3554. the old one.
  3555. The author(s) and publisher(s) of the Document do not by this
  3556. License give permission to use their names for publicity for or to
  3557. assert or imply endorsement of any Modified Version.
  3558. 5. COMBINING DOCUMENTS
  3559. You may combine the Document with other documents released under
  3560. this License, under the terms defined in section 4 above for
  3561. modified versions, provided that you include in the combination all
  3562. of the Invariant Sections of all of the original documents,
  3563. unmodified, and list them all as Invariant Sections of your
  3564. combined work in its license notice, and that you preserve all
  3565. their Warranty Disclaimers.
  3566. The combined work need only contain one copy of this License, and
  3567. multiple identical Invariant Sections may be replaced with a single
  3568. copy. If there are multiple Invariant Sections with the same name
  3569. but different contents, make the title of each such section unique
  3570. by adding at the end of it, in parentheses, the name of the
  3571. original author or publisher of that section if known, or else a
  3572. unique number. Make the same adjustment to the section titles in
  3573. the list of Invariant Sections in the license notice of the
  3574. combined work.
  3575. In the combination, you must combine any sections Entitled
  3576. “History” in the various original documents, forming one section
  3577. Entitled “History”; likewise combine any sections Entitled
  3578. “Acknowledgements”, and any sections Entitled “Dedications”. You
  3579. must delete all sections Entitled “Endorsements.”
  3580. 6. COLLECTIONS OF DOCUMENTS
  3581. You may make a collection consisting of the Document and other
  3582. documents released under this License, and replace the individual
  3583. copies of this License in the various documents with a single copy
  3584. that is included in the collection, provided that you follow the
  3585. rules of this License for verbatim copying of each of the documents
  3586. in all other respects.
  3587. You may extract a single document from such a collection, and
  3588. distribute it individually under this License, provided you insert
  3589. a copy of this License into the extracted document, and follow this
  3590. License in all other respects regarding verbatim copying of that
  3591. document.
  3592. 7. AGGREGATION WITH INDEPENDENT WORKS
  3593. A compilation of the Document or its derivatives with other
  3594. separate and independent documents or works, in or on a volume of a
  3595. storage or distribution medium, is called an “aggregate” if the
  3596. copyright resulting from the compilation is not used to limit the
  3597. legal rights of the compilation’s users beyond what the individual
  3598. works permit. When the Document is included in an aggregate, this
  3599. License does not apply to the other works in the aggregate which
  3600. are not themselves derivative works of the Document.
  3601. If the Cover Text requirement of section 3 is applicable to these
  3602. copies of the Document, then if the Document is less than one half
  3603. of the entire aggregate, the Document’s Cover Texts may be placed
  3604. on covers that bracket the Document within the aggregate, or the
  3605. electronic equivalent of covers if the Document is in electronic
  3606. form. Otherwise they must appear on printed covers that bracket
  3607. the whole aggregate.
  3608. 8. TRANSLATION
  3609. Translation is considered a kind of modification, so you may
  3610. distribute translations of the Document under the terms of section
  3611. 4. Replacing Invariant Sections with translations requires special
  3612. permission from their copyright holders, but you may include
  3613. translations of some or all Invariant Sections in addition to the
  3614. original versions of these Invariant Sections. You may include a
  3615. translation of this License, and all the license notices in the
  3616. Document, and any Warranty Disclaimers, provided that you also
  3617. include the original English version of this License and the
  3618. original versions of those notices and disclaimers. In case of a
  3619. disagreement between the translation and the original version of
  3620. this License or a notice or disclaimer, the original version will
  3621. prevail.
  3622. If a section in the Document is Entitled “Acknowledgements”,
  3623. “Dedications”, or “History”, the requirement (section 4) to
  3624. Preserve its Title (section 1) will typically require changing the
  3625. actual title.
  3626. 9. TERMINATION
  3627. You may not copy, modify, sublicense, or distribute the Document
  3628. except as expressly provided under this License. Any attempt
  3629. otherwise to copy, modify, sublicense, or distribute it is void,
  3630. and will automatically terminate your rights under this License.
  3631. However, if you cease all violation of this License, then your
  3632. license from a particular copyright holder is reinstated (a)
  3633. provisionally, unless and until the copyright holder explicitly and
  3634. finally terminates your license, and (b) permanently, if the
  3635. copyright holder fails to notify you of the violation by some
  3636. reasonable means prior to 60 days after the cessation.
  3637. Moreover, your license from a particular copyright holder is
  3638. reinstated permanently if the copyright holder notifies you of the
  3639. violation by some reasonable means, this is the first time you have
  3640. received notice of violation of this License (for any work) from
  3641. that copyright holder, and you cure the violation prior to 30 days
  3642. after your receipt of the notice.
  3643. Termination of your rights under this section does not terminate
  3644. the licenses of parties who have received copies or rights from you
  3645. under this License. If your rights have been terminated and not
  3646. permanently reinstated, receipt of a copy of some or all of the
  3647. same material does not give you any rights to use it.
  3648. 10. FUTURE REVISIONS OF THIS LICENSE
  3649. The Free Software Foundation may publish new, revised versions of
  3650. the GNU Free Documentation License from time to time. Such new
  3651. versions will be similar in spirit to the present version, but may
  3652. differ in detail to address new problems or concerns. See
  3653. <http://www.gnu.org/copyleft/>.
  3654. Each version of the License is given a distinguishing version
  3655. number. If the Document specifies that a particular numbered
  3656. version of this License “or any later version” applies to it, you
  3657. have the option of following the terms and conditions either of
  3658. that specified version or of any later version that has been
  3659. published (not as a draft) by the Free Software Foundation. If the
  3660. Document does not specify a version number of this License, you may
  3661. choose any version ever published (not as a draft) by the Free
  3662. Software Foundation. If the Document specifies that a proxy can
  3663. decide which future versions of this License can be used, that
  3664. proxy’s public statement of acceptance of a version permanently
  3665. authorizes you to choose that version for the Document.
  3666. 11. RELICENSING
  3667. “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any
  3668. World Wide Web server that publishes copyrightable works and also
  3669. provides prominent facilities for anybody to edit those works. A
  3670. public wiki that anybody can edit is an example of such a server.
  3671. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the
  3672. site means any set of copyrightable works thus published on the MMC
  3673. site.
  3674. “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0
  3675. license published by Creative Commons Corporation, a not-for-profit
  3676. corporation with a principal place of business in San Francisco,
  3677. California, as well as future copyleft versions of that license
  3678. published by that same organization.
  3679. “Incorporate” means to publish or republish a Document, in whole or
  3680. in part, as part of another Document.
  3681. An MMC is “eligible for relicensing” if it is licensed under this
  3682. License, and if all works that were first published under this
  3683. License somewhere other than this MMC, and subsequently
  3684. incorporated in whole or in part into the MMC, (1) had no cover
  3685. texts or invariant sections, and (2) were thus incorporated prior
  3686. to November 1, 2008.
  3687. The operator of an MMC Site may republish an MMC contained in the
  3688. site under CC-BY-SA on the same site at any time before August 1,
  3689. 2009, provided the MMC is eligible for relicensing.
  3690. ADDENDUM: How to use this License for your documents
  3691. ====================================================
  3692. To use this License in a document you have written, include a copy of
  3693. the License in the document and put the following copyright and license
  3694. notices just after the title page:
  3695. Copyright (C) YEAR YOUR NAME.
  3696. Permission is granted to copy, distribute and/or modify this document
  3697. under the terms of the GNU Free Documentation License, Version 1.3
  3698. or any later version published by the Free Software Foundation;
  3699. with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
  3700. Texts. A copy of the license is included in the section entitled ``GNU
  3701. Free Documentation License''.
  3702. If you have Invariant Sections, Front-Cover Texts and Back-Cover
  3703. Texts, replace the “with...Texts.” line with this:
  3704. with the Invariant Sections being LIST THEIR TITLES, with
  3705. the Front-Cover Texts being LIST, and with the Back-Cover Texts
  3706. being LIST.
  3707. If you have Invariant Sections without Cover Texts, or some other
  3708. combination of the three, merge those two alternatives to suit the
  3709. situation.
  3710. If your document contains nontrivial examples of program code, we
  3711. recommend releasing these examples in parallel under your choice of free
  3712. software license, such as the GNU General Public License, to permit
  3713. their use in free software.
  3714. 
  3715. File: automake.info, Node: Indices, Prev: Copying This Manual, Up: Top
  3716. Appendix B Indices
  3717. ******************
  3718. * Menu:
  3719. * Macro Index:: Index of Autoconf macros
  3720. * Variable Index:: Index of Makefile variables
  3721. * General Index:: General index
  3722. 
  3723. File: automake.info, Node: Macro Index, Next: Variable Index, Up: Indices
  3724. B.1 Macro Index
  3725. ===============
  3726. �[index�]
  3727. * Menu:
  3728. * _AM_DEPENDENCIES: Private Macros. (line 12)
  3729. * AC_CANONICAL_BUILD: Optional. (line 11)
  3730. * AC_CANONICAL_HOST: Optional. (line 12)
  3731. * AC_CANONICAL_TARGET: Optional. (line 13)
  3732. * AC_CONFIG_AUX_DIR: Optional. (line 19)
  3733. * AC_CONFIG_AUX_DIR <1>: Subpackages. (line 6)
  3734. * AC_CONFIG_FILES: Requirements. (line 15)
  3735. * AC_CONFIG_HEADERS: Optional. (line 44)
  3736. * AC_CONFIG_LIBOBJ_DIR: Optional. (line 40)
  3737. * AC_CONFIG_LIBOBJ_DIR <1>: LIBOBJS. (line 51)
  3738. * AC_CONFIG_LINKS: Optional. (line 55)
  3739. * AC_CONFIG_SUBDIRS: Subpackages. (line 6)
  3740. * AC_DEFUN: Extending aclocal. (line 36)
  3741. * AC_F77_LIBRARY_LDFLAGS: Optional. (line 101)
  3742. * AC_FC_SRCEXT: Optional. (line 107)
  3743. * AC_INIT: Public Macros. (line 15)
  3744. * AC_LIBOBJ: Optional. (line 65)
  3745. * AC_LIBOBJ <1>: LTLIBOBJS. (line 6)
  3746. * AC_LIBOBJ <2>: LIBOBJS. (line 11)
  3747. * AC_LIBSOURCE: Optional. (line 66)
  3748. * AC_LIBSOURCE <1>: LIBOBJS. (line 17)
  3749. * AC_LIBSOURCES: Optional. (line 67)
  3750. * AC_OUTPUT: Requirements. (line 15)
  3751. * AC_PREREQ: Extending aclocal. (line 36)
  3752. * AC_PROG_CXX: Optional. (line 85)
  3753. * AC_PROG_F77: Optional. (line 97)
  3754. * AC_PROG_FC: Optional. (line 112)
  3755. * AC_PROG_LEX: Public Macros. (line 95)
  3756. * AC_PROG_LEX <1>: Optional. (line 127)
  3757. * AC_PROG_LIBTOOL: Optional. (line 117)
  3758. * AC_PROG_OBJC: Optional. (line 89)
  3759. * AC_PROG_OBJCXX: Optional. (line 93)
  3760. * AC_PROG_RANLIB: Optional. (line 81)
  3761. * AC_PROG_YACC: Optional. (line 121)
  3762. * AC_REQUIRE_AUX_FILE: Optional. (line 131)
  3763. * AC_SUBST: Optional. (line 139)
  3764. * AM_CONDITIONAL: Optional. (line 152)
  3765. * AM_CONDITIONAL <1>: Usage of Conditionals.
  3766. (line 6)
  3767. * AM_CONDITIONAL <2>: Usage of Conditionals.
  3768. (line 9)
  3769. * AM_COND_IF: Optional. (line 155)
  3770. * AM_COND_IF <1>: Usage of Conditionals.
  3771. (line 66)
  3772. * AM_COND_IF <2>: Usage of Conditionals.
  3773. (line 70)
  3774. * AM_DEP_TRACK: Private Macros. (line 14)
  3775. * AM_GNU_GETTEXT: Optional. (line 161)
  3776. * AM_GNU_GETTEXT_INTL_SUBDIR: Optional. (line 167)
  3777. * AM_INIT_AUTOMAKE: Requirements. (line 6)
  3778. * AM_INIT_AUTOMAKE <1>: Public Macros. (line 7)
  3779. * AM_MAINTAINER_MODE: Rebuilding. (line 9)
  3780. * AM_MAINTAINER_MODE <1>: maintainer-mode. (line 37)
  3781. * AM_MAINTAINER_MODE([DEFAULT-MODE]): Optional. (line 172)
  3782. * AM_MAKE_INCLUDE: Private Macros. (line 20)
  3783. * AM_MISSING_PROG: Public Macros. (line 111)
  3784. * AM_OUTPUT_DEPENDENCY_COMMANDS: Private Macros. (line 15)
  3785. * AM_PATH_LISPDIR: Public Macros. (line 61)
  3786. * AM_PATH_PYTHON: Python. (line 28)
  3787. * AM_PROG_AR: Public Macros. (line 76)
  3788. * AM_PROG_AS: Public Macros. (line 83)
  3789. * AM_PROG_CC_C_O: Public Macros. (line 88)
  3790. * AM_PROG_GCJ: Public Macros. (line 100)
  3791. * AM_PROG_INSTALL_STRIP: Private Macros. (line 25)
  3792. * AM_PROG_LEX: Public Macros. (line 95)
  3793. * AM_PROG_MKDIR_P: Obsolete Macros. (line 14)
  3794. * AM_PROG_UPC: Public Macros. (line 105)
  3795. * AM_PROG_VALAC: Vala Support. (line 20)
  3796. * AM_SANITY_CHECK: Private Macros. (line 30)
  3797. * AM_SET_DEPDIR: Private Macros. (line 13)
  3798. * AM_SILENT_RULES: Public Macros. (line 119)
  3799. * AM_SUBST_NOTMAKE(VAR): Optional. (line 180)
  3800. * AM_WITH_DMALLOC: Public Macros. (line 123)
  3801. * m4_include: Basics of Distribution.
  3802. (line 17)
  3803. * m4_include <1>: Optional. (line 190)
  3804. 
  3805. File: automake.info, Node: Variable Index, Next: General Index, Prev: Macro Index, Up: Indices
  3806. B.2 Variable Index
  3807. ==================
  3808. �[index�]
  3809. * Menu:
  3810. * _DATA: Data. (line 6)
  3811. * _HEADERS: Headers. (line 6)
  3812. * _LIBRARIES: A Library. (line 6)
  3813. * _LISP: Emacs Lisp. (line 6)
  3814. * _LOG_COMPILE: Parallel Test Harness.
  3815. (line 51)
  3816. * _LOG_COMPILER: Parallel Test Harness.
  3817. (line 51)
  3818. * _LOG_DRIVER: Declaring Custom Test Drivers.
  3819. (line 6)
  3820. * _LOG_DRIVER_FLAGS: Declaring Custom Test Drivers.
  3821. (line 6)
  3822. * _LOG_FLAGS: Parallel Test Harness.
  3823. (line 51)
  3824. * _LTLIBRARIES: Libtool Libraries. (line 6)
  3825. * _MANS: Man Pages. (line 6)
  3826. * _PROGRAMS: Uniform. (line 11)
  3827. * _PROGRAMS <1>: Program Sources. (line 6)
  3828. * _PYTHON: Python. (line 6)
  3829. * _SCRIPTS: Scripts. (line 6)
  3830. * _SOURCES: Program Sources. (line 32)
  3831. * _SOURCES <1>: Program Sources. (line 33)
  3832. * _SOURCES <2>: Default _SOURCES. (line 6)
  3833. * _TEXINFOS: Texinfo. (line 6)
  3834. * _TEXINFOS <1>: Texinfo. (line 65)
  3835. * ALLOCA: LTLIBOBJS. (line 6)
  3836. * ALLOCA <1>: LIBOBJS. (line 6)
  3837. * AM_CCASFLAGS: Assembly Support. (line 10)
  3838. * AM_CFLAGS: Program Variables. (line 50)
  3839. * AM_COLOR_TESTS: Scripts-based Testsuites.
  3840. (line 67)
  3841. * AM_CPPFLAGS: Program Variables. (line 16)
  3842. * AM_CPPFLAGS <1>: Assembly Support. (line 10)
  3843. * AM_CXXFLAGS: C++ Support. (line 22)
  3844. * AM_DEFAULT_SOURCE_EXT: Default _SOURCES. (line 6)
  3845. * AM_DEFAULT_V: Automake Silent Rules.
  3846. (line 120)
  3847. * AM_DEFAULT_VERBOSITY: Automake Silent Rules.
  3848. (line 120)
  3849. * AM_DISTCHECK_CONFIGURE_FLAGS: Checking the Distribution.
  3850. (line 28)
  3851. * AM_ETAGSFLAGS: Tags. (line 25)
  3852. * AM_EXT_LOG_DRIVER_FLAGS: Declaring Custom Test Drivers.
  3853. (line 6)
  3854. * AM_EXT_LOG_FLAGS: Parallel Test Harness.
  3855. (line 51)
  3856. * AM_FCFLAGS: Fortran 9x Support. (line 22)
  3857. * AM_FFLAGS: Fortran 77 Support. (line 22)
  3858. * AM_GCJFLAGS: Java Support with gcj.
  3859. (line 26)
  3860. * AM_INSTALLCHECK_STD_OPTIONS_EXEMPT: List of Automake options.
  3861. (line 135)
  3862. * AM_JAVACFLAGS: Java. (line 44)
  3863. * AM_LDFLAGS: Linking. (line 10)
  3864. * AM_LDFLAGS <1>: Program Variables. (line 59)
  3865. * AM_LFLAGS: Yacc and Lex. (line 60)
  3866. * AM_LIBTOOLFLAGS: Libtool Flags. (line 6)
  3867. * AM_LOG_DRIVER_FLAGS: Declaring Custom Test Drivers.
  3868. (line 6)
  3869. * AM_LOG_FLAGS: Parallel Test Harness.
  3870. (line 51)
  3871. * AM_MAKEFLAGS: Subdirectories. (line 29)
  3872. * AM_MAKEINFOFLAGS: Texinfo. (line 115)
  3873. * AM_MAKEINFOHTMLFLAGS: Texinfo. (line 116)
  3874. * AM_OBJCFLAGS: Objective C Support. (line 22)
  3875. * AM_OBJCXXFLAGS: Objective C++ Support.
  3876. (line 22)
  3877. * AM_RFLAGS: Fortran 77 Support. (line 28)
  3878. * AM_RUNTESTFLAGS: DejaGnu Tests. (line 24)
  3879. * AM_TESTS_ENVIRONMENT: Scripts-based Testsuites.
  3880. (line 86)
  3881. * AM_TESTS_FD_REDIRECT: Scripts-based Testsuites.
  3882. (line 94)
  3883. * AM_UPCFLAGS: Unified Parallel C Support.
  3884. (line 21)
  3885. * AM_UPDATE_INFO_DIR: Texinfo. (line 92)
  3886. * AM_V: Automake Silent Rules.
  3887. (line 120)
  3888. * AM_VALAFLAGS: Vala Support. (line 41)
  3889. * AM_V_at: Automake Silent Rules.
  3890. (line 120)
  3891. * AM_V_GEN: Automake Silent Rules.
  3892. (line 120)
  3893. * AM_YFLAGS: Yacc and Lex. (line 37)
  3894. * AR: Public Macros. (line 76)
  3895. * AUTOCONF: automake Invocation. (line 28)
  3896. * AUTOM4TE: aclocal Invocation. (line 44)
  3897. * AUTOMAKE_JOBS: automake Invocation. (line 174)
  3898. * AUTOMAKE_OPTIONS: Public Macros. (line 10)
  3899. * AUTOMAKE_OPTIONS <1>: Dependencies. (line 34)
  3900. * AUTOMAKE_OPTIONS <2>: List of Automake options.
  3901. (line 6)
  3902. * bin_PROGRAMS: Program Sources. (line 6)
  3903. * bin_SCRIPTS: Scripts. (line 18)
  3904. * build_triplet: Optional. (line 14)
  3905. * BUILT_SOURCES: Sources. (line 27)
  3906. * BZIP2: The Types of Distributions.
  3907. (line 13)
  3908. * CC: Program Variables. (line 12)
  3909. * CCAS: Public Macros. (line 83)
  3910. * CCAS <1>: Assembly Support. (line 10)
  3911. * CCASFLAGS: Public Macros. (line 83)
  3912. * CCASFLAGS <1>: Assembly Support. (line 10)
  3913. * CFLAGS: Program Variables. (line 12)
  3914. * check_: Uniform. (line 95)
  3915. * check_LTLIBRARIES: Libtool Convenience Libraries.
  3916. (line 6)
  3917. * check_PROGRAMS: Program Sources. (line 6)
  3918. * check_PROGRAMS <1>: Default _SOURCES. (line 28)
  3919. * check_SCRIPTS: Scripts. (line 18)
  3920. * CLASSPATH_ENV: Java. (line 53)
  3921. * CLEANFILES: Clean. (line 13)
  3922. * COMPILE: Program Variables. (line 55)
  3923. * CONFIGURE_DEPENDENCIES: Rebuilding. (line 12)
  3924. * CONFIG_STATUS_DEPENDENCIES: Rebuilding. (line 12)
  3925. * CPPFLAGS: Program Variables. (line 12)
  3926. * CPPFLAGS <1>: Assembly Support. (line 10)
  3927. * CXX: C++ Support. (line 16)
  3928. * CXXCOMPILE: C++ Support. (line 25)
  3929. * CXXFLAGS: C++ Support. (line 19)
  3930. * CXXLINK: C++ Support. (line 29)
  3931. * CXXLINK <1>: How the Linker is Chosen.
  3932. (line 12)
  3933. * DATA: Uniform. (line 101)
  3934. * DATA <1>: Data. (line 7)
  3935. * data_DATA: Data. (line 9)
  3936. * DEFS: Program Variables. (line 12)
  3937. * DEJATOOL: DejaGnu Tests. (line 19)
  3938. * DESTDIR: DESTDIR. (line 6)
  3939. * DESTDIR <1>: Staged Installs. (line 6)
  3940. * DISABLE_HARD_ERRORS: Scripts-based Testsuites.
  3941. (line 32)
  3942. * DISTCHECK_CONFIGURE_FLAGS: Checking the Distribution.
  3943. (line 28)
  3944. * distcleancheck_listfiles: Checking the Distribution.
  3945. (line 70)
  3946. * distcleancheck_listfiles <1>: Errors with distclean.
  3947. (line 112)
  3948. * DISTCLEANFILES: Clean. (line 13)
  3949. * DISTCLEANFILES <1>: Checking the Distribution.
  3950. (line 70)
  3951. * distdir: The dist Hook. (line 33)
  3952. * distdir <1>: Third-Party Makefiles.
  3953. (line 25)
  3954. * distuninstallcheck_listfiles: Checking the Distribution.
  3955. (line 106)
  3956. * dist_: Alternative. (line 29)
  3957. * dist_ <1>: Fine-grained Distribution Control.
  3958. (line 6)
  3959. * dist_lisp_LISP: Emacs Lisp. (line 11)
  3960. * dist_noinst_LISP: Emacs Lisp. (line 11)
  3961. * DIST_SUBDIRS: Subdirectories with AM_CONDITIONAL.
  3962. (line 25)
  3963. * DIST_SUBDIRS <1>: Basics of Distribution.
  3964. (line 47)
  3965. * DVIPS: Texinfo. (line 141)
  3966. * EMACS: Public Macros. (line 61)
  3967. * ETAGSFLAGS: Tags. (line 25)
  3968. * ETAGS_ARGS: Tags. (line 25)
  3969. * EXPECT: DejaGnu Tests. (line 19)
  3970. * EXTRA_DIST: Basics of Distribution.
  3971. (line 34)
  3972. * EXTRA_maude_DEPENDENCIES: Linking. (line 41)
  3973. * EXTRA_maude_DEPENDENCIES <1>: Program and Library Variables.
  3974. (line 119)
  3975. * EXTRA_maude_SOURCES: Program and Library Variables.
  3976. (line 53)
  3977. * EXTRA_PROGRAMS: Conditional Programs.
  3978. (line 15)
  3979. * EXT_LOG_COMPILE: Parallel Test Harness.
  3980. (line 51)
  3981. * EXT_LOG_COMPILER: Parallel Test Harness.
  3982. (line 51)
  3983. * EXT_LOG_DRIVER: Declaring Custom Test Drivers.
  3984. (line 6)
  3985. * EXT_LOG_DRIVER_FLAGS: Declaring Custom Test Drivers.
  3986. (line 6)
  3987. * EXT_LOG_FLAGS: Parallel Test Harness.
  3988. (line 51)
  3989. * F77: Fortran 77 Support. (line 16)
  3990. * F77COMPILE: Fortran 77 Support. (line 31)
  3991. * F77LINK: How the Linker is Chosen.
  3992. (line 13)
  3993. * FC: Fortran 9x Support. (line 16)
  3994. * FCCOMPILE: Fortran 9x Support. (line 25)
  3995. * FCFLAGS: Fortran 9x Support. (line 19)
  3996. * FCLINK: How the Linker is Chosen.
  3997. (line 14)
  3998. * FCLINK <1>: Fortran 9x Support. (line 29)
  3999. * FFLAGS: Fortran 77 Support. (line 19)
  4000. * FLIBS: Mixing Fortran 77 With C and C++.
  4001. (line 21)
  4002. * FLINK: Fortran 77 Support. (line 35)
  4003. * GCJ: Public Macros. (line 100)
  4004. * GCJFLAGS: Public Macros. (line 100)
  4005. * GCJFLAGS <1>: Java Support with gcj.
  4006. (line 16)
  4007. * GCJLINK: How the Linker is Chosen.
  4008. (line 10)
  4009. * GTAGS_ARGS: Tags. (line 60)
  4010. * GZIP_ENV: Basics of Distribution.
  4011. (line 14)
  4012. * HEADERS: Uniform. (line 101)
  4013. * host_triplet: Optional. (line 14)
  4014. * INCLUDES: Program Variables. (line 44)
  4015. * include_HEADERS: Headers. (line 6)
  4016. * info_TEXINFOS: Texinfo. (line 6)
  4017. * JAVA: Uniform. (line 101)
  4018. * JAVAC: Java. (line 37)
  4019. * JAVACFLAGS: Java. (line 40)
  4020. * JAVAROOT: Java. (line 49)
  4021. * LDADD: Linking. (line 10)
  4022. * LDFLAGS: Program Variables. (line 12)
  4023. * LFLAGS: Yacc and Lex. (line 60)
  4024. * libexec_PROGRAMS: Program Sources. (line 6)
  4025. * libexec_SCRIPTS: Scripts. (line 18)
  4026. * LIBOBJS: Optional. (line 68)
  4027. * LIBOBJS <1>: LTLIBOBJS. (line 6)
  4028. * LIBOBJS <2>: LIBOBJS. (line 6)
  4029. * LIBRARIES: Uniform. (line 101)
  4030. * LIBS: Program Variables. (line 12)
  4031. * LIBTOOLFLAGS: Libtool Flags. (line 6)
  4032. * lib_LIBRARIES: A Library. (line 6)
  4033. * lib_LTLIBRARIES: Libtool Libraries. (line 6)
  4034. * LINK: Program Variables. (line 64)
  4035. * LINK <1>: How the Linker is Chosen.
  4036. (line 17)
  4037. * LISP: Uniform. (line 101)
  4038. * lispdir: Public Macros. (line 61)
  4039. * lisp_LISP: Emacs Lisp. (line 6)
  4040. * localstate_DATA: Data. (line 9)
  4041. * LOG_COMPILE: Parallel Test Harness.
  4042. (line 51)
  4043. * LOG_COMPILER: Parallel Test Harness.
  4044. (line 51)
  4045. * LOG_DRIVER: Declaring Custom Test Drivers.
  4046. (line 6)
  4047. * LOG_DRIVER_FLAGS: Declaring Custom Test Drivers.
  4048. (line 6)
  4049. * LOG_FLAGS: Parallel Test Harness.
  4050. (line 51)
  4051. * LTALLOCA: LTLIBOBJS. (line 6)
  4052. * LTALLOCA <1>: LIBOBJS. (line 6)
  4053. * LTLIBOBJS: LTLIBOBJS. (line 6)
  4054. * LTLIBOBJS <1>: LIBOBJS. (line 6)
  4055. * LTLIBRARIES: Uniform. (line 101)
  4056. * MAINTAINERCLEANFILES: Clean. (line 13)
  4057. * MAKE: Subdirectories. (line 29)
  4058. * MAKEINFO: Texinfo. (line 99)
  4059. * MAKEINFOFLAGS: Texinfo. (line 109)
  4060. * MAKEINFOHTML: Texinfo. (line 105)
  4061. * MANS: Uniform. (line 101)
  4062. * man_MANS: Man Pages. (line 6)
  4063. * maude_AR: Program and Library Variables.
  4064. (line 68)
  4065. * maude_CCASFLAGS: Program and Library Variables.
  4066. (line 170)
  4067. * maude_CFLAGS: Program and Library Variables.
  4068. (line 171)
  4069. * maude_CPPFLAGS: Program and Library Variables.
  4070. (line 172)
  4071. * maude_CXXFLAGS: Program and Library Variables.
  4072. (line 173)
  4073. * maude_DEPENDENCIES: Linking. (line 41)
  4074. * maude_DEPENDENCIES <1>: Program and Library Variables.
  4075. (line 118)
  4076. * maude_FFLAGS: Program and Library Variables.
  4077. (line 174)
  4078. * maude_GCJFLAGS: Program and Library Variables.
  4079. (line 175)
  4080. * maude_LDADD: Linking. (line 17)
  4081. * maude_LDADD <1>: Program and Library Variables.
  4082. (line 86)
  4083. * maude_LDFLAGS: Linking. (line 37)
  4084. * maude_LDFLAGS <1>: Program and Library Variables.
  4085. (line 106)
  4086. * maude_LFLAGS: Program and Library Variables.
  4087. (line 176)
  4088. * maude_LIBADD: A Library. (line 26)
  4089. * maude_LIBADD <1>: Program and Library Variables.
  4090. (line 78)
  4091. * maude_LIBTOOLFLAGS: Libtool Flags. (line 6)
  4092. * maude_LIBTOOLFLAGS <1>: Program and Library Variables.
  4093. (line 111)
  4094. * maude_LINK: Program and Library Variables.
  4095. (line 154)
  4096. * maude_OBJCFLAGS: Program and Library Variables.
  4097. (line 177)
  4098. * maude_OBJCXXFLAGS: Program and Library Variables.
  4099. (line 178)
  4100. * maude_RFLAGS: Program and Library Variables.
  4101. (line 179)
  4102. * maude_SHORTNAME: Program and Library Variables.
  4103. (line 210)
  4104. * maude_SOURCES: Program and Library Variables.
  4105. (line 18)
  4106. * maude_UPCFLAGS: Program and Library Variables.
  4107. (line 180)
  4108. * maude_YFLAGS: Program and Library Variables.
  4109. (line 181)
  4110. * MISSING: Public Macros. (line 111)
  4111. * MKDIR_P: Obsolete Macros. (line 14)
  4112. * mkdir_p: Obsolete Macros. (line 14)
  4113. * MOSTLYCLEANFILES: Clean. (line 13)
  4114. * nobase_: Alternative. (line 23)
  4115. * nodist_: Alternative. (line 29)
  4116. * nodist_ <1>: Fine-grained Distribution Control.
  4117. (line 6)
  4118. * noinst_: Uniform. (line 90)
  4119. * noinst_HEADERS: Headers. (line 6)
  4120. * noinst_HEADERS <1>: Headers. (line 23)
  4121. * noinst_LIBRARIES: A Library. (line 6)
  4122. * noinst_LISP: Emacs Lisp. (line 6)
  4123. * noinst_LTLIBRARIES: Libtool Convenience Libraries.
  4124. (line 6)
  4125. * noinst_PROGRAMS: Program Sources. (line 6)
  4126. * noinst_SCRIPTS: Scripts. (line 18)
  4127. * notrans_: Man Pages. (line 54)
  4128. * OBJC: Objective C Support. (line 16)
  4129. * OBJCCOMPILE: Objective C Support. (line 25)
  4130. * OBJCFLAGS: Objective C Support. (line 19)
  4131. * OBJCLINK: Objective C Support. (line 29)
  4132. * OBJCLINK <1>: How the Linker is Chosen.
  4133. (line 15)
  4134. * OBJCXX: Objective C++ Support.
  4135. (line 16)
  4136. * OBJCXXCOMPILE: Objective C++ Support.
  4137. (line 25)
  4138. * OBJCXXFLAGS: Objective C++ Support.
  4139. (line 19)
  4140. * OBJCXXLINK: Objective C++ Support.
  4141. (line 29)
  4142. * OBJCXXLINK <1>: How the Linker is Chosen.
  4143. (line 11)
  4144. * oldinclude_HEADERS: Headers. (line 6)
  4145. * PACKAGE: Basics of Distribution.
  4146. (line 6)
  4147. * pkgdatadir: Uniform. (line 19)
  4148. * pkgdata_DATA: Data. (line 9)
  4149. * pkgdata_SCRIPTS: Scripts. (line 18)
  4150. * pkgincludedir: Uniform. (line 19)
  4151. * pkginclude_HEADERS: Headers. (line 6)
  4152. * pkglibdir: Uniform. (line 19)
  4153. * pkglibexecdir: Uniform. (line 19)
  4154. * pkglibexec_PROGRAMS: Program Sources. (line 6)
  4155. * pkglibexec_SCRIPTS: Scripts. (line 18)
  4156. * pkglib_LIBRARIES: A Library. (line 6)
  4157. * pkglib_LTLIBRARIES: Libtool Libraries. (line 6)
  4158. * pkgpyexecdir: Python. (line 105)
  4159. * pkgpythondir: Python. (line 91)
  4160. * PROGRAMS: Uniform. (line 17)
  4161. * PROGRAMS <1>: Uniform. (line 101)
  4162. * pyexecdir: Python. (line 96)
  4163. * PYTHON: Uniform. (line 101)
  4164. * PYTHON <1>: Python. (line 56)
  4165. * pythondir: Python. (line 87)
  4166. * PYTHON_EXEC_PREFIX: Python. (line 77)
  4167. * PYTHON_PLATFORM: Python. (line 82)
  4168. * PYTHON_PREFIX: Python. (line 72)
  4169. * PYTHON_VERSION: Python. (line 68)
  4170. * RECHECK_LOGS: Parallel Test Harness.
  4171. (line 118)
  4172. * RFLAGS: Fortran 77 Support. (line 25)
  4173. * RUNTEST: DejaGnu Tests. (line 19)
  4174. * RUNTESTDEFAULTFLAGS: DejaGnu Tests. (line 14)
  4175. * RUNTESTFLAGS: DejaGnu Tests. (line 24)
  4176. * sbin_PROGRAMS: Program Sources. (line 6)
  4177. * sbin_SCRIPTS: Scripts. (line 18)
  4178. * SCRIPTS: Uniform. (line 101)
  4179. * SCRIPTS <1>: Scripts. (line 9)
  4180. * sharedstate_DATA: Data. (line 9)
  4181. * SOURCES: Program Sources. (line 33)
  4182. * SOURCES <1>: Default _SOURCES. (line 6)
  4183. * SUBDIRS: Subdirectories. (line 8)
  4184. * SUBDIRS <1>: Basics of Distribution.
  4185. (line 47)
  4186. * SUFFIXES: Suffixes. (line 6)
  4187. * sysconf_DATA: Data. (line 9)
  4188. * TAGS_DEPENDENCIES: Tags. (line 35)
  4189. * target_triplet: Optional. (line 14)
  4190. * TESTS: Scripts-based Testsuites.
  4191. (line 86)
  4192. * TESTS <1>: Parallel Test Harness.
  4193. (line 12)
  4194. * TESTS_ENVIRONMENT: Scripts-based Testsuites.
  4195. (line 86)
  4196. * TEST_EXTENSIONS: Parallel Test Harness.
  4197. (line 34)
  4198. * TEST_LOGS: Parallel Test Harness.
  4199. (line 34)
  4200. * TEST_SUITE_LOG: Parallel Test Harness.
  4201. (line 12)
  4202. * TEXI2DVI: Texinfo. (line 132)
  4203. * TEXI2PDF: Texinfo. (line 137)
  4204. * TEXINFOS: Uniform. (line 101)
  4205. * TEXINFOS <1>: Texinfo. (line 65)
  4206. * TEXINFO_TEX: Texinfo. (line 145)
  4207. * top_distdir: The dist Hook. (line 33)
  4208. * top_distdir <1>: Third-Party Makefiles.
  4209. (line 25)
  4210. * UPC: Public Macros. (line 105)
  4211. * UPC <1>: Unified Parallel C Support.
  4212. (line 15)
  4213. * UPCCOMPILE: Unified Parallel C Support.
  4214. (line 24)
  4215. * UPCFLAGS: Unified Parallel C Support.
  4216. (line 18)
  4217. * UPCLINK: Unified Parallel C Support.
  4218. (line 28)
  4219. * UPCLINK <1>: How the Linker is Chosen.
  4220. (line 16)
  4221. * V: Automake Silent Rules.
  4222. (line 88)
  4223. * VALAC: Vala Support. (line 34)
  4224. * VALAFLAGS: Vala Support. (line 38)
  4225. * VERBOSE: Parallel Test Harness.
  4226. (line 26)
  4227. * VERSION: Basics of Distribution.
  4228. (line 6)
  4229. * WARNINGS: automake Invocation. (line 167)
  4230. * WARNINGS <1>: aclocal Options. (line 91)
  4231. * WITH_DMALLOC: Public Macros. (line 123)
  4232. * XFAIL_TESTS: Scripts-based Testsuites.
  4233. (line 32)
  4234. * XZ_OPT: The Types of Distributions.
  4235. (line 24)
  4236. * YACC: Optional. (line 122)
  4237. * YFLAGS: Yacc and Lex. (line 37)
  4238. 
  4239. File: automake.info, Node: General Index, Prev: Variable Index, Up: Indices
  4240. B.3 General Index
  4241. =================
  4242. �[index�]
  4243. * Menu:
  4244. * ## (special Automake comment): General Operation. (line 68)
  4245. * #serial syntax: Serials. (line 6)
  4246. * $(LIBOBJS) and empty libraries: LIBOBJS. (line 72)
  4247. * +=: General Operation. (line 24)
  4248. * --add-missing: automake Invocation. (line 41)
  4249. * --automake-acdir: aclocal Options. (line 9)
  4250. * --build=BUILD: Cross-Compilation. (line 14)
  4251. * --copy: automake Invocation. (line 71)
  4252. * --diff: aclocal Options. (line 18)
  4253. * --disable-dependency-tracking: Dependency Tracking. (line 33)
  4254. * --disable-maintainer-mode: Optional. (line 173)
  4255. * --disable-silent-rules: Automake Silent Rules.
  4256. (line 85)
  4257. * --dry-run: aclocal Options. (line 23)
  4258. * --enable-debug, example: Usage of Conditionals.
  4259. (line 21)
  4260. * --enable-dependency-tracking: Dependency Tracking. (line 43)
  4261. * --enable-maintainer-mode: Optional. (line 173)
  4262. * --enable-silent-rules: Automake Silent Rules.
  4263. (line 85)
  4264. * --force: aclocal Options. (line 45)
  4265. * --force-missing: automake Invocation. (line 76)
  4266. * --foreign: automake Invocation. (line 82)
  4267. * --gnits: automake Invocation. (line 86)
  4268. * --gnits, complete description: Gnits. (line 29)
  4269. * --gnu: automake Invocation. (line 90)
  4270. * --gnu, complete description: Gnits. (line 6)
  4271. * --gnu, required files: Gnits. (line 6)
  4272. * --help: automake Invocation. (line 94)
  4273. * --help <1>: aclocal Options. (line 27)
  4274. * --help check: List of Automake options.
  4275. (line 129)
  4276. * --help=recursive: Nested Packages. (line 30)
  4277. * --host=HOST: Cross-Compilation. (line 16)
  4278. * --include-deps: automake Invocation. (line 102)
  4279. * --install: aclocal Options. (line 34)
  4280. * --libdir: automake Invocation. (line 61)
  4281. * --no-force: automake Invocation. (line 107)
  4282. * --output: aclocal Options. (line 55)
  4283. * --output-dir: automake Invocation. (line 114)
  4284. * --prefix: Standard Directory Variables.
  4285. (line 33)
  4286. * --print-ac-dir: aclocal Options. (line 58)
  4287. * --print-libdir: automake Invocation. (line 65)
  4288. * --program-prefix=PREFIX: Renaming. (line 16)
  4289. * --program-suffix=SUFFIX: Renaming. (line 18)
  4290. * --program-transform-name=PROGRAM: Renaming. (line 20)
  4291. * --system-acdir: aclocal Options. (line 13)
  4292. * --target=TARGET: Cross-Compilation. (line 55)
  4293. * --verbose: automake Invocation. (line 121)
  4294. * --verbose <1>: aclocal Options. (line 69)
  4295. * --version: automake Invocation. (line 125)
  4296. * --version <1>: aclocal Options. (line 72)
  4297. * --version check: List of Automake options.
  4298. (line 129)
  4299. * --warnings: automake Invocation. (line 129)
  4300. * --warnings <1>: aclocal Options. (line 76)
  4301. * --with-dmalloc: Public Macros. (line 123)
  4302. * -a: automake Invocation. (line 41)
  4303. * -c: automake Invocation. (line 70)
  4304. * -f: automake Invocation. (line 75)
  4305. * -hook targets: Extending. (line 66)
  4306. * -i: automake Invocation. (line 98)
  4307. * -I: aclocal Options. (line 30)
  4308. * -l and LDADD: Linking. (line 70)
  4309. * -local targets: Extending. (line 37)
  4310. * -module, libtool: Libtool Modules. (line 6)
  4311. * -o: automake Invocation. (line 114)
  4312. * -v: automake Invocation. (line 121)
  4313. * -W: automake Invocation. (line 129)
  4314. * -W <1>: aclocal Options. (line 76)
  4315. * -Wall: amhello's configure.ac Setup Explained.
  4316. (line 38)
  4317. * -Werror: amhello's configure.ac Setup Explained.
  4318. (line 38)
  4319. * .la suffix, defined: Libtool Concept. (line 6)
  4320. * .log files: Parallel Test Harness.
  4321. (line 12)
  4322. * .trs files: Parallel Test Harness.
  4323. (line 12)
  4324. * :copy-in-global-log:: Log files generation and test results recording.
  4325. (line 44)
  4326. * :recheck:: Log files generation and test results recording.
  4327. (line 38)
  4328. * :test-global-result:: Log files generation and test results recording.
  4329. (line 54)
  4330. * :test-result:: Log files generation and test results recording.
  4331. (line 24)
  4332. * _DATA primary, defined: Data. (line 6)
  4333. * _DEPENDENCIES, defined: Linking. (line 41)
  4334. * _HEADERS primary, defined: Headers. (line 6)
  4335. * _JAVA primary, defined: Java. (line 6)
  4336. * _LDFLAGS, defined: Linking. (line 37)
  4337. * _LDFLAGS, libtool: Libtool Flags. (line 6)
  4338. * _LIBADD, libtool: Libtool Flags. (line 6)
  4339. * _LIBRARIES primary, defined: A Library. (line 6)
  4340. * _LIBTOOLFLAGS, libtool: Libtool Flags. (line 6)
  4341. * _LISP primary, defined: Emacs Lisp. (line 6)
  4342. * _LTLIBRARIES primary, defined: Libtool Libraries. (line 6)
  4343. * _MANS primary, defined: Man Pages. (line 6)
  4344. * _PROGRAMS primary variable: Uniform. (line 11)
  4345. * _PYTHON primary, defined: Python. (line 6)
  4346. * _SCRIPTS primary, defined: Scripts. (line 6)
  4347. * _SOURCES and header files: Program Sources. (line 39)
  4348. * _SOURCES primary, defined: Program Sources. (line 32)
  4349. * _SOURCES, default: Default _SOURCES. (line 6)
  4350. * _SOURCES, empty: Default _SOURCES. (line 44)
  4351. * _TEXINFOS primary, defined: Texinfo. (line 6)
  4352. * acinclude.m4, defined: Complete. (line 23)
  4353. * aclocal and serial numbers: Serials. (line 6)
  4354. * aclocal program, introduction: Complete. (line 23)
  4355. * aclocal search path: Macro Search Path. (line 6)
  4356. * aclocal’s scheduled death: Future of aclocal. (line 6)
  4357. * aclocal, extending: Extending aclocal. (line 6)
  4358. * aclocal, Invocation: aclocal Invocation. (line 6)
  4359. * aclocal, Invoking: aclocal Invocation. (line 6)
  4360. * aclocal, Options: aclocal Options. (line 6)
  4361. * aclocal, using: configure. (line 6)
  4362. * aclocal.m4, preexisting: Complete. (line 23)
  4363. * ACLOCAL_PATH: Macro Search Path. (line 116)
  4364. * AC_CONFIG_FILES, conditional: Usage of Conditionals.
  4365. (line 79)
  4366. * AC_SUBST and SUBDIRS: Subdirectories with AC_SUBST.
  4367. (line 6)
  4368. * Adding new SUFFIXES: Suffixes. (line 6)
  4369. * all: Standard Targets. (line 16)
  4370. * all <1>: Extending. (line 41)
  4371. * all-local: Extending. (line 41)
  4372. * ALLOCA, and Libtool: LTLIBOBJS. (line 6)
  4373. * ALLOCA, example: LIBOBJS. (line 6)
  4374. * ALLOCA, special handling: LIBOBJS. (line 6)
  4375. * amhello-1.0.tar.gz, creation: Hello World. (line 6)
  4376. * amhello-1.0.tar.gz, location: Use Cases. (line 6)
  4377. * amhello-1.0.tar.gz, use cases: Use Cases. (line 6)
  4378. * AM_CCASFLAGS and CCASFLAGS: Flag Variables Ordering.
  4379. (line 20)
  4380. * AM_CFLAGS and CFLAGS: Flag Variables Ordering.
  4381. (line 20)
  4382. * AM_CONDITIONAL and SUBDIRS: Subdirectories with AM_CONDITIONAL.
  4383. (line 6)
  4384. * AM_CPPFLAGS and CPPFLAGS: Flag Variables Ordering.
  4385. (line 20)
  4386. * AM_CXXFLAGS and CXXFLAGS: Flag Variables Ordering.
  4387. (line 20)
  4388. * AM_FCFLAGS and FCFLAGS: Flag Variables Ordering.
  4389. (line 20)
  4390. * AM_FFLAGS and FFLAGS: Flag Variables Ordering.
  4391. (line 20)
  4392. * AM_GCJFLAGS and GCJFLAGS: Flag Variables Ordering.
  4393. (line 20)
  4394. * AM_INIT_AUTOMAKE, example use: Complete. (line 11)
  4395. * AM_LDFLAGS and LDFLAGS: Flag Variables Ordering.
  4396. (line 20)
  4397. * AM_LFLAGS and LFLAGS: Flag Variables Ordering.
  4398. (line 20)
  4399. * AM_LIBTOOLFLAGS and LIBTOOLFLAGS: Flag Variables Ordering.
  4400. (line 20)
  4401. * AM_MAINTAINER_MODE, purpose: maintainer-mode. (line 37)
  4402. * AM_OBJCFLAGS and OBJCFLAGS: Flag Variables Ordering.
  4403. (line 20)
  4404. * AM_OBJCXXFLAGS and OBJXXCFLAGS: Flag Variables Ordering.
  4405. (line 20)
  4406. * AM_RFLAGS and RFLAGS: Flag Variables Ordering.
  4407. (line 20)
  4408. * AM_UPCFLAGS and UPCFLAGS: Flag Variables Ordering.
  4409. (line 20)
  4410. * AM_YFLAGS and YFLAGS: Flag Variables Ordering.
  4411. (line 20)
  4412. * Append operator: General Operation. (line 24)
  4413. * ARG_MAX: Length Limitations. (line 6)
  4414. * autogen.sh and autoreconf: Error required file ltmain.sh not found.
  4415. (line 6)
  4416. * autom4te: aclocal Invocation. (line 44)
  4417. * Automake constraints: Introduction. (line 21)
  4418. * automake options: automake Invocation. (line 37)
  4419. * Automake parser, limitations of: General Operation. (line 33)
  4420. * Automake requirements: Introduction. (line 26)
  4421. * Automake requirements <1>: Requirements. (line 6)
  4422. * automake, invocation: automake Invocation. (line 6)
  4423. * automake, invoking: automake Invocation. (line 6)
  4424. * Automake, recursive operation: General Operation. (line 58)
  4425. * Automatic dependency tracking: Dependencies. (line 11)
  4426. * Automatic linker selection: How the Linker is Chosen.
  4427. (line 6)
  4428. * autoreconf and libtoolize: Error required file ltmain.sh not found.
  4429. (line 6)
  4430. * autoreconf, example: Creating amhello. (line 59)
  4431. * autoscan: amhello's configure.ac Setup Explained.
  4432. (line 89)
  4433. * Autotools, introduction: GNU Build System. (line 43)
  4434. * Autotools, purpose: Why Autotools. (line 6)
  4435. * autoupdate: Obsolete Macros. (line 6)
  4436. * Auxiliary programs: Auxiliary Programs. (line 6)
  4437. * Avoiding man page renaming: Man Pages. (line 54)
  4438. * Avoiding path stripping: Alternative. (line 23)
  4439. * Binary package: DESTDIR. (line 22)
  4440. * bootstrap and autoreconf: Error required file ltmain.sh not found.
  4441. (line 6)
  4442. * Bugs, reporting: Introduction. (line 30)
  4443. * build tree and source tree: VPATH Builds. (line 6)
  4444. * BUILT_SOURCES, defined: Sources. (line 27)
  4445. * C++ support: C++ Support. (line 6)
  4446. * canonicalizing Automake variables: Canonicalization. (line 6)
  4447. * CCASFLAGS and AM_CCASFLAGS: Flag Variables Ordering.
  4448. (line 20)
  4449. * CFLAGS and AM_CFLAGS: Flag Variables Ordering.
  4450. (line 20)
  4451. * cfortran: Mixing Fortran 77 With C and C++.
  4452. (line 6)
  4453. * check: Standard Targets. (line 31)
  4454. * check <1>: Tests. (line 6)
  4455. * check <2>: Extending. (line 41)
  4456. * check-local: Extending. (line 41)
  4457. * check-news: List of Automake options.
  4458. (line 14)
  4459. * check_ primary prefix, definition: Uniform. (line 95)
  4460. * check_PROGRAMS example: Default _SOURCES. (line 28)
  4461. * clean: Standard Targets. (line 27)
  4462. * clean <1>: Extending. (line 41)
  4463. * clean-local: Clean. (line 15)
  4464. * clean-local <1>: Extending. (line 41)
  4465. * Colorized testsuite output: Scripts-based Testsuites.
  4466. (line 67)
  4467. * command line length limit: Length Limitations. (line 6)
  4468. * Comment, special to Automake: General Operation. (line 68)
  4469. * Compilation of Java to bytecode: Java. (line 6)
  4470. * Compilation of Java to native code: Java Support with gcj.
  4471. (line 6)
  4472. * Compile Flag Variables: Flag Variables Ordering.
  4473. (line 20)
  4474. * Complete example: Complete. (line 6)
  4475. * Conditional example, --enable-debug: Usage of Conditionals.
  4476. (line 21)
  4477. * conditional libtool libraries: Conditional Libtool Libraries.
  4478. (line 6)
  4479. * Conditional programs: Conditional Programs.
  4480. (line 6)
  4481. * Conditional subdirectories: Conditional Subdirectories.
  4482. (line 6)
  4483. * Conditional SUBDIRS: Conditional Subdirectories.
  4484. (line 6)
  4485. * Conditionals: Conditionals. (line 6)
  4486. * config.guess: automake Invocation. (line 39)
  4487. * config.site example: config.site. (line 6)
  4488. * configuration variables, overriding: Standard Configuration Variables.
  4489. (line 6)
  4490. * Configuration, basics: Basic Installation. (line 6)
  4491. * Configure substitutions in TESTS: Parallel Test Harness.
  4492. (line 46)
  4493. * configure.ac, Hello World: amhello's configure.ac Setup Explained.
  4494. (line 6)
  4495. * configure.ac, scanning: configure. (line 6)
  4496. * conflicting definitions: Extending. (line 14)
  4497. * Constraints of Automake: Introduction. (line 21)
  4498. * convenience libraries, libtool: Libtool Convenience Libraries.
  4499. (line 6)
  4500. * copying semantics: Extending. (line 10)
  4501. * cpio example: Uniform. (line 36)
  4502. * CPPFLAGS and AM_CPPFLAGS: Flag Variables Ordering.
  4503. (line 20)
  4504. * cross-compilation: Cross-Compilation. (line 6)
  4505. * cross-compilation example: Cross-Compilation. (line 25)
  4506. * CVS and generated files: CVS. (line 49)
  4507. * CVS and third-party files: CVS. (line 167)
  4508. * CVS and timestamps: CVS. (line 28)
  4509. * CXXFLAGS and AM_CXXFLAGS: Flag Variables Ordering.
  4510. (line 20)
  4511. * DATA primary, defined: Data. (line 6)
  4512. * debug build, example: VPATH Builds. (line 46)
  4513. * debugging rules: Debugging Make Rules.
  4514. (line 6)
  4515. * default source, Libtool modules example: Default _SOURCES. (line 38)
  4516. * default verbosity for silent rules: Automake Silent Rules.
  4517. (line 92)
  4518. * default _SOURCES: Default _SOURCES. (line 6)
  4519. * definitions, conflicts: Extending. (line 14)
  4520. * dejagnu: DejaGnu Tests. (line 19)
  4521. * dejagnu <1>: List of Automake options.
  4522. (line 18)
  4523. * depcomp: Dependencies. (line 22)
  4524. * dependencies and distributed files: Errors with distclean.
  4525. (line 6)
  4526. * Dependency tracking: Dependency Tracking. (line 6)
  4527. * Dependency tracking <1>: Dependencies. (line 11)
  4528. * Dependency tracking, disabling: Dependencies. (line 36)
  4529. * directory variables: Standard Directory Variables.
  4530. (line 6)
  4531. * dirlist: Macro Search Path. (line 52)
  4532. * Disabling dependency tracking: Dependencies. (line 37)
  4533. * Disabling hard errors: Scripts-based Testsuites.
  4534. (line 32)
  4535. * dist: Standard Targets. (line 35)
  4536. * dist <1>: Basics of Distribution.
  4537. (line 6)
  4538. * dist-bzip2: The Types of Distributions.
  4539. (line 18)
  4540. * dist-bzip2 <1>: List of Automake options.
  4541. (line 22)
  4542. * dist-bzip2 <2>: List of Automake options.
  4543. (line 22)
  4544. * dist-gzip: The Types of Distributions.
  4545. (line 11)
  4546. * dist-hook: The dist Hook. (line 6)
  4547. * dist-hook <1>: Extending. (line 66)
  4548. * dist-lzip: The Types of Distributions.
  4549. (line 22)
  4550. * dist-lzip <1>: List of Automake options.
  4551. (line 25)
  4552. * dist-lzip <2>: List of Automake options.
  4553. (line 25)
  4554. * dist-shar: The Types of Distributions.
  4555. (line 45)
  4556. * dist-shar <1>: List of Automake options.
  4557. (line 36)
  4558. * dist-shar <2>: List of Automake options.
  4559. (line 34)
  4560. * dist-tarZ: The Types of Distributions.
  4561. (line 39)
  4562. * dist-tarZ <1>: List of Automake options.
  4563. (line 41)
  4564. * dist-tarZ <2>: List of Automake options.
  4565. (line 39)
  4566. * dist-xz: The Types of Distributions.
  4567. (line 30)
  4568. * dist-xz <1>: List of Automake options.
  4569. (line 28)
  4570. * dist-xz <2>: List of Automake options.
  4571. (line 28)
  4572. * dist-zip: The Types of Distributions.
  4573. (line 33)
  4574. * dist-zip <1>: List of Automake options.
  4575. (line 31)
  4576. * dist-zip <2>: List of Automake options.
  4577. (line 31)
  4578. * distcheck: Creating amhello. (line 100)
  4579. * distcheck <1>: Checking the Distribution.
  4580. (line 6)
  4581. * distcheck better than dist: Preparing Distributions.
  4582. (line 10)
  4583. * distcheck example: Creating amhello. (line 100)
  4584. * distcheck-hook: Checking the Distribution.
  4585. (line 55)
  4586. * distclean: Standard Targets. (line 29)
  4587. * distclean <1>: Extending. (line 41)
  4588. * distclean <2>: Errors with distclean.
  4589. (line 6)
  4590. * distclean, diagnostic: Errors with distclean.
  4591. (line 6)
  4592. * distclean-local: Clean. (line 15)
  4593. * distclean-local <1>: Extending. (line 41)
  4594. * distcleancheck: Checking the Distribution.
  4595. (line 70)
  4596. * distdir: Third-Party Makefiles.
  4597. (line 25)
  4598. * Distinction between errors and failures in testsuites: Generalities about Testing.
  4599. (line 48)
  4600. * Distributions, preparation: Preparing Distributions.
  4601. (line 6)
  4602. * distuninstallcheck: Checking the Distribution.
  4603. (line 106)
  4604. * dist_ and nobase_: Alternative. (line 29)
  4605. * dist_ and notrans_: Man Pages. (line 63)
  4606. * DIST_SUBDIRS, explained: SUBDIRS vs DIST_SUBDIRS.
  4607. (line 6)
  4608. * dmalloc, support for: Public Macros. (line 123)
  4609. * dvi: Texinfo. (line 25)
  4610. * dvi <1>: Extending. (line 41)
  4611. * DVI output using Texinfo: Texinfo. (line 6)
  4612. * dvi-local: Extending. (line 41)
  4613. * E-mail, bug reports: Introduction. (line 30)
  4614. * EDITION Texinfo flag: Texinfo. (line 35)
  4615. * else: Usage of Conditionals.
  4616. (line 36)
  4617. * Empty libraries: A Library. (line 48)
  4618. * Empty libraries and $(LIBOBJS): LIBOBJS. (line 72)
  4619. * empty _SOURCES: Default _SOURCES. (line 44)
  4620. * endif: Usage of Conditionals.
  4621. (line 36)
  4622. * Example conditional --enable-debug: Usage of Conditionals.
  4623. (line 21)
  4624. * Example conditional AC_CONFIG_FILES: Usage of Conditionals.
  4625. (line 79)
  4626. * Example Hello World: Hello World. (line 6)
  4627. * Example of recursive operation: General Operation. (line 58)
  4628. * Example of shared libraries: Libtool Libraries. (line 6)
  4629. * Example, EXTRA_PROGRAMS: Uniform. (line 36)
  4630. * Example, false and true: true. (line 6)
  4631. * Example, mixed language: Mixing Fortran 77 With C and C++.
  4632. (line 34)
  4633. * Executable extension: EXEEXT. (line 6)
  4634. * Exit status 77, special interpretation: Scripts-based Testsuites.
  4635. (line 27)
  4636. * Exit status 99, special interpretation: Scripts-based Testsuites.
  4637. (line 27)
  4638. * expected failure: Generalities about Testing.
  4639. (line 39)
  4640. * expected test failure: Generalities about Testing.
  4641. (line 39)
  4642. * Expected test failure: Scripts-based Testsuites.
  4643. (line 32)
  4644. * Extending aclocal: Extending aclocal. (line 6)
  4645. * Extending list of installation directories: Uniform. (line 56)
  4646. * Extension, executable: EXEEXT. (line 6)
  4647. * Extra files distributed with Automake: automake Invocation. (line 39)
  4648. * EXTRA_, prepending: Uniform. (line 29)
  4649. * EXTRA_PROGRAMS, defined: Uniform. (line 36)
  4650. * EXTRA_PROGRAMS, defined <1>: Conditional Programs.
  4651. (line 15)
  4652. * EXTRA_prog_SOURCES, defined: Conditional Sources. (line 18)
  4653. * false Example: true. (line 6)
  4654. * FCFLAGS and AM_FCFLAGS: Flag Variables Ordering.
  4655. (line 20)
  4656. * Features of the GNU Build System: Use Cases. (line 6)
  4657. * FFLAGS and AM_FFLAGS: Flag Variables Ordering.
  4658. (line 20)
  4659. * file names, limitations on: Limitations on File Names.
  4660. (line 6)
  4661. * filename-length-max=99: List of Automake options.
  4662. (line 44)
  4663. * Files distributed with Automake: automake Invocation. (line 39)
  4664. * First line of Makefile.am: General Operation. (line 74)
  4665. * Flag variables, ordering: Flag Variables Ordering.
  4666. (line 6)
  4667. * Flag Variables, Ordering: Flag Variables Ordering.
  4668. (line 20)
  4669. * FLIBS, defined: Mixing Fortran 77 With C and C++.
  4670. (line 21)
  4671. * foreign: amhello's configure.ac Setup Explained.
  4672. (line 38)
  4673. * foreign <1>: List of Automake options.
  4674. (line 9)
  4675. * foreign strictness: Strictness. (line 10)
  4676. * Fortran 77 support: Fortran 77 Support. (line 6)
  4677. * Fortran 77, mixing with C and C++: Mixing Fortran 77 With C and C++.
  4678. (line 6)
  4679. * Fortran 77, Preprocessing: Preprocessing Fortran 77.
  4680. (line 6)
  4681. * Fortran 9x support: Fortran 9x Support. (line 6)
  4682. * GCJFLAGS and AM_GCJFLAGS: Flag Variables Ordering.
  4683. (line 20)
  4684. * generated files and CVS: CVS. (line 49)
  4685. * generated files, distributed: CVS. (line 9)
  4686. * Gettext support: gettext. (line 6)
  4687. * git-dist: General Operation. (line 12)
  4688. * git-dist, non-standard example: General Operation. (line 12)
  4689. * gnits: List of Automake options.
  4690. (line 9)
  4691. * gnits strictness: Strictness. (line 10)
  4692. * gnu: List of Automake options.
  4693. (line 9)
  4694. * GNU Build System, basics: Basic Installation. (line 6)
  4695. * GNU Build System, features: Use Cases. (line 6)
  4696. * GNU Build System, introduction: GNU Build System. (line 6)
  4697. * GNU Build System, use cases: Use Cases. (line 6)
  4698. * GNU Coding Standards: GNU Build System. (line 29)
  4699. * GNU Gettext support: gettext. (line 6)
  4700. * GNU make extensions: General Operation. (line 20)
  4701. * GNU Makefile standards: Introduction. (line 12)
  4702. * gnu strictness: Strictness. (line 10)
  4703. * GNUmakefile including Makefile: Third-Party Makefiles.
  4704. (line 111)
  4705. * hard error: Generalities about Testing.
  4706. (line 48)
  4707. * Header files in _SOURCES: Program Sources. (line 39)
  4708. * HEADERS primary, defined: Headers. (line 6)
  4709. * HEADERS, installation directories: Headers. (line 6)
  4710. * Hello World example: Hello World. (line 6)
  4711. * hook targets: Extending. (line 66)
  4712. * HP-UX 10, lex problems: Public Macros. (line 95)
  4713. * html: Texinfo. (line 25)
  4714. * html <1>: Extending. (line 41)
  4715. * HTML output using Texinfo: Texinfo. (line 6)
  4716. * html-local: Extending. (line 41)
  4717. * id: Tags. (line 43)
  4718. * if: Usage of Conditionals.
  4719. (line 36)
  4720. * include: Basics of Distribution.
  4721. (line 17)
  4722. * include <1>: Include. (line 6)
  4723. * include, distribution: Basics of Distribution.
  4724. (line 17)
  4725. * Including Makefile fragment: Include. (line 6)
  4726. * indentation in Makefile.am: General Operation. (line 33)
  4727. * info: List of Automake options.
  4728. (line 93)
  4729. * info <1>: Extending. (line 41)
  4730. * info-in-builddir: List of Automake options.
  4731. (line 53)
  4732. * info-local: Extending. (line 41)
  4733. * install: Standard Targets. (line 18)
  4734. * install <1>: The Two Parts of Install.
  4735. (line 14)
  4736. * install <2>: Extending. (line 41)
  4737. * Install hook: Extending Installation.
  4738. (line 15)
  4739. * Install, two parts of: The Two Parts of Install.
  4740. (line 14)
  4741. * install-data: Two-Part Install. (line 16)
  4742. * install-data <1>: The Two Parts of Install.
  4743. (line 14)
  4744. * install-data <2>: Extending. (line 41)
  4745. * install-data-hook: Extending. (line 66)
  4746. * install-data-local: Extending Installation.
  4747. (line 9)
  4748. * install-data-local <1>: Extending. (line 41)
  4749. * install-dvi: Texinfo. (line 25)
  4750. * install-dvi <1>: Extending. (line 41)
  4751. * install-dvi-local: Extending. (line 41)
  4752. * install-exec: Two-Part Install. (line 16)
  4753. * install-exec <1>: The Two Parts of Install.
  4754. (line 14)
  4755. * install-exec <2>: Extending. (line 41)
  4756. * install-exec-hook: Extending. (line 66)
  4757. * install-exec-local: Extending Installation.
  4758. (line 9)
  4759. * install-exec-local <1>: Extending. (line 41)
  4760. * install-html: Texinfo. (line 25)
  4761. * install-html <1>: Extending. (line 41)
  4762. * install-html-local: Extending. (line 41)
  4763. * install-info: Texinfo. (line 85)
  4764. * install-info <1>: List of Automake options.
  4765. (line 93)
  4766. * install-info <2>: Extending. (line 41)
  4767. * install-info target: Texinfo. (line 85)
  4768. * install-info-local: Extending. (line 41)
  4769. * install-man: Man Pages. (line 32)
  4770. * install-man <1>: List of Automake options.
  4771. (line 99)
  4772. * install-man target: Man Pages. (line 32)
  4773. * install-pdf: Texinfo. (line 25)
  4774. * install-pdf <1>: Extending. (line 41)
  4775. * install-pdf-local: Extending. (line 41)
  4776. * install-ps: Texinfo. (line 25)
  4777. * install-ps <1>: Extending. (line 41)
  4778. * install-ps-local: Extending. (line 41)
  4779. * install-strip: Standard Targets. (line 21)
  4780. * install-strip <1>: Install Rules for the User.
  4781. (line 7)
  4782. * Installation directories, extending list: Uniform. (line 56)
  4783. * Installation support: Install. (line 6)
  4784. * Installation, basics: Basic Installation. (line 6)
  4785. * installcheck: Standard Targets. (line 33)
  4786. * installcheck <1>: Extending. (line 41)
  4787. * installcheck-local: Extending. (line 41)
  4788. * installdirs: Install Rules for the User.
  4789. (line 7)
  4790. * installdirs <1>: Extending. (line 41)
  4791. * installdirs-local: Extending. (line 41)
  4792. * Installing headers: Headers. (line 6)
  4793. * Installing scripts: Scripts. (line 6)
  4794. * installing versioned binaries: Extending. (line 86)
  4795. * Interfacing with third-party packages: Third-Party Makefiles.
  4796. (line 6)
  4797. * Invocation of aclocal: aclocal Invocation. (line 6)
  4798. * Invocation of automake: automake Invocation. (line 6)
  4799. * Invoking aclocal: aclocal Invocation. (line 6)
  4800. * Invoking automake: automake Invocation. (line 6)
  4801. * JAVA primary, defined: Java. (line 6)
  4802. * JAVA restrictions: Java. (line 27)
  4803. * Java support with gcj: Java Support with gcj.
  4804. (line 6)
  4805. * Java to bytecode, compilation: Java. (line 6)
  4806. * Java to native code, compilation: Java Support with gcj.
  4807. (line 6)
  4808. * lazy test execution: Parallel Test Harness.
  4809. (line 118)
  4810. * LDADD and -l: Linking. (line 70)
  4811. * LDFLAGS and AM_LDFLAGS: Flag Variables Ordering.
  4812. (line 20)
  4813. * lex problems with HP-UX 10: Public Macros. (line 95)
  4814. * lex, multiple lexers: Yacc and Lex. (line 68)
  4815. * LFLAGS and AM_LFLAGS: Flag Variables Ordering.
  4816. (line 20)
  4817. * libltdl, introduction: Libtool Concept. (line 29)
  4818. * LIBOBJS, and Libtool: LTLIBOBJS. (line 6)
  4819. * LIBOBJS, example: LIBOBJS. (line 6)
  4820. * LIBOBJS, special handling: LIBOBJS. (line 6)
  4821. * LIBRARIES primary, defined: A Library. (line 6)
  4822. * libtool convenience libraries: Libtool Convenience Libraries.
  4823. (line 6)
  4824. * libtool libraries, conditional: Conditional Libtool Libraries.
  4825. (line 6)
  4826. * libtool library, definition: Libtool Concept. (line 6)
  4827. * libtool modules: Libtool Modules. (line 6)
  4828. * Libtool modules, default source example: Default _SOURCES. (line 38)
  4829. * libtool, introduction: Libtool Concept. (line 6)
  4830. * LIBTOOLFLAGS and AM_LIBTOOLFLAGS: Flag Variables Ordering.
  4831. (line 20)
  4832. * libtoolize and autoreconf: Error required file ltmain.sh not found.
  4833. (line 6)
  4834. * libtoolize, no longer run by automake: Error required file ltmain.sh not found.
  4835. (line 6)
  4836. * Limitations of automake parser: General Operation. (line 33)
  4837. * Linking Fortran 77 with C and C++: Mixing Fortran 77 With C and C++.
  4838. (line 6)
  4839. * LISP primary, defined: Emacs Lisp. (line 6)
  4840. * LN_S example: Extending. (line 86)
  4841. * local targets: Extending. (line 37)
  4842. * LTALLOCA, special handling: LTLIBOBJS. (line 6)
  4843. * LTLIBOBJS, special handling: LTLIBOBJS. (line 6)
  4844. * LTLIBRARIES primary, defined: Libtool Libraries. (line 6)
  4845. * ltmain.sh not found: Error required file ltmain.sh not found.
  4846. (line 6)
  4847. * m4_include, distribution: Basics of Distribution.
  4848. (line 17)
  4849. * Macro search path: Macro Search Path. (line 6)
  4850. * macro serial numbers: Serials. (line 6)
  4851. * Macros Automake recognizes: Optional. (line 6)
  4852. * maintainer-clean-local: Clean. (line 15)
  4853. * make check: Tests. (line 6)
  4854. * make clean support: Clean. (line 6)
  4855. * make dist: Basics of Distribution.
  4856. (line 6)
  4857. * make distcheck: Checking the Distribution.
  4858. (line 6)
  4859. * make distclean, diagnostic: Errors with distclean.
  4860. (line 6)
  4861. * make distcleancheck: Checking the Distribution.
  4862. (line 70)
  4863. * make distuninstallcheck: Checking the Distribution.
  4864. (line 106)
  4865. * make install support: Install. (line 6)
  4866. * make installcheck, testing --help and --version: List of Automake options.
  4867. (line 129)
  4868. * Make rules, overriding: General Operation. (line 46)
  4869. * Make targets, overriding: General Operation. (line 46)
  4870. * Makefile fragment, including: Include. (line 6)
  4871. * Makefile.am, first line: General Operation. (line 74)
  4872. * Makefile.am, Hello World: amhello's Makefile.am Setup Explained.
  4873. (line 6)
  4874. * Man page renaming, avoiding: Man Pages. (line 54)
  4875. * MANS primary, defined: Man Pages. (line 6)
  4876. * many outputs, rules with: Multiple Outputs. (line 6)
  4877. * mdate-sh: Texinfo. (line 35)
  4878. * MinGW cross-compilation example: Cross-Compilation. (line 25)
  4879. * missing, purpose: maintainer-mode. (line 9)
  4880. * Mixed language example: Mixing Fortran 77 With C and C++.
  4881. (line 34)
  4882. * Mixing Fortran 77 with C and C++: Mixing Fortran 77 With C and C++.
  4883. (line 6)
  4884. * Mixing Fortran 77 with C and/or C++: Mixing Fortran 77 With C and C++.
  4885. (line 6)
  4886. * mkdir -p, macro check: Obsolete Macros. (line 14)
  4887. * modules, libtool: Libtool Modules. (line 6)
  4888. * mostlyclean: Extending. (line 41)
  4889. * mostlyclean-local: Clean. (line 15)
  4890. * mostlyclean-local <1>: Extending. (line 41)
  4891. * multiple configurations, example: VPATH Builds. (line 46)
  4892. * Multiple configure.ac files: automake Invocation. (line 6)
  4893. * Multiple lex lexers: Yacc and Lex. (line 68)
  4894. * multiple outputs, rules with: Multiple Outputs. (line 6)
  4895. * Multiple yacc parsers: Yacc and Lex. (line 68)
  4896. * Nested packages: Nested Packages. (line 6)
  4897. * Nesting packages: Subpackages. (line 6)
  4898. * no-define: Public Macros. (line 55)
  4899. * no-define <1>: List of Automake options.
  4900. (line 58)
  4901. * no-dependencies: Dependencies. (line 34)
  4902. * no-dependencies <1>: List of Automake options.
  4903. (line 66)
  4904. * no-dist: List of Automake options.
  4905. (line 73)
  4906. * no-dist-gzip: List of Automake options.
  4907. (line 77)
  4908. * no-dist-gzip <1>: List of Automake options.
  4909. (line 77)
  4910. * no-exeext: List of Automake options.
  4911. (line 80)
  4912. * no-installinfo: Texinfo. (line 85)
  4913. * no-installinfo <1>: List of Automake options.
  4914. (line 90)
  4915. * no-installinfo option: Texinfo. (line 85)
  4916. * no-installman: Man Pages. (line 32)
  4917. * no-installman <1>: List of Automake options.
  4918. (line 96)
  4919. * no-installman option: Man Pages. (line 32)
  4920. * no-texinfo.tex: List of Automake options.
  4921. (line 106)
  4922. * nobase_ and dist_ or nodist_: Alternative. (line 29)
  4923. * nobase_ prefix: Alternative. (line 23)
  4924. * nodist_ and nobase_: Alternative. (line 29)
  4925. * nodist_ and notrans_: Man Pages. (line 63)
  4926. * noinst_ primary prefix, definition: Uniform. (line 90)
  4927. * Non-GNU packages: Strictness. (line 6)
  4928. * Non-standard targets: General Operation. (line 12)
  4929. * nostdinc: List of Automake options.
  4930. (line 102)
  4931. * notrans_ and dist_ or nodist_: Man Pages. (line 63)
  4932. * notrans_ prefix: Man Pages. (line 54)
  4933. * OBJCFLAGS and AM_OBJCFLAGS: Flag Variables Ordering.
  4934. (line 20)
  4935. * OBJCXXFLAGS and AM_OBJCXXFLAGS: Flag Variables Ordering.
  4936. (line 20)
  4937. * Objective C support: Objective C Support. (line 6)
  4938. * Objective C++ support: Objective C++ Support.
  4939. (line 6)
  4940. * Objects in subdirectory: Program and Library Variables.
  4941. (line 51)
  4942. * obsolete macros: Obsolete Macros. (line 6)
  4943. * optimized build, example: VPATH Builds. (line 46)
  4944. * Option, --warnings=CATEGORY: List of Automake options.
  4945. (line 211)
  4946. * Option, -WCATEGORY: List of Automake options.
  4947. (line 211)
  4948. * Option, check-news: List of Automake options.
  4949. (line 14)
  4950. * Option, dejagnu: List of Automake options.
  4951. (line 18)
  4952. * Option, dist-bzip2: List of Automake options.
  4953. (line 22)
  4954. * Option, dist-lzip: List of Automake options.
  4955. (line 25)
  4956. * Option, dist-shar: List of Automake options.
  4957. (line 34)
  4958. * Option, dist-tarZ: List of Automake options.
  4959. (line 39)
  4960. * Option, dist-xz: List of Automake options.
  4961. (line 28)
  4962. * Option, dist-zip: List of Automake options.
  4963. (line 31)
  4964. * Option, filename-length-max=99: List of Automake options.
  4965. (line 44)
  4966. * Option, foreign: List of Automake options.
  4967. (line 9)
  4968. * Option, gnits: List of Automake options.
  4969. (line 9)
  4970. * Option, gnu: List of Automake options.
  4971. (line 9)
  4972. * Option, info-in-builddir: List of Automake options.
  4973. (line 53)
  4974. * Option, no-define: List of Automake options.
  4975. (line 58)
  4976. * Option, no-dependencies: List of Automake options.
  4977. (line 66)
  4978. * Option, no-dist: List of Automake options.
  4979. (line 73)
  4980. * Option, no-dist-gzip: List of Automake options.
  4981. (line 77)
  4982. * Option, no-exeext: List of Automake options.
  4983. (line 80)
  4984. * Option, no-installinfo: Texinfo. (line 85)
  4985. * Option, no-installinfo <1>: List of Automake options.
  4986. (line 90)
  4987. * Option, no-installman: Man Pages. (line 32)
  4988. * Option, no-installman <1>: List of Automake options.
  4989. (line 96)
  4990. * Option, no-texinfo.tex: List of Automake options.
  4991. (line 106)
  4992. * Option, nostdinc: List of Automake options.
  4993. (line 102)
  4994. * Option, parallel-tests: List of Automake options.
  4995. (line 114)
  4996. * Option, readme-alpha: List of Automake options.
  4997. (line 120)
  4998. * Option, serial-tests: List of Automake options.
  4999. (line 110)
  5000. * Option, tar-pax: List of Automake options.
  5001. (line 159)
  5002. * Option, tar-ustar: List of Automake options.
  5003. (line 159)
  5004. * Option, tar-v7: List of Automake options.
  5005. (line 159)
  5006. * Option, VERSION: List of Automake options.
  5007. (line 206)
  5008. * Option, warnings: List of Automake options.
  5009. (line 211)
  5010. * Options, aclocal: aclocal Options. (line 6)
  5011. * Options, automake: automake Invocation. (line 37)
  5012. * Options, std-options: List of Automake options.
  5013. (line 129)
  5014. * Options, subdir-objects: List of Automake options.
  5015. (line 150)
  5016. * Ordering flag variables: Flag Variables Ordering.
  5017. (line 6)
  5018. * Overriding make rules: General Operation. (line 46)
  5019. * Overriding make targets: General Operation. (line 46)
  5020. * Overriding make variables: General Operation. (line 51)
  5021. * overriding rules: Extending. (line 26)
  5022. * overriding semantics: Extending. (line 26)
  5023. * PACKAGE, directory: Uniform. (line 19)
  5024. * PACKAGE, prevent definition: Public Macros. (line 55)
  5025. * Packages, nested: Nested Packages. (line 6)
  5026. * Packages, preparation: Preparing Distributions.
  5027. (line 6)
  5028. * Parallel build trees: VPATH Builds. (line 6)
  5029. * parallel-tests: List of Automake options.
  5030. (line 114)
  5031. * Path stripping, avoiding: Alternative. (line 23)
  5032. * pax format: List of Automake options.
  5033. (line 159)
  5034. * pdf: Texinfo. (line 25)
  5035. * pdf <1>: Extending. (line 41)
  5036. * PDF output using Texinfo: Texinfo. (line 6)
  5037. * pdf-local: Extending. (line 41)
  5038. * Per-object flags, emulated: Per-Object Flags. (line 6)
  5039. * per-target compilation flags, defined: Program and Library Variables.
  5040. (line 182)
  5041. * pkgdatadir, defined: Uniform. (line 19)
  5042. * pkgincludedir, defined: Uniform. (line 19)
  5043. * pkglibdir, defined: Uniform. (line 19)
  5044. * pkglibexecdir, defined: Uniform. (line 19)
  5045. * Preparing distributions: Preparing Distributions.
  5046. (line 6)
  5047. * Preprocessing Fortran 77: Preprocessing Fortran 77.
  5048. (line 6)
  5049. * Primary variable, DATA: Data. (line 6)
  5050. * Primary variable, defined: Uniform. (line 11)
  5051. * Primary variable, HEADERS: Headers. (line 6)
  5052. * Primary variable, JAVA: Java. (line 6)
  5053. * Primary variable, LIBRARIES: A Library. (line 6)
  5054. * Primary variable, LISP: Emacs Lisp. (line 6)
  5055. * Primary variable, LTLIBRARIES: Libtool Libraries. (line 6)
  5056. * Primary variable, MANS: Man Pages. (line 6)
  5057. * Primary variable, PROGRAMS: Uniform. (line 11)
  5058. * Primary variable, PYTHON: Python. (line 6)
  5059. * Primary variable, SCRIPTS: Scripts. (line 6)
  5060. * Primary variable, SOURCES: Program Sources. (line 32)
  5061. * Primary variable, TEXINFOS: Texinfo. (line 6)
  5062. * PROGRAMS primary variable: Uniform. (line 11)
  5063. * Programs, auxiliary: Auxiliary Programs. (line 6)
  5064. * PROGRAMS, bindir: Program Sources. (line 6)
  5065. * Programs, conditional: Conditional Programs.
  5066. (line 6)
  5067. * Programs, renaming during installation: Renaming. (line 6)
  5068. * prog_LDADD, defined: Linking. (line 12)
  5069. * Proxy Makefile for third-party packages: Third-Party Makefiles.
  5070. (line 128)
  5071. * ps: Texinfo. (line 25)
  5072. * ps <1>: Extending. (line 41)
  5073. * PS output using Texinfo: Texinfo. (line 6)
  5074. * ps-local: Extending. (line 41)
  5075. * PYTHON primary, defined: Python. (line 6)
  5076. * Ratfor programs: Preprocessing Fortran 77.
  5077. (line 6)
  5078. * read-only source tree: VPATH Builds. (line 89)
  5079. * readme-alpha: List of Automake options.
  5080. (line 120)
  5081. * README-alpha: Gnits. (line 42)
  5082. * rebuild rules: Rebuilding. (line 6)
  5083. * rebuild rules <1>: CVS. (line 9)
  5084. * recheck: Parallel Test Harness.
  5085. (line 130)
  5086. * Recognized macros by Automake: Optional. (line 6)
  5087. * Recursive operation of Automake: General Operation. (line 58)
  5088. * recursive targets and third-party Makefiles: Third-Party Makefiles.
  5089. (line 15)
  5090. * Register test case result: Log files generation and test results recording.
  5091. (line 24)
  5092. * Register test result: Log files generation and test results recording.
  5093. (line 24)
  5094. * Renaming programs: Renaming. (line 6)
  5095. * Reporting bugs: Introduction. (line 30)
  5096. * Requirements of Automake: Requirements. (line 6)
  5097. * Requirements, Automake: Introduction. (line 26)
  5098. * Restrictions for JAVA: Java. (line 27)
  5099. * reStructuredText field, :copy-in-global-log:: Log files generation and test results recording.
  5100. (line 44)
  5101. * reStructuredText field, :recheck:: Log files generation and test results recording.
  5102. (line 38)
  5103. * reStructuredText field, :test-global-result:: Log files generation and test results recording.
  5104. (line 54)
  5105. * reStructuredText field, :test-result:: Log files generation and test results recording.
  5106. (line 24)
  5107. * RFLAGS and AM_RFLAGS: Flag Variables Ordering.
  5108. (line 20)
  5109. * rules with multiple outputs: Multiple Outputs. (line 6)
  5110. * rules, conflicting: Extending. (line 14)
  5111. * rules, debugging: Debugging Make Rules.
  5112. (line 6)
  5113. * rules, overriding: Extending. (line 26)
  5114. * Scanning configure.ac: configure. (line 6)
  5115. * SCRIPTS primary, defined: Scripts. (line 6)
  5116. * SCRIPTS, installation directories: Scripts. (line 18)
  5117. * Selecting the linker automatically: How the Linker is Chosen.
  5118. (line 6)
  5119. * serial number and --install: aclocal Options. (line 38)
  5120. * serial numbers in macros: Serials. (line 6)
  5121. * serial-tests: List of Automake options.
  5122. (line 110)
  5123. * serial-tests, Using: Serial Test Harness. (line 6)
  5124. * Shared libraries, support for: A Shared Library. (line 6)
  5125. * Silencing make: Silencing Make. (line 6)
  5126. * Silent make: Silencing Make. (line 6)
  5127. * Silent make rules: Silencing Make. (line 6)
  5128. * Silent rules: Silencing Make. (line 6)
  5129. * silent rules and libtool: Automake Silent Rules.
  5130. (line 59)
  5131. * site.exp: DejaGnu Tests. (line 26)
  5132. * source tree and build tree: VPATH Builds. (line 6)
  5133. * source tree, read-only: VPATH Builds. (line 89)
  5134. * SOURCES primary, defined: Program Sources. (line 32)
  5135. * Special Automake comment: General Operation. (line 68)
  5136. * Staged installation: DESTDIR. (line 14)
  5137. * std-options: List of Automake options.
  5138. (line 129)
  5139. * Strictness, command line: automake Invocation. (line 37)
  5140. * Strictness, defined: Strictness. (line 10)
  5141. * Strictness, foreign: Strictness. (line 10)
  5142. * Strictness, gnits: Strictness. (line 10)
  5143. * Strictness, gnu: Strictness. (line 10)
  5144. * su, before make install: Basic Installation. (line 49)
  5145. * subdir-objects: List of Automake options.
  5146. (line 150)
  5147. * Subdirectories, building conditionally: Conditional Subdirectories.
  5148. (line 6)
  5149. * Subdirectories, configured conditionally: Unconfigured Subdirectories.
  5150. (line 6)
  5151. * Subdirectories, not distributed: Unconfigured Subdirectories.
  5152. (line 55)
  5153. * Subdirectory, objects in: Program and Library Variables.
  5154. (line 51)
  5155. * SUBDIRS and AC_SUBST: Subdirectories with AC_SUBST.
  5156. (line 6)
  5157. * SUBDIRS and AM_CONDITIONAL: Subdirectories with AM_CONDITIONAL.
  5158. (line 6)
  5159. * SUBDIRS, conditional: Conditional Subdirectories.
  5160. (line 6)
  5161. * SUBDIRS, explained: Subdirectories. (line 6)
  5162. * Subpackages: Nested Packages. (line 6)
  5163. * Subpackages <1>: Subpackages. (line 6)
  5164. * suffix .la, defined: Libtool Concept. (line 6)
  5165. * suffix .lo, defined: Libtool Concept. (line 15)
  5166. * SUFFIXES, adding: Suffixes. (line 6)
  5167. * Support for C++: C++ Support. (line 6)
  5168. * Support for Fortran 77: Fortran 77 Support. (line 6)
  5169. * Support for Fortran 9x: Fortran 9x Support. (line 6)
  5170. * Support for GNU Gettext: gettext. (line 6)
  5171. * Support for Java with gcj: Java Support with gcj.
  5172. (line 6)
  5173. * Support for Objective C: Objective C Support. (line 6)
  5174. * Support for Objective C++: Objective C++ Support.
  5175. (line 6)
  5176. * Support for Unified Parallel C: Unified Parallel C Support.
  5177. (line 6)
  5178. * Support for Vala: Vala Support. (line 6)
  5179. * tags: Tags. (line 9)
  5180. * TAGS support: Tags. (line 6)
  5181. * tar formats: List of Automake options.
  5182. (line 159)
  5183. * tar-pax: List of Automake options.
  5184. (line 159)
  5185. * tar-ustar: List of Automake options.
  5186. (line 159)
  5187. * tar-v7: List of Automake options.
  5188. (line 159)
  5189. * Target, install-info: Texinfo. (line 85)
  5190. * Target, install-man: Man Pages. (line 32)
  5191. * test case: Generalities about Testing.
  5192. (line 11)
  5193. * Test case result, registering: Log files generation and test results recording.
  5194. (line 24)
  5195. * test failure: Generalities about Testing.
  5196. (line 25)
  5197. * test harness: Generalities about Testing.
  5198. (line 18)
  5199. * test metadata: Parallel Test Harness.
  5200. (line 12)
  5201. * test pass: Generalities about Testing.
  5202. (line 25)
  5203. * Test result, registering: Log files generation and test results recording.
  5204. (line 24)
  5205. * test skip: Generalities about Testing.
  5206. (line 29)
  5207. * Test suites: Tests. (line 6)
  5208. * Tests, expected failure: Scripts-based Testsuites.
  5209. (line 32)
  5210. * testsuite harness: Generalities about Testing.
  5211. (line 18)
  5212. * Testsuite progress on console: Scripts-based Testsuites.
  5213. (line 45)
  5214. * Texinfo flag, EDITION: Texinfo. (line 35)
  5215. * Texinfo flag, UPDATED: Texinfo. (line 35)
  5216. * Texinfo flag, UPDATED-MONTH: Texinfo. (line 35)
  5217. * Texinfo flag, VERSION: Texinfo. (line 35)
  5218. * texinfo.tex: Texinfo. (line 70)
  5219. * TEXINFOS primary, defined: Texinfo. (line 6)
  5220. * third-party files and CVS: CVS. (line 167)
  5221. * Third-party packages, interfacing with: Third-Party Makefiles.
  5222. (line 6)
  5223. * timestamps and CVS: CVS. (line 28)
  5224. * Transforming program names: Renaming. (line 6)
  5225. * trees, source vs. build: VPATH Builds. (line 6)
  5226. * true Example: true. (line 6)
  5227. * underquoted AC_DEFUN: Extending aclocal. (line 36)
  5228. * unexpected pass: Generalities about Testing.
  5229. (line 39)
  5230. * unexpected test pass: Generalities about Testing.
  5231. (line 39)
  5232. * Unified Parallel C support: Unified Parallel C Support.
  5233. (line 6)
  5234. * Uniform naming scheme: Uniform. (line 6)
  5235. * uninstall: Standard Targets. (line 24)
  5236. * uninstall <1>: Install Rules for the User.
  5237. (line 7)
  5238. * uninstall <2>: Extending. (line 41)
  5239. * uninstall-hook: Extending. (line 66)
  5240. * uninstall-local: Extending. (line 41)
  5241. * Unit tests: Parallel Test Harness.
  5242. (line 154)
  5243. * Unpacking: Basic Installation. (line 27)
  5244. * UPCFLAGS and AM_UPCFLAGS: Flag Variables Ordering.
  5245. (line 20)
  5246. * UPDATED Texinfo flag: Texinfo. (line 35)
  5247. * UPDATED-MONTH Texinfo flag: Texinfo. (line 35)
  5248. * Use Cases for the GNU Build System: Use Cases. (line 6)
  5249. * user variables: User Variables. (line 6)
  5250. * Using aclocal: configure. (line 6)
  5251. * ustar format: List of Automake options.
  5252. (line 159)
  5253. * v7 tar format: List of Automake options.
  5254. (line 159)
  5255. * Vala Support: Vala Support. (line 6)
  5256. * variables, conflicting: Extending. (line 14)
  5257. * Variables, overriding: General Operation. (line 51)
  5258. * variables, reserved for the user: User Variables. (line 6)
  5259. * VERSION Texinfo flag: Texinfo. (line 35)
  5260. * VERSION, prevent definition: Public Macros. (line 55)
  5261. * version.m4, example: Rebuilding. (line 12)
  5262. * version.sh, example: Rebuilding. (line 12)
  5263. * versioned binaries, installing: Extending. (line 86)
  5264. * VPATH builds: VPATH Builds. (line 6)
  5265. * wildcards: Wildcards. (line 6)
  5266. * Windows: EXEEXT. (line 6)
  5267. * xfail: Generalities about Testing.
  5268. (line 39)
  5269. * xpass: Generalities about Testing.
  5270. (line 39)
  5271. * yacc, multiple parsers: Yacc and Lex. (line 68)
  5272. * YFLAGS and AM_YFLAGS: Flag Variables Ordering.
  5273. (line 20)
  5274. * ylwrap: Yacc and Lex. (line 68)
  5275. * zardoz example: Complete. (line 35)