File: Makefile.process

package info (click to toggle)
fossology 1.1.0-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 10,984 kB
  • ctags: 7,160
  • sloc: ansic: 32,477; php: 22,920; sh: 1,572; perl: 1,352; makefile: 1,110; xml: 201; sql: 21
file content (32 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download
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
# FOSSology Makefile - Makefile.process
# Copyright (C) 2008 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 VERSION PROJECTUSER PROJECTGROUP DESTDIR PREFIX BINDIR SBINDIR SYSCONFDIR INITDIR LIBDIR INCLUDEDIR LIBEXECDIR DATAROOTDIR DATADIR LOCALSTATEDIR LOGDIR PROJECTSTATEDIR MANDIR MAN1DIR DOCDIR WEBDIR PHPDIR AGENTDIR AGENTDATADIR AGENTSTATEDIR AGENTCHECKDDIR AGENTTESTDDIR SVN_REV

%-process: %.in
	@ echo "Regenerating variables list ..."
	@rm -f $(TOP)/variable.list
	@TOP=$(TOP) $(MAKE) -f $(TOP)/Makefile.process $(TOP)/variable.list
	@echo "Generate $* ..."
	$(TOP)/utils/preprocess $(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)