# websrc/pictools/Makevars # this file defines make variables for use in MakeTargets and MakeServerPix #$(info ###) #$(info ### Start reading MakeVars in $(CURDIR) at $(shell date "+%H:%M:%S.%3N")) # this file and MakeTargets are a tool for # building files from SRCROOT/_SITEPATH into STAGINGAREA/_SITEPATH # and then uploading them to SSHDEST:PICSDIR/_SITEPATH # where the PIC... variables are set in the environment # and _SITEPATH is the path from SRCROOT to the current directory # # Build and upload directories are created automatically. # # A Makefile is typically two or three lines: # SUBDIRS = subdirectories-if-any # include ${PICTOOLS}/MakeVars # # set additional variables (or add make targets) # include ${PICTOOLS}/MakeTargets # # Local targets. These operate only on the current directory: # build: transfer local files to STAGINGAREA/_SITEPATH # upload: transfer files from stage area to server # clean: remove $(JUNKFILES) # rebuild: force re-upload by deleting dummy time targets # MakeTargets, UploadPix, and similar include-able Makefiles # must define targets for build and upload. # # Recursive targets. Operate on this dir and all SUBDIRS. # The value of SUBDIRS may be set on the command line: # It is not passed recursively, so the named sub-directories # and all their descen # make SUBDIRS=2007 uploaddants are processed. # all: same as buildall # buildall: does build in this directory and then SUBDIRS # uploadall: does buildall, uploadall in the SUBDIRS, # and then upload # cleanall: do clean locally and recursively # All variables can be overridden on the command line to make. # However, these values are not exported # to recursively invoked instances of make. ################################################################ # Directory Tree Properties # Pictools operates over three directory trees each having # the same set of sub-directories: # a source tree # a staging area # the site server # In addition there may be a tree of images whose subdirectories # correspond to a subtree of the staging area and # an identical subtree on the server. # # Property values and environment variables define these # directories and the subpaths to directories within them. # Directory and file names must be written in Cygwin style: # proper slashes, no spaces, and starting with /cygdrive/ followed # by a drive letter. (Spaces can sometimes be included # by preceding them with backslashes. Good luck.) # Predefined # These two variables must be defined outside PICTOOLS # and outside Pictools.properties. They may be set in the # user's environment or in the shell initialization script. # # PICTOOLS # Must be predefined to contain the path to this pictools directory. # Starts with slash; no final slash. # Example value: /cygdrive/c/websrc/pictools # SRCROOT # Must be predefined as the path to the tree of directories # holding the site source. Starts with slash; no final slash. # Example value: /cygdrive/c/websrc # Directory Tree Variables # Typically defined in SRCROOT/Pictools.properties # STAGINGAREA # Path to the tree of directories holding the staging area. # Starts with slash; no final slash. # Example value: /cygdrive/c/physpics.com # PICSDIR # A directory path on the server leading from the initial # SSHDEST directory to the directory corresponding to SRCROOT. # Examples: physpics.com (dreamhost); httpdocs (networksolutions) # The value may be empty. # Usually the value does not begin with a slash. # No final slash unless value is "/" (highly unlikely). # SSHDEST # user name and host name of server # example value: physpics@physpics.com # # By the above, the server tree resides at ${SSHDEST}:${PICSDIR} # for example: physpics@physpics.com:httpdocs # from GNU Make : CURDIR # from MakeVars: SRC SRCROOT SERVER # from ./Pictools.properties : PICSDIR SSHDEST # Variables set by MakeVars # These may be used by the client Makefile # _SITEPATH = path from $(SRCROOT) to $(CURDIR) # something like: /annal/2015, may be empty # STAGE = ${STAGINGAREA}${_SITEPATH} # 'build' places files in this directory # SERVER = $(SSHDEST):$(PICSDIR)$(_SITEPATH) # 'upload' runs 'scp' to copy from STAGE to SERVER # SRC = the initial current directory # (some rules change to other directories) # PIXSTAGE = $(STAGINGAREA)$(PICTREESUBPATH) # destination for scale images built from picturedir: entries in caps file # Content Variables # To build and upload files, a client Makefile defines these # COPYFILES = file1 file2 file3 ... # if needed, these files are built locally by 'build' # 'build' then copies these files to STAGE # and 'upload' copies them from there to SERVER # Copying is recursive; the list may include directories like 'images' # BUILDTOSTAGE = file ... # files to be built directly into $(STAGE) # the files listed will appear in $(STAGE), but not the local $(SRC) # nevertheless, they are listed WITHOUT the $(STAGE) directory # Rules for making items on the list DO have the $(STAGE) directory # If file ffff.ext is in the BUILDTOSTAGE list, # there must be a rule for building $(STAGE)/ffff.ext # BUILDONLY = files to be generated locally for 'build', but not uploaded # TAR_EXCLUDE_LIST = _notes CVS *.BAK *~* Thumbs.db *.exe \ # *.jar *.class *.tgz *.tar \ # Pictools.csh Pictools.mkinc $(MORE_TAR_EXCLUDES) # List of files to be omitted when creating tar files. # Replace this value if you do not wish to exclude some of these files. # MORE_TAR_EXCLUDES # See values of TAR_EXCLUDE_LIST. Define this value # to add items to be excluded. # SRCTAR_FILES = default files to be preserved in DIRSRC.tgz; the latter is uploaded # MORE_SRCTAR_FILES = additions to SRCTAR default files # Build Info Variables # The following variables may be set by the client Makefile to direct the build # SUBDIRS = dir1 dir2 ... # subdirectories for buildall, updateall, and cleanall # DEFINES = symbol defines for genhtml. Form: -Dsymbol=value # Typically used to fill in fields in templates. # example: DEFINES = -DtripTitle="Florida, Spring, 2007" # LOCALJUNK = list of files or wild cards: eg, *.o foo* # These files are deleted for 'make clean' # AFTERSSH = # MakeTarget and friends invoke this command after every invocation of ssh. # On platforms like DreamHost which limit the frequency of incoming ssh calls, # This variable may be set the shell or in Pictools.properties to something like # AFTERSSH = sleep 10 # PICSCP = scp # may be set to fakescp to use ftp instead of scp; no longer fully functinoal # PICPASS # if using fakescp, the ftp password must be supplied # if the variable is not set, a value is prompted for at runtime # Default Content List Variables # These variables are given tentative values in MakeVars # If the client wants some other value, it can reset them # after including MakeVars # # HTMLFILES = *.html # IMAGEFILES = *.png *.PNG *.jpg *.JPG *.gif *.GIF *.bmp *.BMP # JSFILES = *.js # CSSFILES = *.css # The above are set in MakeVars to a list of the # files in the current directory. # These files are copied to STAGE and uploaded to SERVER. # The list can be modified in the Makefile. # Note that only single case names are recognized. # PHPFILES = *.php # these are copied to STAGE and uploaded # CAPFILE = *.cap # is set by MakeVars to *.cap. May be set by the # client to some other value. NO MORE THAN ONE # .cap file is supported. It is processed # through gendirs to create image viewing pages. # For cap file xxx.cap, MakeTargets generates # a file called xxx-titles.txt. This has HTML code # for the elements of a list that can be included in # the html portion of a .php page like this: #