Commit 5e41595d authored by Mikhail Karpenko's avatar Mikhail Karpenko

Move format_disk installation to a separate makefile

parent 2f0a2331
# Runs 'make', 'make install', and 'make clean' in specified subdirectories # Runs 'make', 'make install', and 'make clean' in specified subdirectories
SUBDIRS := src SUBDIRS := src src/format_disk
INSTALLDIRS = $(SUBDIRS:%=install-%) INSTALLDIRS = $(SUBDIRS:%=install-%)
CLEANDIRS = $(SUBDIRS:%=clean-%) CLEANDIRS = $(SUBDIRS:%=clean-%)
......
GUIDIR = camogmgui GUIDIR = camogmgui
PROGS = camogm PROGS = camogm
TEST_PROG = camogm_test TEST_PROG = camogm_test
EXESCRIPTS = format_disk/format_disk.py
PHPSCRIPTS = camogmstate.php $(GUIDIR)/camogmgui.php $(GUIDIR)/camogmgui.css $(GUIDIR)/camogmgui.js $(GUIDIR)/camogm_interface.php \ PHPSCRIPTS = camogmstate.php $(GUIDIR)/camogmgui.php $(GUIDIR)/camogmgui.css $(GUIDIR)/camogmgui.js $(GUIDIR)/camogm_interface.php \
$(GUIDIR)/SpryTabbedPanels.css $(GUIDIR)/SpryTabbedPanels.js $(GUIDIR)/xml_simple.php $(GUIDIR)/SpryCollapsiblePanel.css \ $(GUIDIR)/SpryTabbedPanels.css $(GUIDIR)/SpryTabbedPanels.js $(GUIDIR)/xml_simple.php $(GUIDIR)/SpryCollapsiblePanel.css \
$(GUIDIR)/SpryCollapsiblePanel.js $(GUIDIR)/SpryCollapsiblePanel.js
...@@ -23,7 +22,6 @@ INSTALL = install ...@@ -23,7 +22,6 @@ INSTALL = install
INSTMODE = 0755 INSTMODE = 0755
INSTDOCS = 0644 INSTDOCS = 0644
OWN = -o root -g root OWN = -o root -g root
LN = ln -sf
SYSCONFDIR = /etc/ SYSCONFDIR = /etc/
BINDIR = /usr/bin/ BINDIR = /usr/bin/
...@@ -37,11 +35,10 @@ $(PROGS): $(OBJS) ...@@ -37,11 +35,10 @@ $(PROGS): $(OBJS)
$(TEST_PROG): $(TEST_SRC:.c=.o) $(TEST_PROG): $(TEST_SRC:.c=.o)
install: $(PROGS) $(PHPSCRIPTS) $(CONFIGS) $(EXESCRIPTS) install: $(PROGS) $(PHPSCRIPTS) $(CONFIGS)
$(INSTALL) $(OWN) -d $(DESTDIR)$(BINDIR) $(INSTALL) $(OWN) -d $(DESTDIR)$(BINDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(PROGS) $(DESTDIR)$(BINDIR) $(INSTALL) $(OWN) -m $(INSTMODE) $(PROGS) $(DESTDIR)$(BINDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(TEST_PROG) $(DESTDIR)$(BINDIR) $(INSTALL) $(OWN) -m $(INSTMODE) $(TEST_PROG) $(DESTDIR)$(BINDIR)
$(INSTALL) $(OWN) -m $(INSTMODE) $(EXESCRIPTS) $(DESTDIR)$(BINDIR)
$(INSTALL) $(OWN) -d $(DESTDIR)$(SYSCONFDIR) $(INSTALL) $(OWN) -d $(DESTDIR)$(SYSCONFDIR)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(CONFIGS) $(DESTDIR)$(SYSCONFDIR) $(INSTALL) $(OWN) -m $(INSTDOCS) $(CONFIGS) $(DESTDIR)$(SYSCONFDIR)
$(INSTALL) $(OWN) -d $(DESTDIR)$(WWW_PAGES) $(INSTALL) $(OWN) -d $(DESTDIR)$(WWW_PAGES)
......
BINDIR = /usr/bin
DOCUMENTROOT = /www/pages
INSTALL = install
INSTMODE = 0755
INSTDOCS = 0644
OWN = -o root -g root
LN = ln -sf
# executable scripts will go to $(BINDIR)
EXESCRIPTS = format_disk.py
DOCS = format_disk.js format_disk.php
all: $(SCRIPTS) $(DOCS)
install: $(EXESCRIPTS) $(DOCS)
$(INSTALL) $(OWN) -d $(DESTDIR)$(BINDIR)
$(INSTALL) $(OWN) -d $(DESTDIR)$(DOCUMENTROOT)
$(INSTALL) $(OWN) -m $(INSTMODE) $(EXESCRIPTS) $(DESTDIR)$(BINDIR)
$(INSTALL) $(OWN) -m $(INSTDOCS) $(DOCS) $(DESTDIR)$(DOCUMENTROOT)
clean:
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment