-
Notifications
You must be signed in to change notification settings - Fork 251
/
Makefile
38 lines (31 loc) · 1.44 KB
/
Makefile
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
ifndef TOPDIR
TOPDIR=..
endif
include $(TOPDIR)/Makefile.global
OBJECTS = $(addsuffix $(OBJEXT),lib.error lib.misc)
build: $(OBJECTS)
$(OBJECTS): %$(OBJEXT): %.c %.h
clean-l:
rm -f $(OBJECTS)
# Change baseDir in composer autogenerated files
define fix_composer_paths
for file in autoload_psr4.php autoload_classmap.php autoload_files.php autoload_namespaces.php ; do \
sed -i "s#^\$$baseDir = .*#\$$baseDir = dirname('$(DESTDIR)$(domserver_webappdir)');#" $(1)/composer/$$file ; \
done
sed -i "s#__DIR__ \. '/\.\./\.\./\.\.' \. '/webapp#'$(DESTDIR)$(domserver_webappdir)#" $(1)/composer/autoload_static.php
endef
install-domserver:
$(INSTALL_DATA) -t $(DESTDIR)$(domserver_libdir) *.php
$(INSTALL_DATA) -t $(DESTDIR)$(domserver_libwwwdir) www/*.php
$(INSTALL_PROG) -t $(DESTDIR)$(domserver_libdir) alert
# KLUDGE: how to install a tree of files with correct permissions?
cp -R -t $(DESTDIR)$(domserver_libvendordir) vendor/*
$(call fix_composer_paths,$(DESTDIR)$(domserver_libvendordir))
chmod -R a+rX $(DESTDIR)$(domserver_libvendordir)
install-judgehost:
$(INSTALL_DATA) -t $(DESTDIR)$(judgehost_libdir) *.php *.sh
$(INSTALL_PROG) -t $(DESTDIR)$(judgehost_libdir) alert
# KLUDGE: how to install a tree of files with correct permissions?
cp -R -t $(DESTDIR)$(judgehost_libvendordir) vendor/*
$(call fix_composer_paths,$(DESTDIR)$(judgehost_libvendordir))
chmod -R a+rX $(DESTDIR)$(judgehost_libvendordir)