Changeset 796cd28 for BLFS/Makefile
- Timestamp:
- 03/02/2017 04:40:34 PM (8 years ago)
- Branches:
- new_features
- Children:
- a9dadcf
- Parents:
- eb8667a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/Makefile
reb8667a r796cd28 5 5 6 6 # $Id$ 7 8 ifeq ($(REV),)9 REV = sysv10 endif11 12 ifneq ($(REV),sysv)13 ifneq ($(REV),systemd)14 $(error The REV variable is $(REV), but can only be 'sysv' or 'systemd')15 endif16 endif17 7 18 8 ifdef V … … 26 16 LC_ALL=C 27 17 28 # The right-hand side is updated by jhalfs 18 # Makefile should reside in a directory where there are two subdirectories 19 # initially: 20 TOPDIR = $(shell pwd) 21 # the stylesheets 22 XSLDIR = $(TOPDIR)/xsl 23 # the menu program sources 24 MENU = $(TOPDIR)/menu 25 26 # Those directories and files will be created and populated by make: 27 # directory of the book sources: 28 BLFS_XML = $(TOPDIR)/blfs-xml 29 # contains the REV used in the preceding call: 30 REVFILE = $(TOPDIR)/revision 31 # the list of packages: 32 PACK_LIST = $(TOPDIR)/packages.xml 33 # the generated menu input: 34 CONFIG_CONFIG_IN = $(TOPDIR)/Config.in 35 # menu output: 36 CONFIG_OUT = $(TOPDIR)/configuration 37 # the linear book: 38 BOOK_XML = $(TOPDIR)/book.xml 39 40 RENDERTMP = $(BLFS_XML)/tmp 41 BLFS_FULL = $(RENDERTMP)/blfs-full.xml 42 43 # The right-hand side is updated by jhalfs: 44 # Where the tracking file resides: 29 45 TRACKING_DIR = tracking-dir 30 TOPDIR=$(shell pwd)31 BLFS_XML = $(TOPDIR)/blfs-xml32 XSLDIR = $(TOPDIR)/xsl33 46 34 RENDERTMP = $(BLFS_XML)/tmp 35 BLFS_FULL = $(RENDERTMP)/blfs-full.xml 36 PACK_LIST = $(TOPDIR)/packages.xml 37 MENU = $(TOPDIR)/menu 38 CONFIG_CONFIG_IN = $(TOPDIR)/Config.in 39 CONFIG_OUT = $(TOPDIR)/configuration 40 BOOK_XML = $(TOPDIR)/book.xml 41 TRACKFILE = $(TRACKING_DIR)/instpkg.xml 47 # Will be created by make, if not existent 48 TRACKFILE = $(TRACKING_DIR)/instpkg.xml 42 49 50 # Initial content of the tracking file 43 51 define INITIAL_TRACK 44 52 <?xml version="1.0" encoding="ISO-8859-1"?>\n\ … … 53 61 54 62 ALLXML := $(filter-out $(RENDERTMP)/%, \ 55 $(wildcard $(BLFS_XML)/*.xml $(BLFS_XML)/*/*.xml $(BLFS_XML)/*/*/*.xml $(BLFS_XML)/*/*/*/*.xml $(BLFS_XML)/*/*/*/*/*.xml)) 63 $(shell if [ -d $(BLFS_XML) ]; then \ 64 find $(BLFS_XML) -name \*.xml; \ 65 fi)) 56 66 ALLXSL := $(filter-out $(RENDERTMP)/%, \ 57 $(wildcard $(BLFS_XML)/*.xsl $(BLFS_XML)/*/*.xsl $(BLFS_XML)/*/*/*.xsl $(BLFS_XML)/*/*/*/*.xsl $(BLFS_XML)/*/*/*/*/*.xsl)) 67 $(shell if [ -d $(BLFS_XML) ]; then \ 68 find $(BLFS_XML) -name \*.xsl; \ 69 fi)) 70 71 # Try to set the REV variable according to previous runs, except when 72 # set on the command line: 73 REV1 := $(shell if [ -f $(REVFILE) ] ; then cat $(REVFILE); fi) 74 ifneq ($(origin REV),command line) 75 ifdef REV1 76 REV = $(REV1) 77 else 78 REV = not defined 79 endif 80 endif 81 82 ifneq ($(REV),sysv) 83 ifneq ($(REV),systemd) 84 $(error The REV variable is $(REV), but can only be 'sysv' or 'systemd') 85 endif 86 endif 58 87 59 88 $(BOOK_XML): $(CONFIG_OUT) … … 107 136 $(Q)$(TOPDIR)/gen-special.sh $(BLFS_FULL) $@ 108 137 138 ifneq ($(REV),$(REV1)) 139 $(BLFS_FULL): FORCE 140 endif 109 141 $(BLFS_FULL): $(BLFS_XML) $(BLFS_XML)/general.ent $(ALLXML) $(ALLXSL) 110 142 $(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP) … … 118 150 $(Q)xmllint --nonet --noent --postvalid \ 119 151 -o $@ $(RENDERTMP)/blfs-prof.xml 152 $(Q)echo $(REV) > $(REVFILE) 120 153 121 154 all: update $(BOOK_XML) … … 136 169 - $(MAKE) -C $(MENU) clean 137 170 138 .PHONY: clean all update $(CONFIG_OUT) 171 FORCE: 172 .PHONY: clean all update $(CONFIG_OUT) FORCE
Note:
See TracChangeset
for help on using the changeset viewer.