asp.net mvc create pdf from view : Best compression pdf Library SDK class asp.net .net winforms ajax make16-part1262

Chapter15: MakefileConventions
151
15.3 VariablesforSpecifyingCommands
Makefilesshouldprovidevariablesforoverridingcertaincommands,options,andsoon.
Inparticular,youshouldrunmostutilityprogramsviavariables.Thus,ifyouuseBison,
haveavariablenamedBISONwhosedefaultvalueissetwith‘BISON=bison’,andreferto
itwith$(BISON)wheneveryouneedtouseBison.
Filemanagementutilitiessuchasln,rm,mv,andsoon,neednotbereferredtothrough
variablesinthisway,sinceusersdon’tneedtoreplacethemwithotherprograms.
Eachprogram-namevariableshouldcomewithanoptionsvariablethatisusedtosupply
options totheprogram. . Append‘FLAGS’to o the program-name variablenametoget the
optionsvariablename—forexample,BISONFLAGS.(ThenamesCFLAGSfortheCcompiler,
YFLAGSforyacc,andLFLAGSforlex,areexceptionstothisrule,butwekeepthembecause
theyarestandard.) UseCPPFLAGSinanycompilationcommandthatrunsthepreprocessor,
anduseLDFLAGSinanycompilationcommandthatdoeslinkingaswellasinanydirectuse
ofld.
IfthereareCcompileroptionsthatmustbeusedforpropercompilationofcertainfiles,
donotincludetheminCFLAGS.UsersexpecttobeabletospecifyCFLAGSfreelythemselves.
Instead,arrangetopassthenecessaryoptionstotheCcompilerindependentlyofCFLAGS,
bywritingthemexplicitlyinthecompilationcommandsorbydefininganimplicitrule,like
this:
CFLAGS = = -g
ALL_CFLAGS = = -I. . $(CFLAGS)
.c.o:
$(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
Doincludethe‘-g’optioninCFLAGS,becausethatisnotrequiredforpropercompilation.
Youcanconsideritadefaultthatisonlyrecommended.Ifthepackageissetupsothatit
iscompiledwithGCCbydefault,thenyoumightaswellinclude‘-O’inthedefaultvalue
ofCFLAGSaswell.
PutCFLAGSlastinthecompilationcommand,afterothervariablescontainingcompiler
options,sotheusercanuseCFLAGStooverridetheothers.
CFLAGS should be e used in n every y invocation n of f the C C compiler, both h those which do
compilationandthosewhichdolinking.
Every Makefile should define the variable INSTALL, which is the basic c command for
installingafileintothesystem.
Every Makefile shouldalsodefinethe variables INSTALL_PROGRAM andINSTALL_DATA.
(The defaultfor INSTALL_PROGRAMshouldbe$(INSTALL);thedefault forINSTALL_DATA
shouldbe${INSTALL}-m644.) Thenitshoulduse e those variablesas thecommandsfor
actualinstallation,forexecutablesandnon-executablesrespectively. Minimaluseofthese
variablesisasfollows:
$(INSTALL_PROGRAM) foo $(bindir)/foo
$(INSTALL_DATA) libfoo.a a $(libdir)/libfoo.a
However,itispreferabletosupportaDESTDIRprefixonthetargetfiles,asexplainedin
thenextsection.
Itisacceptable,butnotrequired,toinstallmultiplefilesinonecommand,withthefinal
argumentbeingadirectory,asin:
$(INSTALL_PROGRAM) foo bar r baz z $(bindir)
Best compression pdf - Compress reduce PDF size in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
C# Code & .NET API to Compress & Decompress PDF Document
change page size pdf; pdf compress
Best compression pdf - VB.NET PDF File Compress Library: Compress reduce PDF size in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET PDF Document Compression and Decompression Control SDK
adjust pdf size; pdf optimized format
152
GNUmake
15.4 DESTDIR: SupportforStagedInstalls
DESTDIRisavariableprependedtoeachinstalledtargetfile,likethis:
$(INSTALL_PROGRAM) foo $(DESTDIR)$(bindir)/foo
$(INSTALL_DATA) libfoo.a a $(DESTDIR)$(libdir)/libfoo.a
TheDESTDIRvariableisspecifiedbytheuseronthemakecommandlineasanabsolute
filename. Forexample:
make DESTDIR=/tmp/stage install
DESTDIRshouldbesupportedonlyintheinstall*anduninstall*targets,asthoseare
theonlytargetswhereitisuseful.
If your installation n step would normally install /usr/local/bin/foo o and d /usr/
local/lib/libfoo.a,thenaninstallationinvokedas intheexampleabovewouldinstall
/tmp/stage/usr/local/bin/fooand/tmp/stage/usr/local/lib/libfoo.ainstead.
PrependingthevariableDESTDIRtoeachtargetinthiswayprovidesforstagedinstalls,
wheretheinstalledfilesarenotplaceddirectlyintotheirexpectedlocationbutareinstead
copiedintoatemporarylocation(DESTDIR). However,installedfilesmaintaintheirrelative
directorystructureandanyembeddedfilenameswillnotbemodified.
You shouldnot t set the value of DESTDIR in n your Makefile e at all; ; then n the e files s are
installed into their expected locations s by default. . Also, , specifying DESTDIR should not
changetheoperationofthesoftwareinanyway,soitsvalueshouldnotbeincludedinany
filecontents.
DESTDIRsupportiscommonlyusedinpackagecreation. Itisalsohelpfultouserswho
wanttounderstandwhatagivenpackagewillinstallwhere,andtoallowuserswhodon’t
normallyhavepermissionstoinstallintoprotectedareastobuildandinstallbeforegaining
thosepermissions. Finally,itcanbeusefulwithtoolssuchasstow,wherecodeisinstalled
inoneplace but made toappear to be installed somewhere else usingsymbolic links or
special mount t operations. . So, , westrongly y recommendGNU U packages s support t DESTDIR,
thoughitisnotanabsoluterequirement.
15.5 VariablesforInstallationDirectories
Installationdirectories shouldalways benamedby variables, , soit t is easy toinstallina
nonstandard place. . The e standardnames s for these e variables andthe values they should
have in GNU U packages are e described below. . They y are basedona standard d file system
layout;variantsofitareusedinGNU/Linuxandothermodernoperatingsystems.
Installers are e expected to override these values s when n calling g make e (e.g., , makepre-
fix=/usrinstallorconfigure(e.g.,configure--prefix=/usr).GNUpackagesshould
nottrytoguesswhichvalueshouldbeappropriateforthesevariablesonthesystemthey
arebeinginstalledonto: usethedefaultsettings s specifiedheresothatallGNUpackages
behaveidentically,allowingtheinstallertoachieveanydesiredlayout.
Allinstallationdirectories,andtheirparentdirectories,shouldbecreated(ifnecessary)
beforetheyareinstalledinto.
These first two variables s set t the root t for the e installation. . All l the other r installation
directories should d be subdirectories of one of these two, and nothing should be directly
installedintothesetwodirectories.
C# PDF Convert to Tiff SDK: Convert PDF to tiff images in C#.net
Best C#.NET PDF converter SDK for converting PDF to Tiff in page and multipage tiff image files can be created from PDF. Supports tiff compression selection.
change font size pdf fillable form; change pdf page size
VB.NET PDF Convert to Tiff SDK: Convert PDF to tiff images in vb.
When converting PDF document to TIFF image using VB can be compressed and uncompressed by using lossless compression. image is regarded as the best image format
pdf files optimized; adjusting page size in pdf
Chapter15: MakefileConventions
153
prefix
Aprefixusedinconstructingthedefault values ofthevariableslistedbelow.
Thedefaultvalueofprefixshouldbe/usr/local. Whenbuildingthecom-
pleteGNUsystem,theprefix willbeemptyand/usrwillbeasymboliclink
to/. (IfyouareusingAutoconf,writeitas‘@prefix@’.)
Running‘makeinstall’withadifferentvalueofprefixfromtheoneusedto
buildtheprogramshouldnot recompiletheprogram.
exec_prefix
Aprefixusedinconstructingthedefaultvaluesofsomeofthevariableslisted
below. Thedefaultvalueof f exec_prefix should be $(prefix). . (If f you are
usingAutoconf,writeitas‘@exec_prefix@’.)
Generally,$(exec_prefix)isusedfordirectoriesthatcontainmachine-specific
files (suchas executables s andsubroutine e libraries),while $(prefix) is s used
directlyforotherdirectories.
Running‘makeinstall’withadifferent value of exec_prefixfromtheone
usedtobuildtheprogramshouldnot recompiletheprogram.
Executableprogramsareinstalledinoneofthefollowingdirectories.
bindir
Thedirectoryforinstallingexecutableprogramsthatuserscanrun.Thisshould
normallybe/usr/local/bin,butwriteitas$(exec_prefix)/bin.(Ifyouare
usingAutoconf,writeitas‘@bindir@’.)
sbindir
Thedirectoryforinstallingexecutableprogramsthatcanberunfromtheshell,
butareonly generallyusefultosystemadministrators. . This s shouldnormally
be/usr/local/sbin,butwriteitas$(exec_prefix)/sbin.(Ifyouareusing
Autoconf,writeitas‘@sbindir@’.)
libexecdir
Thedirectoryforinstallingexecutableprogramstoberunbyotherprograms
ratherthanbyusers.Thisdirectoryshouldnormallybe/usr/local/libexec,
butwriteitas$(exec_prefix)/libexec. (IfyouareusingAutoconf,writeit
as‘@libexecdir@’.)
The definition n of f ‘libexecdir’ ’ is the same e for all l packages, , so you should
installyourdatainasubdirectorythereof.Mostpackagesinstalltheirdataun-
der$(libexecdir)/package-name/,possiblywithinadditionalsubdirectories
thereof,suchas$(libexecdir)/package-name/machine/version.
Datafiles usedby theprogramduringitsexecutionaredividedintocategoriesintwo
ways.
 Some e files are e normally modified by y programs; ; others s are e never r normally modified
(thoughusersmayeditsomeofthese).
 Some e files arearchitecture-independentandcanbesharedbyallmachines at asite;
somearearchitecture-dependentandcanbesharedonlybymachinesofthesamekind
andoperatingsystem;othersmayneverbesharedbetweentwomachines.
This makes for r six x different possibilities. . However, , we want t to discourage the use of
architecture-dependent files, , aside from object t files and d libraries. . It t is s muchcleaner to
makeotherdatafilesarchitecture-independent,anditisgenerallynothard.
C# Create PDF from Tiff Library to convert tif images to PDF in C#
Best and free C# tiff to adobe PDF converter SDK for Visual Studio .NET. Description: Convert to PDF with specified compression method and save it on the
pdf change page size; can a pdf file be compressed
C# PDF Convert to Word SDK: Convert PDF to Word library in C#.net
Best C#.NET PDF to Microsoft Office Word The magnification of the original PDF page size. DocumentType targetType, ImageCompress compression, String filePath).
best pdf compression tool; pdf change font size
154
GNUmake
Hereare the variablesMakefiles shouldusetospecifydirectories to putthese various
kindsoffilesin:
‘datarootdir’
Therootofthedirectorytreeforread-onlyarchitecture-independentdatafiles.
Thisshouldnormallybe/usr/local/share,butwriteitas$(prefix)/share.
(IfyouareusingAutoconf,writeitas‘@datarootdir@’.) ‘datadir’’sdefault
valueisbasedonthisvariable;soare‘infodir’,‘mandir’,andothers.
‘datadir’ The e directory for installing g idiosyncratic c read-only architecture-independent
datafiles for thisprogram. . This s isusually the sameplaceas ‘datarootdir’,
but we usethe two separate variables so that you u can move theseprogram-
specificfileswithoutalteringthelocationforInfofiles,manpages,etc.
Thisshouldnormallybe/usr/local/share,butwriteitas$(datarootdir).
(IfyouareusingAutoconf,writeitas‘@datadir@’.)
Thedefinitionof‘datadir’isthesameforallpackages,soyoushouldinstall
your data a in asubdirectory thereof. . Most t packages installtheir data under
$(datadir)/package-name/.
‘sysconfdir’
Thedirectoryforinstallingread-onlydatafilesthatpertaintoasinglemachine–
that is to say, , files s for configuring a host. . Mailer r and d network k configura-
tionfiles, /etc/passwd,andsoforth belonghere. . Allthefilesin n this s direc-
tory shouldbeordinaryASCII text files. . This s directory shouldnormally be
/usr/local/etc,butwriteitas$(prefix)/etc. (IfyouareusingAutoconf,
writeitas‘@sysconfdir@’.)
Do not t install l executables here e in this directory y (they y probably belong in
$(libexecdir)or$(sbindir)). Alsodonotinstallfilesthataremodifiedin
thenormalcourseoftheiruse(programswhosepurposeistochangetheconfig-
urationofthesystemexcluded).Thoseprobablybelongin$(localstatedir).
‘sharedstatedir’
The directory for installing g architecture-independent t data files which the
programs modify while they run. . This s shouldnormally be /usr/local/com,
but write it as $(prefix)/com. . (If f you are e using g Autoconf, write it as
‘@sharedstatedir@’.)
‘localstatedir’
The directory for installingdatafiles which the programs modifywhile they
run, and that t pertain n to one specific c machine. . Users s should d never r need
to modify files in n this directory to configure e the e package’s s operation; ; put
such configuration information n in n separate e files that go in n $(datadir) or
$(sysconfdir). $(localstatedir) ) should normally be /usr/local/var,
but write it as $(prefix)/var. . (If f you are e using g Autoconf, write it as
‘@localstatedir@’.)
‘runstatedir’
Thedirectoryforinstallingdatafileswhichtheprogramsmodifywhiletheyrun,
thatpertaintoonespecific machine,andwhichneednotpersist longerthan
theexecutionoftheprogram—whichisgenerallylong-lived,forexample,until
C# Create PDF from PowerPoint Library to convert pptx, ppt to PDF
Best C# Microsoft Office PowerPoint to adobe PDF file converter SDK for Visual Description: Convert to PDF/TIFF with specified compression method and save
300 dpi pdf file size; change font size pdf form
C# Create PDF from Excel Library to convert xlsx, xls to PDF in C#
Best Microsoft Office Excel to adobe PDF file converter SDK for Visual Studio .NET. Description: Convert to PDF/TIFF with specified compression method and
advanced pdf compressor online; change paper size in pdf document
Chapter15: MakefileConventions
155
thenextreboot. PIDfilesforsystemdaemonsareatypicaluse. Inaddition,
thisdirectoryshouldnotbecleanedexceptperhapsatreboot,whilethegeneral
/tmp(TMPDIR)maybecleanedarbitrarily. Thisshouldnormallybe/var/run,
butwriteitas$(localstatedir)/run.Havingitasaseparatevariableallows
theuseof/runifdesired,forexample. (IfyouareusingAutoconf2.70orlater,
writeitas‘@runstatedir@’.)
Thesevariablesspecifythedirectoryforinstallingcertainspecifictypesoffiles,ifyour
program has s them. . Every y GNUpackage shouldhaveInfo files, , soevery y program m needs
‘infodir’,butnotallneed‘libdir’or‘lispdir’.
‘includedir’
The directory for r installing g header r files s to o be included d by user programs
with the e C C ‘#include’ ’ preprocessor r directive. . This s should normally be
/usr/local/include,butwriteit as $(prefix)/include. . (Ifyouare e using
Autoconf,writeitas‘@includedir@’.)
Most compilers other than GCC C do not t look for header files s in n directory
/usr/local/include. So o installing g the header files this s way y is only useful
withGCC.Sometimes this is not a problem m because some libraries s are only
really intendedto work withGCC.But somelibraries are intendedto work
withothercompilers. Theyshouldinstalltheirheaderfilesintwoplaces,one
specifiedbyincludedirandonespecifiedbyoldincludedir.
‘oldincludedir’
Thedirectoryforinstalling‘#include’headerfilesforusewithcompilersother
thanGCC.Thisshouldnormallybe/usr/include. (IfyouareusingAutoconf,
youcanwriteitas‘@oldincludedir@’.)
TheMakefilecommandsshouldcheckwhether thevalueof oldincludediris
empty. Ifit t is,theyshouldnot try touseit; ; they y shouldcancelthesecond
installationoftheheaderfiles.
Apackageshouldnot replace anexisting header inthis directory unless the
header came fromthe same package. . Thus, , if f your Foo package provides a
headerfilefoo.h,thenitshouldinstalltheheaderfileinthe oldincludedir
directoryifeither(1)thereisnofoo.hthereor(2)thefoo.hthatexistscame
fromtheFoopackage.
Totellwhether foo.hcamefromtheFoopackage,putamagicstringinthe
file—partofacomment—andgrepforthatstring.
‘docdir’
Thedirectoryforinstallingdocumentationfiles(otherthanInfo)forthispack-
age. Bydefault,itshouldbe/usr/local/share/doc/yourpkg,butitshould
bewrittenas$(datarootdir)/doc/yourpkg.(IfyouareusingAutoconf,write
itas‘@docdir@’.) Theyourpkgsubdirectory,whichmayincludeaversionnum-
ber,preventscollisionsamongfileswithcommonnames,suchasREADME.
‘infodir’ The e directory for installing g the e Info files for this package. . By y default,
it should be /usr/local/share/info, , but t it should be e written n as
$(datarootdir)/info. (Ifyouare e usingAutoconf,writeit as‘@infodir@’.)
infodirisseparatefromdocdirforcompatibilitywithexistingpractice.
C# Create PDF from Word Library to convert docx, doc to PDF in C#.
Best Microsoft Office Word to adobe PDF file converter SDK for Visual Studio .NET. Description: Convert to PDF/TIFF with specified compression method and
change font size in pdf fillable form; change font size in pdf text box
C# Create PDF from OpenOffice to convert odt, odp files to PDF in
Best C# OpenOffice to adobe PDF file converter SDK for Visual Studio .NET. Description: Convert to PDF/TIFF with specified compression method and save it
change font size in pdf file; pdf page size limit
156
GNUmake
‘htmldir’
‘dvidir’
‘pdfdir’
‘psdir’
Directories for r installing g documentation files s inthe e particular format. . They
should all l be e set to $(docdir) by default. . (If f you are using Autoconf,
writethemas ‘@htmldir@’, , ‘@dvidir@’,etc.) ) Packages s whichsupply several
translations of their documentation should d install l them m in n ‘$(htmldir)/’ll,
‘$(pdfdir)/’ll,etc.wherellisalocaleabbreviationsuchas‘en’or‘pt_BR’.
‘libdir’
The directory for object filesandlibraries ofobjectcode. . Donot t installex-
ecutables here, they probably y ought to go in n $(libexecdir) instead. . The
valueoflibdirshouldnormallybe/usr/local/lib,butwriteitas$(exec_
prefix)/lib.(IfyouareusingAutoconf,writeitas‘@libdir@’.)
‘lispdir’ ThedirectoryforinstallinganyEmacsLispfiles s inthis package. . Bydefault,
itshouldbe/usr/local/share/emacs/site-lisp,butitshouldbewrittenas
$(datarootdir)/emacs/site-lisp.
IfyouareusingAutoconf,writethedefaultas‘@lispdir@’. Inordertomake
‘@lispdir@’work,youneedthefollowinglinesinyourconfigure.acfile:
lispdir=’${datarootdir}/emacs/site-lisp’
AC_SUBST(lispdir)
‘localedir’
The directory for installinglocale-specific message catalogs for this package.
By default, , it t should d be /usr/local/share/locale, , but t it should d be
writtenas $(datarootdir)/locale. . (If f youare usingAutoconf,write it as
‘@localedir@’.) Thisdirectoryusuallyhasasubdirectoryperlocale.
Unix-stylemanpagesareinstalledinoneofthefollowing:
‘mandir’
The top-level l directory for installing g the e man pages s (if any) for this pack-
age. It t willnormally be/usr/local/share/man, , butyoushould write it t as
$(datarootdir)/man. (IfyouareusingAutoconf,writeitas‘@mandir@’.)
‘man1dir’ Thedirectoryforinstallingsection1manpages. . Writeitas$(mandir)/man1.
‘man2dir’ Thedirectoryforinstallingsection2manpages.Writeitas$(mandir)/man2
‘...’
Don’tmaketheprimarydocumentationforanyGNUsoftwarebeamanpage.
WriteamanualinTexinfoinstead. Manpagesarejustforthesakeofpeople
runningGNUsoftwareonUnix,whichisasecondaryapplicationonly.
‘manext’
The file e name e extension n for r the installed d manpage. . This s should contain a
periodfollowedbytheappropriatedigit;itshouldnormallybe‘.1’.
‘man1ext’ Thefilenameextensionforinstalledsection1manpages.
‘man2ext’ Thefilenameextensionforinstalledsection2manpages.
‘...’
Usethesenamesinsteadof‘manext’ifthepackageneedstoinstallmanpages
inmorethanonesectionofthemanual.
Andfinally,youshouldsetthefollowingvariable:
C# TIFF: C#.NET Code to Process TIFF, RasterEdge XDoc.Tiff for .
TIFF, JPEG, GIF, BMP, PNG, PDF, Word and can fulfill different users' needs best, which include corresponding information, such as Tiff compression mode, color
adjust file size of pdf; best online pdf compressor
Chapter15: MakefileConventions
157
‘srcdir’
The directory y for the sources s being g compiled. . The e value e of f this variable is
normally insertedby theconfigureshellscript. . (If f youareusingAutoconf,
use‘srcdir=@srcdir@’.)
Forexample:
# Common prefix for installation directories.
# NOTE: This directory must t exist t when n you start t the e install.
prefix = = /usr/local
datarootdir = = $(prefix)/share
datadir = = $(datarootdir)
exec_prefix = = $(prefix)
# Where to o put t the executable for the command d ‘gcc’.
bindir = = $(exec_prefix)/bin
# Where to o put t the directories used d by the compiler.
libexecdir = = $(exec_prefix)/libexec
# Where to o put t the Info files.
infodir = = $(datarootdir)/info
Ifyourprograminstallsalargenumberoffiles intooneofthestandarduser-specified
directories,itmightbeusefultogroupthemintoasubdirectoryparticulartothatprogram.
Ifyoudothis,youshouldwritetheinstallruletocreatethesesubdirectories.
Do not t expect t the user r to o include the subdirectory name in the value of any of the
variableslistedabove. Theideaofhavingauniformsetofvariablenamesforinstallation
directoriesistoenabletheusertospecifytheexactsamevaluesforseveraldifferentGNU
packages.Inorderforthistobeuseful,allthepackagesmustbedesignedsothattheywill
worksensiblywhentheuserdoesso.
Attimes,notallofthesevariablesmaybeimplementedinthecurrentreleaseofAutoconf
and/or Automake; ; but t as of Autoconf 2.60, , we e believe e allof them are. . When n any y are
missing,thedescriptionshereserveasspecificationsforwhatAutoconfwillimplement. As
aprogrammer,youcaneitheruseadevelopmentversionofAutoconforavoidusingthese
variablesuntilastablereleaseismadewhichsupportsthem.
15.6 StandardTargetsforUsers
AllGNUprogramsshouldhavethefollowingtargetsintheirMakefiles:
‘all’
Compiletheentireprogram.Thisshouldbethedefaulttarget.Thistargetneed
notrebuildanydocumentationfiles;Infofilesshouldnormallybeincludedin
thedistribution, andDVI (andother r documentation n format) ) files should d be
madeonlywhenexplicitlyaskedfor.
Bydefault,theMakerulesshouldcompileandlinkwith‘-g’,sothatexecutable
programs havedebuggingsymbols. . Otherwise,youareessentiallyhelplessin
thefaceofacrash,anditisoftenfarfromeasytoreproducewithafreshbuild.
‘install’ Compiletheprogramandcopytheexecutables,libraries,andsoontothefile
nameswheretheyshouldresideforactualuse.Ifthereisasimpletesttoverify
thataprogramisproperlyinstalled,thistargetshouldrunthattest.
Donotstripexecutableswheninstallingthem. Thishelpseventualdebugging
thatmaybeneededlater,andnowadaysdiskspaceischeapanddynamicloaders
typicallyensuredebugsectionsarenotloadedduringnormalexecution. Users
thatneedstrippedbinariesmayinvoketheinstall-striptargettodothat.
158
GNUmake
Ifpossible,writetheinstalltargetrulesothatitdoesnotmodifyanythingin
thedirectorywheretheprogramwasbuilt,provided‘makeall’hasjustbeen
done. This s is convenient for building the programunder oneusernameand
installingitunderanother.
Thecommandsshouldcreateallthedirectoriesinwhichfilesaretobeinstalled,
iftheydon’talreadyexist. Thisincludesthedirectoriesspecifiedasthevalues
ofthevariablesprefixandexec_prefix,aswellasallsubdirectoriesthatare
needed. Onewaytodothisisbymeansofaninstalldirstargetasdescribed
below.
Use‘-’beforeanycommandforinstallingamanpage,sothatmakewillignore
anyerrors.Thisisincasetherearesystemsthatdon’thavetheUnixmanpage
documentationsysteminstalled.
ThewaytoinstallInfofilesistocopytheminto$(infodir)with$(INSTALL_
DATA) (see Section15.3 [Command Variables], , page e 151), and then run the
install-infoprogramifitispresent. install-infoisaprogramthatedits
theInfodirfiletoaddorupdatethemenuentryfor thegivenInfofile;itis
partoftheTexinfopackage.
Here is a a sample e rule to install an n Info o file e that t also tries to handle some
additionalsituations,suchasinstall-infonotbeingpresent.
do-install-info: foo.info o installdirs
$(NORMAL_INSTALL)
# Prefer an info file e in . . to o one e in n srcdir.
if test t -f f foo.info; then n d=.; \
else d="$(srcdir)"; fi; \
$(INSTALL_DATA) $$d/foo.info o \
"$(DESTDIR)$(infodir)/foo.info"
# Run install-info o only y if it t exists.
# Use ‘if’ ’ instead of just t prepending ‘-’ to the
# line e so o we notice real l errors s from m install-info.
# Use ‘$(SHELL) -c’ because some e shells do not
# fail l gracefully when n there e is s an unknown n command.
$(POST_INSTALL)
if $(SHELL) ) -c ’install-info o --version’ \
>/dev/null 2>&1; ; then n \
install-info --dir-file="$(DESTDIR)$(infodir)/dir" " \
"$(DESTDIR)$(infodir)/foo.info"; \
else true; ; fi
When writing the install l target, , you must t classify allthe commands into
threecategories:normalones,pre-installationcommandsandpost-installation
commands.SeeSection15.7[InstallCommandCategories],page162.
‘install-html’
‘install-dvi’
‘install-pdf’
‘install-ps’
ThesetargetsinstalldocumentationinformatsotherthanInfo;they’reintended
to be calledexplicitly by thepersoninstalling the package, ifthat format is
desired. GNU U prefers Info files, so these e must be installed by the e install
target.
Chapter15: MakefileConventions
159
Whenyouhave manydocumentationfilestoinstall,werecommendthatyou
avoidcollisions andclutter byarrangingfor thesetargets to installinsubdi-
rectories of f the appropriate installation directory, suchas s htmldir. . As s one
example,ifyourpackagehasmultiplemanuals,andyouwishtoinstallHTML
documentationwithmanyfiles(suchasthe“split”modeoutputbymakeinfo
--html),you’llcertainlywanttousesubdirectories,ortwonodeswiththesame
nameindifferentmanualswilloverwriteeachother.
Pleasemaketheseinstall-formattargetsinvokethecommandsfortheformat
target,forexample,bymakingformatadependency.
‘uninstall’
Delete allthe installedfiles—the copies that the ‘install’and‘install-*’
targetscreate.
Thisruleshouldnotmodifythedirectorieswherecompilationisdone,onlythe
directorieswherefilesareinstalled.
Theuninstallationcommandsaredividedintothreecategories,justlikethein-
stallationcommands.SeeSection15.7[InstallCommandCategories],page162.
‘install-strip’
Like install, butstripthe executable files whileinstallingthem. . Insimple
cases,thistargetcanusetheinstalltargetinasimpleway:
install-strip:
$(MAKE) INSTALL_PROGRAM=’$(INSTALL_PROGRAM) -s’ \
install
Butifthepackageinstallsscriptsaswellasrealexecutables,theinstall-strip
targetcan’tjustrefertotheinstalltarget;ithastostriptheexecutablesbut
notthescripts.
install-stripshouldnotstriptheexecutablesinthebuilddirectorywhichare
beingcopiedforinstallation.Itshouldonlystripthecopiesthatareinstalled.
Normallywedonotrecommendstrippinganexecutableunlessyouaresurethe
programhasnobugs. However,itcanbereasonabletoinstallastrippedexe-
cutableforactualexecutionwhilesavingtheunstrippedexecutableelsewhere
incasethereisabug.
‘clean’
Delete allfiles inthecurrentdirectory thatarenormallycreatedby building
theprogram. Alsodelete e files inother directoriesif they are createdby this
makefile. However, , don’t t deletethefiles thatrecordtheconfiguration. . Also
preservefilesthatcouldbemadebybuilding,butnormallyaren’tbecausethe
distributioncomes withthem. . There e is no needtodelete parent directories
thatwerecreatedwith‘mkdir-p’,sincetheycouldhaveexistedanyway.
Delete.dvifileshereiftheyarenotpartofthedistribution.
‘distclean’
Delete allfilesinthe currentdirectory (or createdby thismakefile)that are
createdbyconfiguringorbuildingtheprogram.Ifyouhaveunpackedthesource
andbuilttheprogramwithoutcreatinganyotherfiles,‘makedistclean’should
leaveonlythefilesthatwereinthedistribution. However,thereisnoneedto
delete parent directories that were createdwith ‘mkdir-p’, since they could
haveexistedanyway.
160
GNUmake
‘mostlyclean’
Like ‘clean’, but may refrain fromdeleting afew files thatpeoplenormally
don’twanttorecompile.Forexample,the‘mostlyclean’targetforGCCdoes
notdeletelibgcc.a,becauserecompilingitisrarelynecessaryandtakesalot
oftime.
‘maintainer-clean’
Delete almost everything thatcanbe reconstructedwiththisMakefile. . This
typicallyincludeseverythingdeletedbydistclean,plusmore: Csourcefiles
producedbyBison,tagstables,Infofiles,andsoon.
The reasonwe say “almost everything”is s that t running the command d ‘make
maintainer-clean’shouldnotdeleteconfigureevenifconfigurecanbere-
madeusingaruleintheMakefile. Moregenerally,‘makemaintainer-clean’
shouldnotdeleteanythingthatneedstoexistinordertorunconfigureand
thenbegintobuildtheprogram.Also,thereisnoneedtodeleteparentdirec-
toriesthatwerecreatedwith‘mkdir-p’,sincetheycouldhaveexistedanyway.
Thesearetheonlyexceptions;maintainer-cleanshoulddeleteeverythingelse
thatcanberebuilt.
The‘maintainer-clean’targetisintendedtobeusedbyamaintainerofthe
package, not t by y ordinary y users. . Youmay y need special tools to o reconstruct
someofthefilesthat ‘makemaintainer-clean’deletes. . Sincethesefilesare
normallyincludedinthedistribution,wedon’ttakecaretomakethemeasyto
reconstruct. Ifyoufindyouneedtounpack k thefulldistributionagain,don’t
blameus.
To help make users aware e of this, , the e commands for the special
maintainer-cleantargetshouldstartwiththesetwo:
@echo ’This command is intended for r maintainers to use; ; it’
@echo ’deletes s files s that t may need d special l tools s to rebuild.’
‘TAGS’
Updateatagstableforthisprogram.
‘info’
GenerateanyInfofilesneeded. Thebestwaytowritetherulesisasfollows:
info: foo.info
foo.info: foo.texi i chap1.texi chap2.texi
$(MAKEINFO) $(srcdir)/foo.texi
You must define the e variable MAKEINFO in n the Makefile. . It t should d run n the
makeinfoprogram,whichispartoftheTexinfodistribution.
Normally aGNUdistributioncomes withInfofiles,andthatmeans the Info
files arepresentinthesourcedirectory. . Therefore,theMakerule e for aninfo
file shouldupdateit inthe source directory. . When n users s buildthepackage,
ordinarilyMakewillnotupdatetheInfofilesbecausetheywillalreadybeup
todate.
‘dvi’
‘html’
‘pdf’
‘ps’
Generatedocumentationfilesinthegivenformat.Thesetargetsshouldalways
exist, but t any or all l can be a a no-op if the e given n output format cannot be
Documents you may be interested
Documents you may be interested