Bug 29169 - top level Makefile fails on sinix trying to preprocess .h files
Summary: top level Makefile fails on sinix trying to preprocess .h files
Status: RESOLVED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-24 09:48 UTC by Martin J. Evans
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin J. Evans 2004-05-24 09:48:31 UTC
From an email to dev@apr.apache.org:

cpp on sinix cannot process .h files.
This affects the line below in the top level makefile:

$(CPP) $(ALL_CPPFLAGS) $(ALL_INCLUDES) export_vars.h | sed -e
's/^\#[^!]*//' | sed -e '/^$$/d' >> $@

Given export_vars.h only contained:

apr_month_snames
apr_day_snames

I changed this line to:

cat export_vars.h | sed -e 's/^\#[^!]*//' | sed -e '/^$$/d' >> $@

which got me past this.
Comment 1 Martin J. Evans 2004-05-24 09:49:49 UTC
BTW, the compiler I was using was:

bash-2.04$ pkginfo -l CDSDEV
   PKGINST:  CDSDEV
      NAME:  ReliantUNIX C Compiler ( MIPS )
  CATEGORY:  application
      ARCH:  R3000
   VERSION:  2.0A00
      LOAD:  07
    VENDOR:  Siemens AG
    PSTAMP:  pgtd0946981116114031
  INSTDATE:  Mar 13 2002 04:57 PM
    STATUS:  completely installed
     FILES:     76 installed pathnames
                24 shared pathnames
                 1 linked files
                23 directories
                21 executables
             24083 blocks used (approx)
Comment 2 Joe Orton 2004-05-27 14:35:42 UTC
If you replace export_vars.h with export_vars.c every in the Makefile, does that
work? I don't see any reason why this file has to be a .h not a .c...
Comment 3 Martin J. Evans 2004-05-27 14:52:06 UTC
s/export_vars.h/export_vars.c/

works fine as cpp can process .c files but not .h files:

bash-2.04$ cat xx.h
#define dave fred
bash-2.04$ cat xx.c
#include "xx.h"
main()
{
        printf("hello\n");
}
bash-2.04$ cc -E xx.h
cc: [warning]:   CDR9971 unknown file 'xx.h' ignored
cc: [fatal]:   CDR9982 missing compilable files
bash-2.04$ cc -E xx.c
#line 1 "xx.c"
#line 1 "xx.h"
#line 2 "xx.c"
main()
{
        printf("hello\n");
}
Comment 4 Joe Orton 2004-05-27 20:31:27 UTC
OK thanks Martin, I committed that and will backport it for the next 0.9.x release.