components/curl/Makefile
changeset 181 87e11e685b1f
parent 174 187aa0541610
child 206 a4474882bf60
--- a/components/curl/Makefile	Wed Apr 13 10:10:46 2011 -0600
+++ b/components/curl/Makefile	Wed Apr 13 09:58:06 2011 -0700
@@ -33,15 +33,13 @@
 include ../../make-rules/prep.mk
 include ../../make-rules/configure.mk
 include ../../make-rules/ips.mk
+include ../../make-rules/lint-libraries.mk
 
 PKG_CONFIG_PATH_32 = /usr/lib/pkgconfig
 PKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig
 
 PATCH_LEVEL = 0
 
-LIBNAME =       $(COMPONENT_NAME)
-LINTOUT =       lint.out
-
 GSSAPI_LIBDIR_32 = /usr/lib
 GSSAPI_LIBDIR_64 = /usr/lib/$(MACH64)
 
@@ -84,131 +82,13 @@
 CONFIGURE_OPTIONS += --with-pic
 CONFIGURE_OPTIONS += "curl_disallow_getifaddrs=yes"
 
-PKG_PROTO_DIRS +=	$(COMPONENT_SRC)
-
-COMPONENT_POST_BUILD_ACTION = \
-    ( cd $(@D) ; \
-	$(LINT) -nsvx $(CC_BITS) -o $(LIBNAME) -I$(@D) \
-	-I$(COMPONENT_DIR)/$(COMPONENT_SRC)/include \
-	-I$(COMPONENT_DIR)/$(COMPONENT_SRC) \
-	$(COMPONENT_DIR)/llib-l$(LIBNAME) > $(LINTOUT) 2>&1)
-
-COMPONENT_POST_INSTALL_ACTION = \
-    ( $(CP) $(COMPONENT_DIR)/llib-l$(LIBNAME) $(PROTOUSRLIBDIR)/ ; \
-	cd $(@D); $(INSTALL) llib-l$(LIBNAME).ln \
-	    $(PROTO_DIR)/$(CONFIGURE_LIBDIR.$(BITS)) )
-
-PROTOUSRBINDIR64 = $(PROTOUSRBINDIR)/$(MACH64)
-PROTOUSRSHAREDOCDIR1 = $(PROTOUSRSHAREDIR)/doc/curl/html
-PROTOUSRSHAREDOCDIR2 = $(PROTOUSRSHAREDIR)/doc/libcurl/html
+LINT_FLAGS += -I$(COMPONENT_DIR)/$(COMPONENT_SRC)/include
 
 build: $(BUILD_32_and_64)
 
-HTMLDOCLIST1 = curl.html curl-config.html index.html
-HTMLDOCLIST2 = curl_easy_cleanup.html curl_easy_duphandle.html \
-	       curl_easy_escape.html curl_easy_getinfo.html \
-	       curl_easy_init.html curl_easy_pause.html \
-	       curl_easy_perform.html curl_easy_recv.html \
-	       curl_easy_reset.html curl_easy_send.html \
-	       curl_easy_setopt.html curl_easy_strerror.html \
-	       curl_easy_unescape.html curl_escape.html \
-	       curl_formadd.html curl_formfree.html \
-	       curl_formget.html curl_free.html \
-	       curl_getdate.html curl_getenv.html \
-	       curl_global_cleanup.html curl_global_init.html \
-	       curl_global_init_mem.html curl_mprintf.html \
-	       curl_multi_add_handle.html curl_multi_assign.html \
-	       curl_multi_cleanup.html curl_multi_fdset.html \
-	       curl_multi_info_read.html curl_multi_init.html \
-	       curl_multi_perform.html curl_multi_remove_handle.html \
-	       curl_multi_setopt.html curl_multi_socket.html \
-	       curl_multi_socket_action.html curl_multi_strerror.html \
-	       curl_multi_timeout.html curl_share_cleanup.html \
-	       curl_share_init.html curl_share_setopt.html \
-	       curl_share_strerror.html curl_slist_append.html \
-	       curl_slist_free_all.html curl_strequal.html \
-	       curl_unescape.html curl_version.html \
-	       curl_version_info.html index.html \
-	       libcurl-easy.html libcurl-errors.html \
-	       libcurl-multi.html libcurl-share.html \
-	       libcurl-tutorial.html libcurl.html
+install: $(INSTALL_32_and_64)
 
