[vhffs-dev] [svn] commit: r228 - /trunk/Makefile

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Author: gradator
Date: Wed Oct 18 20:56:59 2006
New Revision: 228

Log:
Makefile fixed


Modified:
    trunk/Makefile

Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Wed Oct 18 20:56:59 2006
@@ -40,7 +40,7 @@
 	/usr/bin/apt-get install $(DEBIAN_PACKAGES)
 
 test-deps:
-	echo "foreach ( qw(	$(PERL_MODULES) ) ){\
+	@perl -e "foreach ( qw(	$(PERL_MODULES) ) ){\
    		    \$$found = 0;\
         	\$$dep = \$$_;\
         	\$$dep =~ s/::/\//g;\
@@ -51,26 +51,25 @@
         	}\
         	if( \$$found == 0 )\
         	{\
-				print \"\n\n\tError, \$$_ perl-module is not installed\n\";\
+				print \"Error, \$$_ perl-module is not installed\n\";\
                 exit( 1 );\
         	}\
 		}\
-		print \"\n\n\n\n\n\n\t\tGood all perl-deps are installed\n\"; exit( 0 );" | perl
+		print \"Good all perl-deps are installed\n\"; exit( 0 );"
 
 install-shell: build-shell add-shell
 
 link-api:
-	echo " \
-	if( -f \"/etc/debian_version\" ) \
-	{ \
-		\$$link=\"$(DESTDIR)/usr/share/perl5/Vhffs\" ; \
-	} \
-	else \
-	{ \
-	    \$$link=\"$(DESTDIR)\".\$$INC[0] . \"/Vhffs\"; \
-	} \
-	unlink( \$$link ) if( -f \$$link ); \
-	symlink( \"$(DESTDIR)/usr/share/vhffs/api\" , \$$link ); print \"Link API with \$$link\n\";"| perl
+	@perl -e " \
+	    foreach \$$inc ( @INC ) { \
+		unlink ( \$$inc . \"/Vhffs\" ) if ( -l \$$inc . \"/Vhffs\" ); \
+		if ( -d \$$inc && \$$inc =~ /site_perl\$$/ ) { \
+		    \$$link = \$$inc . \"/Vhffs\"; \
+		} \
+	    } \
+	    unlink( \$$link ) if( -f \$$link ); \
+	    (symlink( \"$(DESTDIR)/usr/share/vhffs/api\" , \$$link ) &&  print \"Link API with \$$link\n\") || \
+		print \"** WARNING ** Unable to create symlink, please link /usr/share/vhffs/api with Vhffs in a perl include directory, please contact Vhffs team\";"
 		
 build-shell:
 	install -d -m 755 $(SHELLDIR)
@@ -108,7 +107,7 @@
 	install -d -m 755 $(BACKENDDIR)/pgsql
 	install -d -m 755 $(BACKENDDIR)/tools
 	install -m 644 vhffs-backend/src/pgsql/*.sql    $(BACKENDDIR)/pgsql/
-	install -m 755 vhffs-backend/tools/vhffs-initdb $(BACKENDDIR)/tools/vhffs-initdb
+#	install -m 755 vhffs-backend/tools/vhffs-initdb $(BACKENDDIR)/tools/vhffs-initdb
 	install -m 644 vhffs-backend/mails/*    $(MAILSDIR)/
 
 install-intl:




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/