Click here to Skip to main content
15,887,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi In an already existing Makefile.am, I just added index.html in dist_web_DATA section. There're several files in this section. I also added some .js files.
There're two methods of installing the application on the server:
1. sudo make install
2. building a package and installing it on the destination machine
First method causes the file to be copied to /var/www, but when I build the package and install it on the target machine, all files including old ones and what I added to this section are copied unless index.html! I changed its name to test.html and it got copied! It seems that there's a problem with the name index.html.
I may include the whole Makefile.am, but I think there's no need, because the problem is clear: There's a problem with index.html in dist_web_DATA section of Makefile.am. What's that and how can I resolve it?
Thanks

Update:

The Makefile.am is something like:
AUTOMAKE_OPTIONS = gnu

# This should be set to your web directory
webdir = @WEB_PREFIX@
# And these to the user and group of your webserver
webuser = @WEB_USER@
webgroup = @WEB_GROUP@

SUBDIRS = \
	ajax \
	css \
	graphics \
	includes \
	js \
	lang \
	skins \
	tools \
	views

dist_web_DATA = \
	index.php

# Yes, you are correct. This is a HACK!
install-data-hook:
	( cd $(DESTDIR)$(webdir); chown $(webuser):$(webgroup) $(dist_web_DATA) )
	( cd $(DESTDIR)$(webdir); chown -R $(webuser):$(webgroup) $(SUBDIRS) )
	@-( cd $(DESTDIR)$(webdir); if ! test -e events; then mkdir events; fi; chown $(webuser):$(webgroup) events; chmod u+w events )
	@-( cd $(DESTDIR)$(webdir); if ! test -e images; then mkdir images; fi; chown $(webuser):$(webgroup) images; chmod u+w images )
	@-( cd $(DESTDIR)$(webdir); if ! test -e sounds; then mkdir sounds; fi; chown $(webuser):$(webgroup) sounds; chmod u+w sounds )
	@-( cd $(DESTDIR)$(webdir); if ! test -e tools; then mkdir tools; fi; chown $(webuser):$(webgroup) tools; chmod u+w tools )
	@-( cd $(DESTDIR)$(webdir); if ! test -e temp; then mkdir temp; fi; chown $(webuser):$(webgroup) temp; chmod u+w temp )

uninstall-hook:
	@-( cd $(DESTDIR)$(webdir); rm -rf $(SUBDIRS) )
	@-( cd $(DESTDIR)$(webdir); rm -rf events images sounds tools temp )


It's indeed derived from ZoneMinder and going to customize it.

What I have tried:

I copied index.html to test.html and added it as well to Makefile.am, and I see that it's installed in /var/www unlike index.html.
Posted
Updated 25-Nov-20 2:22am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900