forked from fossology/fossology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.process
40 lines (33 loc) · 1.35 KB
/
Makefile.process
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# FOSSology Makefile - Makefile.process
# Copyright (C) 2008, 2012 Hewlett-Packard Development Company, L.P.
# This Makefile is included by other Makefiles in the tree that need
# these targets in order to preprocess files with embedded references
# to the variables in Makefile.conf
ifdef TOP
include $(TOP)/Makefile.conf
else
TOP = .
include Makefile.conf
endif
VARIABLES := PROJECT PROJECTUSER PROJECTGROUP DESTDIR PREFIX BINDIR SBINDIR SYSCONFDIR INITDIR LIBDIR INCLUDEDIR LIBEXECDIR DATAROOTDIR MODDIR LOCALSTATEDIR LOGDIR PROJECTSTATEDIR CACHEDIR MANDIR MAN1DIR DOCDIR WEBDIR PHPDIR VERSION COMMIT_HASH TWIG_CACHE
%-process: %.in
@echo "Regenerating variables list ..."
@rm -f $(TOP)/variable.list
@TOP=$(TOP) $(MAKE) -f $(TOP)/Makefile.process $(TOP)/variable.list
@echo "Generating $* ..."
$(TOP)/utils/preprocess $(TOP)/variable.list $< > $*
%-process_php: %.php.in
@echo "Regenerating variables list ..."
@rm -f $(TOP)/variable.list
@TOP=$(TOP) $(MAKE) -f $(TOP)/Makefile.process $(TOP)/variable.list
@echo "Generating $* ..."
$(TOP)/utils/preprocess_php $(TOP)/variable.list $<
$(TOP)/variable.list: $(TOP)/Makefile.conf
@TOP=$(TOP) $(MAKE) -f $(TOP)/Makefile.process $(VARIABLES)
$(VARIABLES):
@if [ "$@" = "PROJECT" ]; then \
echo "$@=\"$($@)\"" >$(TOP)/variable.list; \
else \
echo "$@=\"$($@)\"" >>$(TOP)/variable.list; \
fi
.PHONY: $(VARIABLES)