-MAN1LIST = curl-config.1 curl.1
-MAN3LIST = curl_easy_cleanup.3 curl_easy_duphandle.3 \
-	   curl_easy_escape.3 curl_easy_getinfo.3 \
-	   curl_easy_init.3 curl_easy_pause.3 \
-	   curl_easy_perform.3 curl_easy_recv.3 \
-	   curl_easy_reset.3 curl_easy_send.3 \
-	   curl_easy_setopt.3 curl_easy_strerror.3 \
-	   curl_easy_unescape.3 curl_escape.3 \
-	   curl_formadd.3 curl_formfree.3 \
-	   curl_formget.3 curl_free.3 \
-	   curl_getdate.3 curl_getenv.3 \
-	   curl_global_cleanup.3 curl_global_init.3 \
-	   curl_global_init_mem.3 curl_mprintf.3 \
-	   curl_multi_add_handle.3 curl_multi_assign.3 \
-	   curl_multi_cleanup.3 curl_multi_fdset.3 \
-	   curl_multi_info_read.3 curl_multi_init.3 \
-	   curl_multi_perform.3 curl_multi_remove_handle.3 \
-	   curl_multi_setopt.3 curl_multi_socket.3 \
-	   curl_multi_socket_action.3 curl_multi_strerror.3 \
-	   curl_multi_timeout.3 curl_share_cleanup.3 \
-	   curl_share_init.3 curl_share_setopt.3 \
-	   curl_share_strerror.3 curl_slist_append.3 \
-	   curl_slist_free_all.3 curl_strequal.3 \
-	   curl_unescape.3 curl_version.3 \
-	   curl_version_info.3 libcurl-easy.3 \
-	   libcurl-errors.3 libcurl-multi.3 \
-	   libcurl-share.3 libcurl-tutorial.3 libcurl.3
-
-GSED = /usr/gnu/bin/sed
-
-include ../../make-rules/shared-targets.mk
-
-install: $(INSTALL_32_and_64)
-	$(MKDIR) $(PROTOUSRSHAREDOCDIR1) ; \
-	    list1='$(HTMLDOCLIST1)' ; for f in $$list1; do \
-	    $(INSTALL) -m 0644 $(COMPONENT_DIR)/$(COMPONENT_SRC)/docs/$$f \
-		$(PROTOUSRSHAREDOCDIR1)/ ; \
-	    done
-	$(MKDIR) $(PROTOUSRSHAREDOCDIR2) ; \
-	    list2='$(HTMLDOCLIST2)' ; for f in $$list2; do \
-	    $(INSTALL) -m 0644 \
-		$(COMPONENT_DIR)/$(COMPONENT_SRC)/docs/libcurl/$$f \
-		$(PROTOUSRSHAREDOCDIR2)/ ; \
-	    done
-	$(MKDIR) $(PROTOUSRSHAREMAN1DIR) ; \
-	    list3='$(MAN1LIST)'; for f in $$list3; do \
-	    $(GSED) -f oracleman-stability \
-		$(PROTOUSRSHAREMAN1DIR)/$$f > \
-		$(PROTOUSRSHAREMAN1DIR)/$$f.sed 2>&1 ; \
-	    $(CP) -fp $(PROTOUSRSHAREMAN1DIR)/$$f.sed \
-		$(PROTOUSRSHAREMAN1DIR)/$$f ; \
-	    $(RM) -f $(PROTOUSRSHAREMAN1DIR)/$$f.sed ; \
-	    done
-	$(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \
-	    list4='$(MAN3LIST)'; for f in $$list4; do \
-	    $(GSED) -f oracleman-stability \
-		$(PROTOUSRSHAREMAN3DIR)/$$f > \
-		$(PROTOUSRSHAREMAN3DIR)/$$f.sed 2>&1 ; \
-	    $(CP) -fp $(PROTOUSRSHAREMAN3DIR)/$$f.sed \
-		$(PROTOUSRSHAREMAN3DIR)/$$f ; \
-	    $(RM) -f $(PROTOUSRSHAREMAN3DIR)/$$f.sed ; \
-	    done
-	$(RM) $(PROTOUSRBINDIR)/curl-config ; \
-	$(INSTALL) -m 0755 $(COMPONENT_DIR)/Solaris/curl-config \
-	    $(PROTOUSRBINDIR)/
-	$(RM) $(PROTOUSRBINDIR64)/curl-config 
-	$(GSED) -e "s#MACH64#$(MACH64)#g" \
-	    $(COMPONENT_DIR)/Solaris/curl-config-64 > \
-		$(COMPONENT_DIR)/curl-config 
-	$(INSTALL) -m 0755  \
-		$(COMPONENT_DIR)/curl-config $(PROTOUSRBINDIR64)/
-	$(RM) $(COMPONENT_DIR)/curl-config
-
-test: $(BUILD_32_and_64)
-	@cd $(BUILD_DIR_32); $(GMAKE) check
-	@cd $(BUILD_DIR_64); $(GMAKE) check
+test: $(TEST_32_and_64)
 
 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)