pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pdf-devel] Public header generation


From: Aleksander Morgado
Subject: [pdf-devel] Public header generation
Date: Wed, 12 Mar 2008 19:07:50 +0100
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

Hi all,

I modified the pdf.h generation in src/Makefile.am so that some extra things are added:
1. File details and GPL version header
2. Check for the definition of PDF_H, and define it if not already done, to avoid multiple inclusions of the header.

Here is the patch.

-Aleksander
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/pdf/libgnupdf/src/Makefile.am,v
retrieving revision 1.38
diff -c -r1.38 Makefile.am
*** src/Makefile.am     7 Mar 2008 13:58:37 -0000       1.38
--- src/Makefile.am     12 Mar 2008 18:05:07 -0000
***************
*** 50,56 ****
                       $(TYPES_MODULE_SOURCES) \
                       $(STM_MODULE_SOURCES) \
                       $(ERROR_MODULE_SOURCES) \
!                    $(LIST_MODULE_SOURCES)
  
  
  
--- 50,56 ----
                       $(TYPES_MODULE_SOURCES) \
                       $(STM_MODULE_SOURCES) \
                       $(ERROR_MODULE_SOURCES) \
!                      $(LIST_MODULE_SOURCES)
  
  
  
***************
*** 71,78 ****
  
  
  # Public header generation
  
- PUBLIC_HDR_HDR = "/* This file has been automatically generated */"
  
  PUBLIC_HDRS = pdf-global.h \
                base/pdf-types.h \
--- 71,108 ----
  
  
  # Public header generation
+ PUBLIC_HDR_DATE = `date +%c`
+ PUBLIC_HDR_HDR = \
+ "/* This file has been automatically generated */ \n\
+ \n/* \n\
+  * \n\
+  *       File:         pdf.h \n\
+  *       Date:         $(PUBLIC_HDR_DATE) \n\
+  * \n\
+  *       GNU PDF Library - Public header \n\
+  * \n\
+  */ \n\
+ \n/* Copyright (C) 2007, 2008 Free Software Foundation, Inc. */ \n\
+ \n/* This program is free software: you can redistribute it and/or modify \n\
+  * it under the terms of the GNU General Public License as published by \n\
+  * the Free Software Foundation, either version 3 of the License, or \n\
+  * (at your option) any later version. \n\
+  * \n\
+  * This program is distributed in the hope that it will be useful, \n\
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of \n\
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the \n\
+  * GNU General Public License for more details. \n\
+  *\n\
+  * You should have received a copy of the GNU General Public License \n\
+  * along with this program.  If not, see <http://www.gnu.org/licenses/>. \n\
+  */ \n\
+ \n\#ifndef PDF_H \
+ \n\#define PDF_H \n\n"
+ 
+ PUBLIC_HDR_TLR = \
+ "\n\#endif /* !PDF_H */ \
+ \n\n/* End of pdf.h */\n"
  
  
  PUBLIC_HDRS = pdf-global.h \
                base/pdf-types.h \
***************
*** 90,100 ****
                base/pdf-stm.h
  
  
- 
  pdf.h : $(PUBLIC_HDRS)
        chmod +x $(top_srcdir)/src/extract-public-hdr
        echo $(PUBLIC_HDR_HDR) > $@
        cat $(PUBLIC_HDRS) | $(top_srcdir)/src/extract-public-hdr >> $@
! 
  
  # End of Makefile.am
--- 120,129 ----
                base/pdf-stm.h
  
  
  pdf.h : $(PUBLIC_HDRS)
        chmod +x $(top_srcdir)/src/extract-public-hdr
        echo $(PUBLIC_HDR_HDR) > $@
        cat $(PUBLIC_HDRS) | $(top_srcdir)/src/extract-public-hdr >> $@
!       echo $(PUBLIC_HDR_TLR) >> $@
  
  # End of Makefile.am

reply via email to

[Prev in Thread] Current Thread [Next in Thread]